check_snmp_printer No valid check type -t parameter

This forum is intended for the discussion of Nagios Core development. Feature requests, patches, bug fixes, and all types of development-related discussions are welcome!

NOTE: The SourceForge.net nagios-devel mailing list has been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

check_snmp_printer No valid check type -t parameter

Postby Lmac » Fri Mar 24, 2017 8:41 am

I am using this plugin https://exchange.nagios.org/directory/Plugins/Hardware/Printers/SNMP-Printer-Check/details to get service details for a HPLJ4560. When I run the plugin from the command line, it works fine, but once I add it in the cfg files, I receive the message "No valid check type specified to -t parameter". I must be passing the parameters incorrectly, but nothing I have tried so far has worked. I've tried using " ", no quotes and tried defining a different separator with on luck.

./check_snmp_printer -H 10.x.x.xx -C public -t "CONSUM Image Fuser Kit"
Image Fuser Kit HP 110V-Q3676A, 220V-Q3677A is at 27% - OK!,| 'Image Fuser Kit HP 110V-Q3676A, 220V-Q3677A'=27;20;5

./check_snmp_printer -H 10.x.x.xxx -C public -t "MODEL"
hp color LaserJet 4650, Serial # JPDAC02294

#'check_snmp_printer' command definition
define command{
command_name check_snmp_printer
command_line $USER1$/check_snmp_printer -H $HOSTADDRESS$ -C $ARG1$ -t $ARG2$
}

define service{
use generic-service ; Inherit values from a template
host_name HP29 ; The name of the host the service is associated with
service_description Image Transfer Kit ; The service description
check_command check_snmp_printer!10.xx.x.xxx!public!'CONSUM,Image Fuser Kit' ; The command used to monitor t$
normal_check_interval 60 ; Check the service every 60 minutes under normal conditions
retry_check_interval 1 ; Re-check the service every minute until its final/hard state is determined
}


define service{
use generic-service ; Inherit values from a template
host_name HP29 ; The name of the host the service is associated with
service_description Model ; The service description
check_command check_snmp_printer!10.xx.x.xxx!public!'MODEL' ; The command used to monitor t$
normal_check_interval 60 ; Check the service every 60 minutes under normal conditions
retry_check_interval 1 ; Re-check the service every minute until its final/hard state is determined
}


I'm running Ubuntu 16.04 nagios 4.2.2
Thanks in advance!
Lmac
 
Posts: 5
Joined: Tue Feb 28, 2017 3:02 pm

Re: check_snmp_printer No valid check type -t parameter

Postby tgriep » Fri Mar 24, 2017 10:58 am

You don't need to specify the IP address of the host on the arguments, the $HOSTADDRESS$ macro will take care of that for you.
Edit your service check and change this from
Code: Select all
check_command check_snmp_printer!10.xx.x.xxx!public!'MODEL' ; The command used to monitor t$

to
[code]check_command check_snmp_printer!public!MODEL!
And that should fix it for you.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
tgriep
Madmin
 
Posts: 6884
Joined: Thu Oct 30, 2014 9:02 am

Re: check_snmp_printer No valid check type -t parameter

Postby Lmac » Fri Mar 24, 2017 11:23 am

Thank you very much! That did the trick!

FWIW I had to make changes to the other command as well, in case anyone else has this issue.

check_command check_snmp_printer!public!'CONSUM Image Fuser Kit'
Lmac
 
Posts: 5
Joined: Tue Feb 28, 2017 3:02 pm

Re: check_snmp_printer No valid check type -t parameter

Postby cdienger » Fri Mar 24, 2017 11:46 am

Thanks for the update! Are we safe to assume this can be closed or do you have any related questions?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
cdienger
Support Tech
 
Posts: 1677
Joined: Tue Feb 07, 2017 11:26 am

Re: check_snmp_printer No valid check type -t parameter

Postby Lmac » Mon Mar 27, 2017 8:25 am

Yes, this can be closed.

Thanks again!
Lmac
 
Posts: 5
Joined: Tue Feb 28, 2017 3:02 pm


Return to Nagios Core Development

Who is online

Users browsing this forum: No registered users and 5 guests