Custom Plugin not returning output
Posted: Thu Jun 20, 2013 10:16 am
I am attempting to get a custom plugin that I pulled of github set up and working and seem to be running into some issues. The plugin basically hits a webpage from the nagios server logs in to cas and verify it gets a cas ticket back.
This was all created through Nagios XI 2012R1.8,
I downloaded and installed the plugin on my nagios server.
figured out how to run the plugin from the command line
# perl '/usr/local/nagios/libexec/check_cas.pl' -H prod-cas-vip.bowdoin.edu -p 443 -u "/cas-web/login" -r "Success"
# OK - CAS authentication successful
I defined a command
define command {
command_name check_cas.pl
command_line perl '$USER1$/check_cas.pl' -H $ARG1$ -p $ARG2$ -u $ARG3$ -r $ARG4$
}
Then Created a service
define service {
host_name prod-cas-vip.bowdoin.edu
service_description Confirms that a cas ticket can be obtained
use generic-service
display_name Check CAS
servicegroups Prod-CAS Group
check_command check_cas.pl!prod-cas-vip.bowdoin.edu!443!"/cas-web/login"!"Success"!!!!
max_check_attempts 5
check_interval 5
retry_interval 2
active_checks_enabled 1
check_period 24x7
notification_period 24x7
contacts mbowden
register 1
}
When I run the "Test Commmand" I get the following
COMMAND: perl '/usr/local/nagios/libexec/check_cas.pl' -H prod-cas-vip.bowdoin.edu -p 443 -u "/cas-web/login" -r "Success"
OUTPUT:
Yet if I run it from the command line on the nagios server it runs fine, returning the desired output.
any thoughts, on where I made my noob mistake this time
This was all created through Nagios XI 2012R1.8,
I downloaded and installed the plugin on my nagios server.
figured out how to run the plugin from the command line
# perl '/usr/local/nagios/libexec/check_cas.pl' -H prod-cas-vip.bowdoin.edu -p 443 -u "/cas-web/login" -r "Success"
# OK - CAS authentication successful
I defined a command
define command {
command_name check_cas.pl
command_line perl '$USER1$/check_cas.pl' -H $ARG1$ -p $ARG2$ -u $ARG3$ -r $ARG4$
}
Then Created a service
define service {
host_name prod-cas-vip.bowdoin.edu
service_description Confirms that a cas ticket can be obtained
use generic-service
display_name Check CAS
servicegroups Prod-CAS Group
check_command check_cas.pl!prod-cas-vip.bowdoin.edu!443!"/cas-web/login"!"Success"!!!!
max_check_attempts 5
check_interval 5
retry_interval 2
active_checks_enabled 1
check_period 24x7
notification_period 24x7
contacts mbowden
register 1
}
When I run the "Test Commmand" I get the following
COMMAND: perl '/usr/local/nagios/libexec/check_cas.pl' -H prod-cas-vip.bowdoin.edu -p 443 -u "/cas-web/login" -r "Success"
OUTPUT:
Yet if I run it from the command line on the nagios server it runs fine, returning the desired output.
any thoughts, on where I made my noob mistake this time