I am trying to get this plugin working but I can't seem to get past this on the Service State Information page
Could not open input file: /check_hpjd_new.php
I have made sure php is set up. I checked the nagios permissions for the file. I restarted both the nagios and apache2 services. But I am out of clues as to how to get nagios to read the plugin
Could not open input file: /check_hpjd_new.php
Re: Could not open input file: /check_hpjd_new.php
Can you verify the permissions for us here please? Also can we see the service and command definitions using that plugin?
Former Nagios employee
Re: Could not open input file: /check_hpjd_new.php
Code: Select all
-rwxr-xr-x 1 nagios nagios 5556 Nov 27 14:19 check_hpjd_new.phpCode: Select all
define service{
use generic-service ; Inherit values from a template
host_name OutsideHPPrinter ; The name of the host the service is associated with
service_description Printer Status ; The service description
check_command check_hpjd_new!-C public ; The command used to monitor the service
normal_check_interval 10 ; Check the service every 10 minutes under normal conditions
retry_check_interval 1 ; Re-check the service every minute until its final/hard state is determined
} Code: Select all
define command{
command_name check_hpjd_new
command_line php $USER1$/check_hpjd_new.php $HOSTADDRESS$ public 10 5
}
Last edited by aford5 on Mon Mar 31, 2014 10:21 am, edited 1 time in total.
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Could not open input file: /check_hpjd_new.php
You are likely going to have to define a "-H" before the hostaddress as just about every other plugin uses, I suggest you take a look at how some other commands are defined which are ran directly from the nagios server. The command should look something like this:
And in the service:
Please use code wraps as I did above... Also, please attach the plugin you are using.
Code: Select all
command_line php $USER1$/check_hpjd_new.php -H $HOSTADDRESS$ $ARG1$And in the service:
Code: Select all
check_command check_hpjd_new!-C public -w 10 -c 5