Convert SNMP check return value from milliseconds to minutes
Posted: Tue Dec 20, 2016 9:41 am
Hi, I am trying to convert a status value returned from our APC UPS devices from milliseconds to minutes.
I'm running the snmp check OID -o 1.3.6.1.4.1.318.1.1.1.2.2.3.0 which returns the remaining battery time in milliseconds. Does anyone have a solution to either convert the return value, or be able to convert the value in the alert email? I can set my -w and -c values based on milliseconds if necessary, but I would like to have the alert email indicate how much battery time remains in an easily readable format (minutes).
I haven't been able to find anything covering this type of conversion in the KB or in the forums, but I'm hoping someone has some experience with this.
Thank you for your assistance.
I'm running the snmp check OID -o 1.3.6.1.4.1.318.1.1.1.2.2.3.0 which returns the remaining battery time in milliseconds. Does anyone have a solution to either convert the return value, or be able to convert the value in the alert email? I can set my -w and -c values based on milliseconds if necessary, but I would like to have the alert email indicate how much battery time remains in an easily readable format (minutes).
I haven't been able to find anything covering this type of conversion in the KB or in the forums, but I'm hoping someone has some experience with this.
Thank you for your assistance.