Service Status: (No output returned from plugin)

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
logan428
Posts: 7
Joined: Wed Jul 24, 2013 6:49 pm

Service Status: (No output returned from plugin)

Post by logan428 »

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
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)

Post by scottwilkerson »

On remote system you will need to add the following to the nrpe.cfg

Code: Select all

command[check_logfiles]=/usr/local/nagios/libexec/check_logfiles $ARG1$
And then restart the nrpe daemon

Code: Select all

service xinetd restart
On the XI server change $ARG1$ for the service to

Code: Select all

check_logfiles -a '--config=/app/nagiosxi/config/logfiles/alerts/alerts1.cfg'
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
logan428
Posts: 7
Joined: Wed Jul 24, 2013 6:49 pm

Re: Service Status: (No output returned from plugin)

Post by logan428 »

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
yancy
Posts: 523
Joined: Thu Oct 06, 2011 10:12 am

Re: Service Status: (No output returned from plugin)

Post by yancy »

*is the -a option a nrpe or check_logfiles option?
the -a options is nrpe command argument. When NRPE executes the command everything after -a is added as an argument on the command line.


If you're running from the command line, it would be

Code: Select all

check_logfiles  '--config=/app/nagiosxi/config/logfiles/alerts/alerts1.cfg'
can you test that from the command line? Can you post the contents of alerts1.cfg as that seems where the issue is.

*Are the single quotes to be included in the definition?
Yes, the single quotes ensure any spaces in the argument are used as spaces in the check command argument (not spaces in nrpe command)
*my check command value is still nrpe, correct?
Not sure what you're asking exactly...
yancy
Posts: 523
Joined: Thu Oct 06, 2011 10:12 am

Re: Service Status: (No output returned from plugin)

Post by yancy »

The issue is the your dcdiag is not showing info about fsmo.

can you run the following

Code: Select all

dcdiag /test:fsmocheck
and post the output

-Yancy
logan428
Posts: 7
Joined: Wed Jul 24, 2013 6:49 pm

Re: Service Status: (No output returned from plugin)

Post by logan428 »

yancy wrote:The issue is the your dcdiag is not showing info about fsmo.

can you run the following

Code: Select all

dcdiag /test:fsmocheck
and post the output

-Yancy
Where is this command. I am usinng RHEL 6.4 servers. Do I run this from my NagiosXI server or the remote host?
logan428
Posts: 7
Joined: Wed Jul 24, 2013 6:49 pm

Re: Service Status: (No output returned from plugin)

Post by logan428 »

yancy wrote:
*is the -a option a nrpe or check_logfiles option?
the -a options is nrpe command argument. When NRPE executes the command everything after -a is added as an argument on the command line.

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 be

Code: Select all

check_logfiles  '--config=/app/nagiosxi/config/logfiles/alerts/alerts1.cfg'
can you test that from the command line? Can you post the contents of alerts1.cfg as that seems where the issue is.
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',
},
);

*Are the single quotes to be included in the definition?
Yes, the single quotes ensure any spaces in the argument are used as spaces in the check command argument (not spaces in nrpe command)
*my check command value is still nrpe, correct?
Not sure what you're asking exactly...
This is in the NagiosXI Service definiiton...see posts aboove
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)

Post by scottwilkerson »

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?
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
logan428
Posts: 7
Joined: Wed Jul 24, 2013 6:49 pm

Re: Service Status: (No output returned from plugin)

Post by logan428 »

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
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Service Status: (No output returned from plugin)

Post by sreinhardt »

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.
Locked