I have been using Zenoss on and off for a while now, but having just installed the latest version I am running into a roadblock. I have searched high and low and still not found an answer .... the problem:
I am monitoring a group of RHEL servers that have no SNMP access, but instead I am using SSH to get some details. Specifically I need to know when the server has an uptime in excess of 44 days.
I have tried to create such a threshold but find that the value being parsed is a much higher number, the origins of which are unclear.
- The devices return a valid uptime in the Infrastructure section
- uptime is collected using /usr/bin/uptime via SSH and the Data Point is called sysUptime
- I have created a MinMax Threshold called uptime, selected uptime_sysUpTime with a max value of 44
Once configured I get warning, such as:
message threshold of uptime exceeded: current value 170952000.00
The device itself shows an uptime value of
I cannot find a correlation between the values and I am stuck trying to figure out how to enter a maximum value that would equate to a 44 day uptime in the threshold.
Cany anyone shed any light on this?
The Linux uptime command is returning the number of "jiffies" that the computer has been up. One jiffy equals 10 milliseconds, or one one-hundredth of a second. So an uptime of 19d:18h:48m:20s equals:
(((19 * 24 + 18) * 60 + 48) * 60 + 20) * 100 = 170930000
You have a couple of options. You could set your threshold to 380160000, which is 44 days worth of jiffies. Or, and this is what I would do, you could change your ssh script to divide the number you get from uptime by 8640000 (the number of jiffies in a day) so that the uptime is reported to Zenoss in days instead of jiffies.