Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/scollector: Collect ifspeed metric and master metadata for linux teams #1377

Merged
merged 1 commit into from
Oct 5, 2015

Conversation

kylebrandt
Copy link
Member

No description provided.

if len(fields) < 32 {
return
}
if fields[2] != "" {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

magic numbers really scare me. How confident are we in this field ordering?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In theory it is parseable output. Long term I want to pull from the Dracs
on this. So I'm okay with code that is more fragile over long time. With
our integration with Opserver we will find out fast...

On Mon, Oct 5, 2015 at 11:51 AM, Craig Peterson notifications@github.com
wrote:

In cmd/scollector/collectors/dell_hw.go
#1377 (comment):

@@ -149,7 +149,41 @@ func c_omreport_storage_pdisk(id string, md *opentsdb.MultiDataPoint) {
}
//Need to find out what the various ID formats might be
id := strings.Replace(fields[0], ":", "_", -1)

  •   Add(md, "hw.storage.pdisk", severity(fields[1]), opentsdb.TagSet{"id": id}, metadata.Gauge, metadata.Ok, descDellHWPDisk)
    
  •   ts := opentsdb.TagSet{"id": id}
    
  •   Add(md, "hw.storage.pdisk", severity(fields[1]), ts, metadata.Gauge, metadata.Ok, descDellHWPDisk)
    
  •   if len(fields) < 32 {
    
  •       return
    
  •   }
    
  •   if fields[2] != "" {
    

magic numbers really scare me. How confident are we in this field ordering?


Reply to this email directly or view it on GitHub
https://github.com/bosun-monitor/bosun/pull/1377/files#r41160647.

captncraig pushed a commit that referenced this pull request Oct 5, 2015
cmd/scollector: Collect ifspeed metric and master metadata for linux teams
@captncraig captncraig merged commit f41d7f9 into master Oct 5, 2015
@captncraig captncraig deleted the omPhysicalDiskMeta branch October 5, 2015 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants