Service Status: (No output returned from plugin)
Service Status: (No output returned from plugin)
I am getting this error from a service in NagiosXI to monitor a remote host logfile usng the plugin check_logfiles with nrpe. When I define the same service using localhost(NagiosXI server) and without nrpe, the monitoring is fine.
The plugin is installed on both the NagiosXI server and the remote host and is in directory /usr/local/nagios/libexec. The plugin tested OK on both servers when run from command line without using nrpe.
Below is my command and service definition on NagiosXI to monitor the remote host logfile. I am using v2012r2.2 and both of my servers are rhel 6.4:
Commands Definition:
Command Name = check_logfiles
Command Line = $USER1$/check_logfiles $ARG1$
Command Type = check_command
Service Management Definition:
Config Name = test2
Description= test_logfile2
check_command = check_nrpe
*Command View = $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$
Arg1 = check_logfiles --config=/app/nagiosxi/config/logfiles/alerts/alerts1.cfg
Manage Host = fqdn of my remote host
Template = generic-service
Check Interval = 1
Check Period = 24x7
Notification Period = 24x7
Any assistance would be appreciated. I am trying to evaluate NagiosXI for potential purchase and use with my company. Thanks
The plugin is installed on both the NagiosXI server and the remote host and is in directory /usr/local/nagios/libexec. The plugin tested OK on both servers when run from command line without using nrpe.
Below is my command and service definition on NagiosXI to monitor the remote host logfile. I am using v2012r2.2 and both of my servers are rhel 6.4:
Commands Definition:
Command Name = check_logfiles
Command Line = $USER1$/check_logfiles $ARG1$
Command Type = check_command
Service Management Definition:
Config Name = test2
Description= test_logfile2
check_command = check_nrpe
*Command View = $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$
Arg1 = check_logfiles --config=/app/nagiosxi/config/logfiles/alerts/alerts1.cfg
Manage Host = fqdn of my remote host
Template = generic-service
Check Interval = 1
Check Period = 24x7
Notification Period = 24x7
Any assistance would be appreciated. I am trying to evaluate NagiosXI for potential purchase and use with my company. Thanks
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Service Status: (No output returned from plugin)
On remote system you will need to add the following to the nrpe.cfg
And then restart the nrpe daemon
On the XI server change $ARG1$ for the service to
Code: Select all
command[check_logfiles]=/usr/local/nagios/libexec/check_logfiles $ARG1$Code: Select all
service xinetd restartCode: Select all
check_logfiles -a '--config=/app/nagiosxi/config/logfiles/alerts/alerts1.cfg'Re: Service Status: (No output returned from plugin)
I already have the command definition in nrpe.cfg, and ffter restarting xinetd and modifying the $ARG1$ in the Service Config to
check_logfiles -a '--config=/app/nagiosxi/config/logfiles/alerts/alerts1.cfg' ...
I now get the error below:
UNKNOWN - can not load configuration file --config=/app/nagiosxi/config/logfiles/alerts/alerts1.cfg
*is the -a option a nrpe or check_logfiles option?
*Are the single quotes to be included in the definition?
*my check command value is still nrpe, correct?
Thanks
check_logfiles -a '--config=/app/nagiosxi/config/logfiles/alerts/alerts1.cfg' ...
I now get the error below:
UNKNOWN - can not load configuration file --config=/app/nagiosxi/config/logfiles/alerts/alerts1.cfg
*is the -a option a nrpe or check_logfiles option?
*Are the single quotes to be included in the definition?
*my check command value is still nrpe, correct?
Thanks
Re: Service Status: (No output returned from plugin)
the -a options is nrpe command argument. When NRPE executes the command everything after -a is added as an argument on the command line.*is the -a option a nrpe or check_logfiles option?
If you're running from the command line, it would be
Code: Select all
check_logfiles '--config=/app/nagiosxi/config/logfiles/alerts/alerts1.cfg'Yes, the single quotes ensure any spaces in the argument are used as spaces in the check command argument (not spaces in nrpe command)*Are the single quotes to be included in the definition?
Not sure what you're asking exactly...*my check command value is still nrpe, correct?
Re: Service Status: (No output returned from plugin)
The issue is the your dcdiag is not showing info about fsmo.
can you run the following
and post the output
-Yancy
can you run the following
Code: Select all
dcdiag /test:fsmocheck-Yancy
Re: Service Status: (No output returned from plugin)
Where is this command. I am usinng RHEL 6.4 servers. Do I run this from my NagiosXI server or the remote host?yancy wrote:The issue is the your dcdiag is not showing info about fsmo.
can you run the following
and post the outputCode: Select all
dcdiag /test:fsmocheck
-Yancy
Re: Service Status: (No output returned from plugin)
This is in the NagiosXI Service definiiton...see posts abooveyancy wrote:the -a options is nrpe command argument. When NRPE executes the command everything after -a is added as an argument on the command line.*is the -a option a nrpe or check_logfiles option?
Reason I asked is on your first post, looked like a check_logfiles option. If this is a nrpe option, where should I put this option in the Nagios XI Service GUI?
The nrpe command view looks like this:
$USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$
The $ARG$ is being used for check_logfiles. Can you tell me exactly what should be in the Service definition:
Check Command = ? (currently check_nrpe)
$ARG1$ = ? (currently check_logfiles -a '--config=/app/nagiosxi/config/logfiles/alerts/alerts1.cfg')
I also tried without the -a and did not work
If you're running from the command line, it would becan you test that from the command line? Can you post the contents of alerts1.cfg as that seems where the issue is.Code: Select all
check_logfiles '--config=/app/nagiosxi/config/logfiles/alerts/alerts1.cfg'
I run check_logfiles from command line and got the response I expected:
/usr/local/nagios/libexec/check_logfiles --config=/app/nagiosxi/config/logfiles/alerts/alerts1.cfg
OK - no errors or warnings|VPN_lines=0 VPN_warnings=0 VPN_criticals=0 VPN_unknowns=0
* I have also tested with errors on the logfile and check_logfiles detected it.
Contents of alerts1.cfg:
$scriptpath = '/usr/local/nagios/libexec:/usr/local/nagios/bin';
@searches = (
{
tag => 'VPN',
logfile => '/var/em/emalerts.log',
#rotation => 'HPUX',
criticalpatterns => [
'.*LINK_DOWN',
'.*error',
'.*problem'
],
warningpatterns => [
'.*Not Available',
],
#options => 'protocol,count'
#options => 'script',
#script => 'send_nsca',
#scriptparams => '-H $CL_NSCA_HOST_ADDRESS$ -p $CL_NSCA_PORT$ -to $CL_NSCA_TO_SEC$ -c $CL_NSCA_CONFIG_FILE$',
#scriptstdin => '$CL_HOSTNAME$\t$CL_SERVICEDESC$\t CL_SERVICESTATEID$\t$CL_SERVICEOUTPUT$\n',
},
);
Yes, the single quotes ensure any spaces in the argument are used as spaces in the check command argument (not spaces in nrpe command)*Are the single quotes to be included in the definition?
Not sure what you're asking exactly...*my check command value is still nrpe, correct?
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Service Status: (No output returned from plugin)
I am a bit confused what I you are trying to do.
disregarding Nagios for a minute, what are you trying to check with check_logfile? Have you been able to execute the command you want with this plugin on the windows server? If so what does the Windows command look like?
disregarding Nagios for a minute, what are you trying to check with check_logfile? Have you been able to execute the command you want with this plugin on the windows server? If so what does the Windows command look like?
Re: Service Status: (No output returned from plugin)
Firstly, I am running this on RHEL 6.4 and would like to monitor logfiles using the plugin check_logfiles. As I stated in my previous posts, It works with NagiosXI when monitoring logfile on local server(XI server) but not when using with NRPE to monitor logile on remote hosts.
Here is the command line and output:
[root@app-lab01 libexec]# /usr/local/nagios/libexec/check_logfiles --config /app/nagiosxi/config/logfiles/emalerts/emalerts1.cfg
OK - no errors or warnings|VPN_lines=0 VPN_warnings=0 VPN_criticals=0 VPN_unknowns=0
Here is the command line and output:
[root@app-lab01 libexec]# /usr/local/nagios/libexec/check_logfiles --config /app/nagiosxi/config/logfiles/emalerts/emalerts1.cfg
OK - no errors or warnings|VPN_lines=0 VPN_warnings=0 VPN_criticals=0 VPN_unknowns=0
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: Service Status: (No output returned from plugin)
Is that command being run via cli on the remote system or the nagios system? Along the same lines, is the /app/nagiosxi/config/logfiles/emalerts/emalerts1.cfg on the remote system and accessible via the nagios user?
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.