Closed svtkobra7 closed 7 years ago
The first stab at addressing this is in: https://github.com/seren/freenas-temperature-graphing/commit/0f5a3ed885bc13ddff791b83c3d67362370012b3, in the exsi branch
From @svtkobra7 in outside channel (paraphrased). Copied here for tracking:
I just attempted to test and got the following errors via SSH. Let me know what other info I can provide.
In the below obviously I have substituted my username and IP without quotes.
[root@NAS] /mnt/Tank1/System/Scripts/freenas-temperature-graphing-esxi# ./rrd.sh --platform "esxi" --ipmitool_username x --impitool_ip x --debug
--platform
esxi
Creating rrdtool db file: esxi
Rrdtool arguments: DS:cpu0:GAUGE:0:0:150 DS:cpu1:GAUGE:0:0:150 DS:cpu2:GAUGE:0:0:150 DS:cpu3:GAUGE:0:0:150 DS:da1:GAUGE:0:0:100 DS:da2:GAUGE:0:0:100 DS:da3:GAUGE:0:0:100 DS:da4:GAUGE:0:0:100 DS:da5:GAUGE:0:0:100 DS:da6:GAUGE:0:0:100 DS:da7:GAUGE:0:0:100 DS:da8:GAUGE:0:0:100 DS:da9:GAUGE:0:0:100 DS:da10:GAUGE:0:0:100 DS:da11:GAUGE:0:0:100 DS:da12:GAUGE:0:0:100 DS:da13:GAUGE:0:0:100 DS:da14:GAUGE:0:0:100 DS:da15:GAUGE:0:0:100 DS:da16:GAUGE:0:0:100
/usr/local/bin/rrdtool create esxi --step 0 DS:cpu0:GAUGE:0:0:150 DS:cpu1:GAUGE:0:0:150 DS:cpu2:GAUGE:0:0:150 DS:cpu3:GAUGE:0:0:150 DS:da1:GAUGE:0:0:100 DS:da2:GAUGE:0:0:100 DS:da3:GAUGE:0:0:100 DS:da4:GAUGE:0:0:100 DS:da5:GAUGE:0:0:100 DS:da6:GAUGE:0:0:100 DS:da7:GAUGE:0:0:100 DS:da8:GAUGE:0:0:100 DS:da9:GAUGE:0:0:100 DS:da10:GAUGE:0:0:100 DS:da11:GAUGE:0:0:100 DS:da12:GAUGE:0:0:100 DS:da13:GAUGE:0:0:100 DS:da14:GAUGE:0:0:100 DS:da15:GAUGE:0:0:100 DS:da16:GAUGE:0:0:100 RRA:MAX:0.5:1:3000
ERROR: step size: value must be positive
ERROR: Couldn't initialize esxi. Running diagnostics...
Script version: 1.0
Testing file permissions...
'esxi' doesn't exist
Testing chmod...
'esxi' doesn't exist
Testing file field count...
Data variable is empty
Test failed (returned 1)
[root@NAS] /mnt/Tank1/System/Scripts/freenas-temperature-graphing-esxi# ./rrd-graph.sh --platform "esxi" --ipmitool_username x --impitool_ip x --debug
./rrd-graph.sh: Unrecognized option: --platform (try --help)
Added fixes for some issues. Could you pull the latest changes and see how it works? Also, if you get an error, could you try with the '-d' flag?
My pleasure ...
[root@NAS]
/mnt/Temp# /mnt/Temp/rrd.sh /mnt/Temp/temps-1min.rrd -d --platform "esxi" --ipmitool_username -d
Output follows:
sysctl:
unknown oid 'dev.cpu.0.temperature'
ERROR: /mnt/Temp/temps-1min.rrd: expected 18 data source readings (got 1) from N
ERROR: Couldn't update /mnt/Temp/temps-1min.rrd with the data provided. Running diagnostics...
Script version: 1.0
Testing file permissions...
Testing chmod...
Testing file field count...
Data variable is empty
Test failed (returned 1)``
Sorry for the radio silence. I think I've got ipmi support working, though it's hard to know without testing live. Could you test the esxi branch (https://github.com/seren/freenas-temperature-graphing/tree/esxi) and see how it goes (using -d if you get an error).
No worries at all! Thank you for taking another shot at this.
Command issued via SSH:
/mnt/Tank1/System/CronJobs/freenas-temperature-graphing-esxi/rrd.sh --platform "esxi" --ipmitool_username X --ipmitool_address Y /mnt/Tank1/System/CronJobs/freenas-temperature-graphing-esxi/temps-1min.rrd -d
where X = username and Y = IP address without quotes
Output:
sysctl: unknown oid 'dev.cpu.0.temperature' ERROR: /mnt/Tank1/System/CronJobs/freenas-temperature-graphing-esxi/temps-1min.rrd: expected 20 data source readings (got 1) from N ERROR: Couldn't update /mnt/Tank1/System/CronJobs/freenas-temperature-graphing-esxi/temps-1min.rrd with the data provided. Running diagnostics... Script version: 1.0 Testing file permissions... Testing chmod... Testing file field count... Data variable is empty Test failed (returned 1)
Command issued via SSH:
/mnt/Tank1/System/CronJobs/freenas-temperature-graphing-esxi/rrd-graph.sh /mnt/Tank1/System/CronJobs/freenas-temperature-graphing-esxi/temps-1min.rrd -d
Output:
null
I'm happy to test subsequent updates and revert as quickly as possible. Also, please let me know if I may be doing something wrong on my end. Thanks for your continued work on this.
The changes for this have been tested and merged into the master branch.
Issue: ESXi doesn't pass through CPU temperatures to FreeNAS, so no CPU temperatures are graphed.
Proposed Solution:
$ipmitool = "/usr/local/bin/ipmitool -I lanplus -H <BMC IP ADDRESS> -U <USERNAME> -f /root/.ipmi
$ipmitool sdr elist | grep "CPU" | grep "Temp" | awk '{print $1, $4}'
CPU1 43 CPU2 62