check_snmp_printer No valid check type -t parameter

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
Lmac
Posts: 5
Joined: Tue Feb 28, 2017 3:02 pm

check_snmp_printer No valid check type -t parameter

Post by Lmac »

I am using this plugin https://exchange.nagios.org/directory/P ... ck/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!
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: check_snmp_printer No valid check type -t parameter

Post by tgriep »

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: Select all

check_command check_snmp_printer!public!MODEL!
And that should fix it for you.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Lmac
Posts: 5
Joined: Tue Feb 28, 2017 3:02 pm

Re: check_snmp_printer No valid check type -t parameter

Post by Lmac »

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'
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: check_snmp_printer No valid check type -t parameter

Post by cdienger »

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.
Lmac
Posts: 5
Joined: Tue Feb 28, 2017 3:02 pm

Re: check_snmp_printer No valid check type -t parameter

Post by Lmac »

Yes, this can be closed.

Thanks again!
Locked