Page 1 of 2

Is there a plugin for APC UPS external temperature

Posted: Wed Oct 06, 2021 7:04 pm
by echonoc
Hi,

Do you know if there is a plugin that can monitor the external temperature. I am monitoring this in checkmk:

OK - APC Web/SNMP Management Card (MB:v4.1.0 PF:v6.5.0 PN:apc_hw05_aos_650.bin AF1:v6.5.0 AN1:apc_hw05_sumx_650.bin MN:AP9631 HR:08 SN: 5A1812T32523 MD:03/22/2018) (Embedded PowerNet SNMP Agent SW v2.2 compatible), SAC-UPS02, SACRAMENTO (TOP), Unknown

but now I need to monitor this in NagiosXI and I have not been able to find a plugin that monitor the external temperature.

Please let me know if someone has done this before. This is what i need:
Capture.PNG
Thanks

Re: Is there a plugin for APC UPS external temperature

Posted: Thu Oct 07, 2021 4:11 pm
by benjaminsmith
HI,

Looking over the Nagios Exchange, I did find a plugin that supports external temperature, please take a look at the specs.

https://exchange.nagios.org/directory/P ... ks/details
https://github.com/riskersen/Monitoring/tree/master/UPS

It supports the following hardware.

Code: Select all

For the three different types of UPS we use :
- APC (Smart UPS 3000 RM, 2200, 1500, 5000 and RT10000 XL)
- MGE (Merlin Guerin Pulsar Extreme 3000 VA)
- Powerware (PW9125)
If that works, the would be the best option, otherwise, using a generic SNMP check would be another.

Here's a guide on how to install and configure a plugin from the Nagios Exchange.

Third-Party Plugins in Nagios XI

Regards,
Benjamin

Re: Is there a plugin for APC UPS external temperature

Posted: Thu Oct 07, 2021 4:14 pm
by ssax
What is the full output of these commands from the XI server against the APC?

Code: Select all

snmpwalk -v2c -c 'yourcommunity' X.X.X.X 1.3.6.1.4.1.318.1.1.10.2.3.2.1.4
snmpwalk -v2c -c 'yourcommunity' X.X.X.X 1.3.6.1.4.1.318.1.1.10.2.3.2.1.5
snmpwalk -v2c -c 'yourcommunity' X.X.X.X 1.3.6.1.4.1.318.1.1.10.2.3.2.1.3
snmpwalk -v2c -c 'yourcommunity' X.X.X.X 1.3.6.1.4.1.318.1.1.10.2.3.2.1

Re: Is there a plugin for APC UPS external temperature

Posted: Fri Oct 08, 2021 2:40 pm
by echonoc
Hi
I've run the commands and this is the output:

Re: Is there a plugin for APC UPS external temperature

Posted: Fri Oct 08, 2021 2:48 pm
by echonoc
[quote="benjaminsmith"]

I've downloaded the pluging but it is not working, this is the output. It is sending errors and at the end shows the checks but there is not anyone related to external temperature



given is experimental at ./check_ups_apc.pl line 383.
when is experimental at ./check_ups_apc.pl line 384.
when is experimental at ./check_ups_apc.pl line 388.
when is experimental at ./check_ups_apc.pl line 392.
given is experimental at ./check_ups_apc.pl line 401.
when is experimental at ./check_ups_apc.pl line 402.
when is experimental at ./check_ups_apc.pl line 403.
when is experimental at ./check_ups_apc.pl line 407.
when is experimental at ./check_ups_apc.pl line 411.
given is experimental at ./check_ups_apc.pl line 422.
when is experimental at ./check_ups_apc.pl line 423.
when is experimental at ./check_ups_apc.pl line 428.
when is experimental at ./check_ups_apc.pl line 433.
given is experimental at ./check_ups_apc.pl line 445.
when is experimental at ./check_ups_apc.pl line 446.
when is experimental at ./check_ups_apc.pl line 451.
when is experimental at ./check_ups_apc.pl line 456.
given is experimental at ./check_ups_apc.pl line 469.
when is experimental at ./check_ups_apc.pl line 470.
when is experimental at ./check_ups_apc.pl line 475.
when is experimental at ./check_ups_apc.pl line 480.
given is experimental at ./check_ups_apc.pl line 512.
when is experimental at ./check_ups_apc.pl line 513.
when is experimental at ./check_ups_apc.pl line 517.
OK - Smart-UPS SRT 1500 - BATTERY CAPACITY 100% - STATUS NORMAL - OUTPUT LOAD 35% - BATT TEMP 30 C - 23 MINUTES REMAINING
FIRMWARE: UPS 07.1 (ID1019) - MANUFACTURE DATE: 12/02/2017 - SERIAL: AS1748195264|'load'=35%;70;80;; 'temp'=30;31;33;; 'remaining_sec'=1380s;900;300;0;

Re: Is there a plugin for APC UPS external temperature

Posted: Mon Oct 11, 2021 3:15 pm
by benjaminsmith
HI,

That's strange, not quite sure on that output. The OID for the temperature check is 1.3.6.1.4.1.318.1.1.10.2.3.2.1.4. You'll find that listed on the following page:

APC UPS Temperature service

I found another plugin on the Nagios Exchange to test at it contains the OID's for APC.

SNMP UPS Check

If it fails, please post the full check command and output as run from the CLI so we can review the arguments and error output.

Thanks, Benjamin

If that doesn't work, then the other option is to setup a generic snmp checking using the SNMP wizard in Nagios XI.

Re: Is there a plugin for APC UPS external temperature

Posted: Mon Oct 11, 2021 5:31 pm
by ssax
Try this one here (extract it, go into the APC directory, it's called check_apc_temp):

https://github.com/48kRAM/nagios-plugins/releases

Upload it in Admin > Manage Plugins.

Then send the output of these commands:
- Change X.X.X.X to the APC IP
- Change yourcommunity

Code: Select all

/usr/local/nagios/libexec/check_apc_temp -H X.X.X.X -C 'yourcommunity' -w 70 -c 80 -v
/usr/local/nagios/libexec/check_apc_temp -H X.X.X.X -C 'yourcommunity' -w 70 -c 80 -p 1 -v
/usr/local/nagios/libexec/check_apc_temp -H X.X.X.X -C 'yourcommunity' -w 70 -c 80 -p 2 -v
/usr/local/nagios/libexec/check_apc_temp -H X.X.X.X -C 'yourcommunity' -w 70 -c 80 -p 3 -v

Re: Is there a plugin for APC UPS external temperature

Posted: Wed Oct 20, 2021 10:37 am
by echonoc
benjaminsmith wrote:HI,

That's strange, not quite sure on that output. The OID for the temperature check is 1.3.6.1.4.1.318.1.1.10.2.3.2.1.4. You'll find that listed on the following page:

APC UPS Temperature service

I found another plugin on the Nagios Exchange to test at it contains the OID's for APC.

SNMP UPS Check

If it fails, please post the full check command and output as run from the CLI so we can review the arguments and error output.

Thanks, Benjamin

If that doesn't work, then the other option is to setup a generic snmp checking using the SNMP wizard in Nagios XI.
Hi Benjamin,
I've run the pluging "check_ups_snmp" on my server and this i the output:

$ ./check_ups_snmp
./check_ups_snmp: line 204: syntax error near unexpected token `then'
./check_ups_snmp: line 204: ` NUMBER_ALARMS=`get_snmp $OID_upsAlarmsPresent` check_snmp_error "$?" "$NUMBER_ALARMS" if [[ $NUMBER_ALARMS -eq 0 ]]; then OUTPUT="No alarms present." '

I do not what should I change in the plugin or if this plugn is not working

Re: Is there a plugin for APC UPS external temperature

Posted: Wed Oct 20, 2021 12:03 pm
by echonoc
ssax wrote:Try this one here (extract it, go into the APC directory, it's called check_apc_temp):

https://github.com/48kRAM/nagios-plugins/releases

Upload it in Admin > Manage Plugins.

Then send the output of these commands:
- Change X.X.X.X to the APC IP
- Change yourcommunity

Code: Select all

/usr/local/nagios/libexec/check_apc_temp -H X.X.X.X -C 'yourcommunity' -w 70 -c 80 -v
/usr/local/nagios/libexec/check_apc_temp -H X.X.X.X -C 'yourcommunity' -w 70 -c 80 -p 1 -v
/usr/local/nagios/libexec/check_apc_temp -H X.X.X.X -C 'yourcommunity' -w 70 -c 80 -p 2 -v
/usr/local/nagios/libexec/check_apc_temp -H X.X.X.X -C 'yourcommunity' -w 70 -c 80 -p 3 -v
Hi ssax,
I've run the command but i am getting this error:

./check_apc_temp -H XXXXXX -C XXXXXXXX -c 80 -v
Can't find string terminator "EOH" anywhere before EOF at ./check_apc_temp line 18.

This is the script:
Script apc temp.PNG
I do not know what to change

Re: Is there a plugin for APC UPS external temperature

Posted: Wed Oct 20, 2021 5:32 pm
by ssax
I may be a copy/paste error because I did not get either of those errors and your screenshot makes it look like that's the problem. Please run these commands to download, configure, and test the plugins against your APC:

check_apc_temp

Code: Select all

cd /usr/local/nagios/libexec/
wget https://raw.githubusercontent.com/48kRAM/nagios-plugins/master/APC/check_apc_temp
chown nagios.nagios /usr/local/nagios/libexec/check_apc_temp
chmod ug+x /usr/local/nagios/libexec/check_apc_temp
./check_apc_temp -H X.X.X.X -C 'yourcommunity' -w 75 -c 95
check_ups_snmp

Code: Select all

cd /usr/local/nagios/libexec/
wget 'https://exchange.nagios.org/components/com_mtree/attachment.php?link_id=6756&cf_id=24' -O check_ups_snmp
chown nagios.nagios /usr/local/nagios/libexec/check_ups_snmp
chmod ug+x /usr/local/nagios/libexec/check_ups_snmp
./check_ups_snmp -H X.X.X.X -t alarm -C 'yourcommunity' -w 1 -c 2