check_snmp_printer stopped working after Ubuntu 16.04 upgrad
Posted: Fri Apr 26, 2019 8:53 am
My 4.2.4 Nagios implementation on Ubuntu 16.04 was working without issues. When I updated Ubuntu to 18.04, I had issues with the check_snmp_printer plugin (https://exchange.nagios.org/directory/P ... ck/details). Here is the entry in my command.cfg
#'check_snmp_printer' command definition
define command{
command_name check_snmp_printer
command_line $USER1$/check_snmp_printer -H $HOSTADDRESS$ -C $ARG1$ -t $ARG2$
}
I can run this command on the server
./check_snmp_printer -H x.x.x.x -x public -t "CONSUM TEST"
Consumables you may monitor:
Black Toner Cartridge
Drum Unit
But when I try to check the CONSUM, I receive the error:
./check_snmp_printer -H x.x.x.x -x public -t "CONSUM Black Toner Cartridge"
./check_snmp_printer: line 466: [: No Such Instance currently exists at this OID: integer expression expected
./check_snmp_printer: line 486: let: CURRENT_CAPACITY=No Such Instance currently exists at this OID * 100 / No Such Instance currently exists at this OID: syntax error in expression (error token is "Such Instance currently exists at this OID * 100 / No Such Instance currently exists at this OID")
No Such Instance currently exists at this OID is at 0% - CRITICAL!,| 'No Such Instance currently exists at this OID'=0;20;5
This is the same error that occurs on the web interface as well.
Any thoughts or suggestions? TIA
#'check_snmp_printer' command definition
define command{
command_name check_snmp_printer
command_line $USER1$/check_snmp_printer -H $HOSTADDRESS$ -C $ARG1$ -t $ARG2$
}
I can run this command on the server
./check_snmp_printer -H x.x.x.x -x public -t "CONSUM TEST"
Consumables you may monitor:
Black Toner Cartridge
Drum Unit
But when I try to check the CONSUM, I receive the error:
./check_snmp_printer -H x.x.x.x -x public -t "CONSUM Black Toner Cartridge"
./check_snmp_printer: line 466: [: No Such Instance currently exists at this OID: integer expression expected
./check_snmp_printer: line 486: let: CURRENT_CAPACITY=No Such Instance currently exists at this OID * 100 / No Such Instance currently exists at this OID: syntax error in expression (error token is "Such Instance currently exists at this OID * 100 / No Such Instance currently exists at this OID")
No Such Instance currently exists at this OID is at 0% - CRITICAL!,| 'No Such Instance currently exists at this OID'=0;20;5
This is the same error that occurs on the web interface as well.
Any thoughts or suggestions? TIA