Page 1 of 1

check_snmp_printer issue

Posted: Tue Apr 05, 2022 9:59 am
by duckmysick
Hi,

I don't know why my last post was deleted but no problem.
I used the plugin on this link: https://exchange.nagios.org//directory/ ... ck/details (the version 4).
So, all seems working nice but when it comes to verify consumables, there is no output (see the image).

The fact is when I run the command mannually it works fine...

Code: Select all


root@e5c92e1e3672:/opt/nagios/libexec# ./check_snmp_printer -H ipadress -C private -t "CONSUMX Black Toner, PN 006R01742;SN80094815A6070000"
Black Toner, PN 006R01742;SN80094815A6070000 is at 61% - OK!,| 'Black Toner, PN 006R01742;SN80094815A6070000'=61;20;5

Let me know, what is wrong and if you need other information please !

Re: check_snmp_printer issue

Posted: Tue Apr 05, 2022 1:30 pm
by gormank
You're testing as the root user which can be an issue. Try as nagios.
Unless you share the service definitions there's not much help we can provide.

Re: check_snmp_printer issue

Posted: Mon Apr 11, 2022 7:16 am
by duckmysick
gormank wrote:You're testing as the root user which can be an issue. Try as nagios.
Unless you share the service definitions there's not much help we can provide.

Sorry for this late answer. It works even with nagios user there is no problem. There is some issue with the plugin I guess.
I succeed to make nagios works by using another plugin for the infos I can't get with the first one. But see on the image, for this printer the consummables that I can monitor show in french... When all other, shows in english.. So I had to use my first plugin to monitor it with the exact name of consummable but I get the message "No output..."

Code: Select all

define service{
    use                     generic-service,graphed-service
    host_name               GNOR-PRTCE
    service_description     Drum cardridge
	notifications_enabled	0        
	check_command           check_snmp_printer!GedinorRO!"CONSUMX Module photor..cepteur, PN 101R00554;SN7B00770016090000"
}
this is the service...

Re: check_snmp_printer issue

Posted: Mon Apr 11, 2022 2:54 pm
by gormank
Try escaping the semicolon with \ or remove it.