UPS battery lifetime alert

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: UPS battery lifetime alert

Post by dwhitfield »

What do you mean that the replacement date was too old? Also, what do you mean in both cases? I thought the UPS GUI was showing it replaced.
avandemore
Posts: 1597
Joined: Tue Sep 27, 2016 4:57 pm

Re: UPS battery lifetime alert

Post by avandemore »

sa77if wrote:is this fine?

***** Nagios *****

Notification Type: PROBLEM

Service: Check UPS Battery LifeTime
Host: SmartUPS 2200B
Address: 192.168.0.7
State: CRITICAL

Date/Time: Fri Nov 4 11:04:40 PDT 2016

Additional Info:

SNMP CRITICAL - Battery LifeTime *60000*
I am very confused, that is polling an integer value.
after replacing the old batteries i logged into the UPS and changed the date to the replacement date but still getting the warning with the same values
Why do you expect changing a date on your appliance GUI is going to effect the OID value? Your alert is from that OID value, not on some date. If you expect that OID value to change after your process and it isn't, that is a question for your device manufacturer. Nagios can only act on the information it is given.
Previous Nagios employee
tgrtjake
Posts: 20
Joined: Thu Sep 25, 2014 10:35 am

Re: UPS battery lifetime alert

Post by tgrtjake »

Looking at https://exchange.nagios.org/directory/P ... ad/details I can see that "Battery LifeTime" is actually upsAdvBatteryRunTimeRemaining .1.3.6.1.4.1.318.1.1.1.2.2.3.0.

If you are looking for an alert as to when the batteries are needing replacement then this is not the correct OID. Is that what you are looking for?
Nagios Core 4.1.1 running on Ubuntu 14.04
sa77if
Posts: 35
Joined: Fri Oct 07, 2016 5:55 pm

Re: UPS battery lifetime alert

Post by sa77if »

this is what i mean about UPS GUI
Attachments
UPS GUI
UPS GUI
sa77if
Posts: 35
Joined: Fri Oct 07, 2016 5:55 pm

Re: UPS battery lifetime alert

Post by sa77if »

i think i got you now, the nagios is pulling the results from the UPS so it need to be changed there
maybe i need to restart the UPS after changing batteries to make it send the right reading to nagios
right?
tgrtjake
Posts: 20
Joined: Thu Sep 25, 2014 10:35 am

Re: UPS battery lifetime alert

Post by tgrtjake »

You are going to get a warning and critical for sure because this OID is for battery run time remaining.
sa77if wrote:sorry just found it at another folder

Code: Select all

# 'snmp_ups_stat' command definition
define command{
        command_name    snmp_ups_stat
        command_line    $USER1$/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o .1.3.6.1.4.1.318.1.1.1.2.2.3.0 -w 3 -c 4 -l 'Battery LifeTime'
        }

Below you gave us the alert and output of the OID. It returned a critical with 60000. That is telling you that there is 10 minutes of battery run time remaining.
sa77if wrote: ***** Nagios *****

Notification Type: PROBLEM

Service: Check UPS Battery LifeTime
Host: SmartUPS 2200B
Address: 192.168.0.7
State: CRITICAL

Date/Time: Fri Nov 4 11:04:40 PDT 2016

Additional Info:

SNMP CRITICAL - Battery LifeTime *60000*
Nagios Core 4.1.1 running on Ubuntu 14.04
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: UPS battery lifetime alert

Post by rkennedy »

Thank you for clarifying the OID's through this @tgrtjake!

@sa77if - let me know if you have any further questions.
Former Nagios Employee
sa77if
Posts: 35
Joined: Fri Oct 07, 2016 5:55 pm

Re: UPS battery lifetime alert

Post by sa77if »

so its not the battery lifetime that warn for replacing
its the one that warn for remaining charge
ok, how can raise the values to reduce warnings like that, because i am on AC its not important to have 10m or 5m
tgrtjake
Posts: 20
Joined: Thu Sep 25, 2014 10:35 am

Re: UPS battery lifetime alert

Post by tgrtjake »

sa77if wrote:so its not the battery lifetime that warn for replacing
its the one that warn for remaining charge
ok, how can raise the values to reduce warnings like that, because i am on AC its not important to have 10m or 5m
Yes, you'll need to change the -c and -w to something like this. Also, if I were you I'd change the name to Battery RunTime.

I think with your current setup being 10 min run time you would maybe want to warn at 5 mins and crit at 3 mins? 6000 = 1 min

Code: Select all

# 'snmp_ups_stat' command definition
define command{
        command_name    snmp_ups_stat
        command_line    $USER1$/check_snmp -H $HOSTADDRESS$ -C $ARG1$ -o .1.3.6.1.4.1.318.1.1.1.2.2.3.0 -w 30000 -c 18000 -l 'Battery RunTime'
        }
Sorry, edits for correct timings
Nagios Core 4.1.1 running on Ubuntu 14.04
sa77if
Posts: 35
Joined: Fri Oct 07, 2016 5:55 pm

Re: UPS battery lifetime alert

Post by sa77if »

thanks @tgrtjake
i will do it
thank you all for your patent with me appreciate that
Locked