I have seen this on a few other posts and tried what was listed there.
When I run the plugin on the cli everything comes back good.
when I run it as a scheduled check in XI I just get a Status (null)
[nagios@nagios1 libexec]$ ./SRS_check_rhev3 -H rhevm.cloud2 -f .authfile -R rhhva.cloud2 -l cpu
RHEV OK: cpu ok - 4% used (rhhva.cloud2.srs.local) |cpu=4%;60;80;0; cpu.current.user=1;;;0; cpu.current.system=2;;;0; cpu.current.idle=96;;;0;
This is the check_rhev3 plugin from the exchange, downloaded from git_hub. the SRS prefix is just a rename of the file for standardizing local usage. the command works the same with or without the rename.
there is already this at the top
#!/usr/bin/perl -w
# nagios: -epn
so it isn't trying to use the embedded perl.
Any thoughts?
Nagios XI 2012R1.3
Plugin executes on CLI not in XI
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Plugin executes on CLI not in XI
Can you provide a direct link to the plugin?
-
SRSPharmacy
- Posts: 8
- Joined: Fri Aug 10, 2012 10:29 am
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Plugin executes on CLI not in XI
Can you show us the command, and service definition for the check in question?
-
SRSPharmacy
- Posts: 8
- Joined: Fri Aug 10, 2012 10:29 am
Re: Plugin executes on CLI not in XI
command def.
define command {
command_name SRS_check_rhev_cpu_cloud2
command_line $USER1$/SRS_check_rhev3 -H rhevm.cloud2 -f .authfile -R rhhva.cloud2 -l cpu
}
###############################################################################
#
# Service configuration file
#
# Created by: Nagios QL Version 3.0.3
# Date: 2013-06-28 10:52:32
# Version: Nagios 3.x config file
#
# --- DO NOT EDIT THIS FILE BY HAND ---
# Nagios QL will overwite all manual settings during the next update
#
###############################################################################
define service {
host_name rhhva.cloud2.srs.local
service_description rhhva.cloud2 - CPU
use generic-service
display_name rhhva.cloud2 - CPU Utilization
check_command SRS_check_rhev_cpu_cloud2!!!!!!!!
register 1
}
define command {
command_name SRS_check_rhev_cpu_cloud2
command_line $USER1$/SRS_check_rhev3 -H rhevm.cloud2 -f .authfile -R rhhva.cloud2 -l cpu
}
###############################################################################
#
# Service configuration file
#
# Created by: Nagios QL Version 3.0.3
# Date: 2013-06-28 10:52:32
# Version: Nagios 3.x config file
#
# --- DO NOT EDIT THIS FILE BY HAND ---
# Nagios QL will overwite all manual settings during the next update
#
###############################################################################
define service {
host_name rhhva.cloud2.srs.local
service_description rhhva.cloud2 - CPU
use generic-service
display_name rhhva.cloud2 - CPU Utilization
check_command SRS_check_rhev_cpu_cloud2!!!!!!!!
register 1
}
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: Plugin executes on CLI not in XI
Where is this .authfile located? by default nagios sets the working directory as /home/nagios, so if it is in the libexec dir you might want to alter the flag to :
-f $USER1$/.authfile
edit: I should note that it might require a little escaping with the / in there, but hopefully not.
-f $USER1$/.authfile
edit: I should note that it might require a little escaping with the / in there, but hopefully not.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
-
SRSPharmacy
- Posts: 8
- Joined: Fri Aug 10, 2012 10:29 am
Re: Plugin executes on CLI not in XI
ah ha! That did it. Thanks!
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Plugin executes on CLI not in XI
Great! Closing as resolved.