Skip to content
This repository was archived by the owner on Feb 13, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 2 additions & 15 deletions cmd/scollector/collectors/dell_hw.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,19 +143,6 @@ func c_omreport_storage_controller() (opentsdb.MultiDataPoint, error) {
return md, nil
}

type hwDiskMeta struct {
Name string
Media string
Capacity string
VendorId string
ProductId string
Serial string
Part string
NegotatiedSpeed string
capableSpeed string
SectorSize string
}

// c_omreport_storage_pdisk is called from the controller func, since it needs the encapsulating id.
func c_omreport_storage_pdisk(id string, md *opentsdb.MultiDataPoint) {
readOmreport(func(fields []string) {
Expand All @@ -169,7 +156,7 @@ func c_omreport_storage_pdisk(id string, md *opentsdb.MultiDataPoint) {
if len(fields) < 32 {
return
}
dm := &hwDiskMeta{}
dm := &metadata.HWDiskMeta{}
if fields[2] != "" {
dm.Name = fields[2]
}
Expand All @@ -195,7 +182,7 @@ func c_omreport_storage_pdisk(id string, md *opentsdb.MultiDataPoint) {
dm.NegotatiedSpeed = fields[27]
}
if fields[28] != "" {
dm.capableSpeed = fields[28]
dm.CapableSpeed = fields[28]
}
if fields[31] != "" {
dm.SectorSize = fields[31]
Expand Down
14 changes: 14 additions & 0 deletions metadata/shared.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package metadata // import "bosun.org/metadata"
Copy link
Contributor

Choose a reason for hiding this comment

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

you shouldn't need to repeat the vanity import, but whatever.


type HWDiskMeta struct {
Name string
Media string
Capacity string
VendorId string
ProductId string
Serial string
Part string
NegotatiedSpeed string
CapableSpeed string
SectorSize string
}