metal3-io / metal3-smart-exporter Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
The README doesn't explain what this repo is for.
I ran this script on my RHEL8 bare metal host. All of the smartctl
commands fail. Here is the output from all of those commands:
smartctl 6.6 2017-11-05 r4594 [x86_64-linux-4.18.0-80.1.2.el8_0.x86_64] (local build)
Copyright (C) 2002-17, Bruce Allen, Christian Franke, www.smartmontools.org
/dev/dm-0: Unable to detect device type
Please specify device type with the -d option.
Use smartctl -h to get a usage summary
smartctl 6.6 2017-11-05 r4594 [x86_64-linux-4.18.0-80.1.2.el8_0.x86_64] (local build)
Copyright (C) 2002-17, Bruce Allen, Christian Franke, www.smartmontools.org
/dev/dm-1: Unable to detect device type
Please specify device type with the -d option.
Use smartctl -h to get a usage summary
smartctl 6.6 2017-11-05 r4594 [x86_64-linux-4.18.0-80.1.2.el8_0.x86_64] (local build)
Copyright (C) 2002-17, Bruce Allen, Christian Franke, www.smartmontools.org
Smartctl open device: /dev/sda failed: DELL or MegaRaid controller, please try adding '-d megaraid,N'
smartctl 6.6 2017-11-05 r4594 [x86_64-linux-4.18.0-80.1.2.el8_0.x86_64] (local build)
Copyright (C) 2002-17, Bruce Allen, Christian Franke, www.smartmontools.org
Smartctl open device: /dev/sdb failed: DELL or MegaRaid controller, please try adding '-d megaraid,N'
Seems we're getting bogus output from one of the lab machines:
[centos@r640-u09 dev-scripts]$ curl http://hostname:59100/metrics
smartutil_capacity{device=nvme0n1 serial=BTLN903300QH1P6AGN} 1,600,000,000,000
smartutil_utilization{device=nvme0n1 serial=BTLN903300QH1P6AGN}
smartutil_read_nvme_smart/health_information_failed{device=nvme0n1 serial=BTLN903300QH1P6AGN} _nvme_status_0x4002
smartutil_capacity{device=nvme1n1 serial=BTLN903300JL1P6AGN} 1,600,000,000,000
smartutil_utilization{device=nvme1n1 serial=BTLN903300JL1P6AGN}
smartutil_read_nvme_smart/health_information_failed{device=nvme1n1 serial=BTLN903300JL1P6AGN} _nvme_status_0x4002
smartutil_capacity{device=nvme2n1 serial=BTLN903300QL1P6AGN} 1,600,000,000,000
smartutil_utilization{device=nvme2n1 serial=BTLN903300QL1P6AGN}
smartutil_read_nvme_smart/health_information_failed{device=nvme2n1 serial=BTLN903300QL1P6AGN} _nvme_status_0x4002
smartutil_capacity{device=nvme3n1 serial=BTLN903300LJ1P6AGN} 1,600,000,000,000
smartutil_utilization{device=nvme3n1 serial=BTLN903300LJ1P6AGN}
smartutil_read_nvme_smart/health_information_failed{device=nvme3n1 serial=BTLN903300LJ1P6AGN} _nvme_status_0x4002
[centos@r640-u09 dev-scripts]$
Would it be better to use go to execute smartctl and parse the output instead of bash? I started working on a golang version in a temporary location here: https://github.com/pgier/smartmon-text-collector
If it would be helpful, I can create a PR to this repo with similar content.
We need to add some tests for the smart output parser, with some sample data.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.