check_snmp_printer issue

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.
Locked
duckmysick
Posts: 2
Joined: Tue Apr 05, 2022 8:58 am

check_snmp_printer issue

Post 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 !
Attachments
Capture d’écran 2022-04-05 160635.png
gormank
Posts: 1114
Joined: Tue Dec 02, 2014 12:00 pm

Re: check_snmp_printer issue

Post 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.
duckmysick
Posts: 2
Joined: Tue Apr 05, 2022 8:58 am

Re: check_snmp_printer issue

Post 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...
Attachments
Capture d’écran 2022-04-11 141129.png
gormank
Posts: 1114
Joined: Tue Dec 02, 2014 12:00 pm

Re: check_snmp_printer issue

Post by gormank »

Try escaping the semicolon with \ or remove it.
Locked