Page 2 of 3
Re: How to tweak the metrics for number of files?
Posted: Fri Jul 13, 2018 5:02 am
by linearstack
While performing the NSCA setup on the server and NSClient++ on the host, I'm stuck as it's not communicating.
For NSCA Configuration on the Cent OS server I used the following link:
https://support.nagios.com/kb/article/n ... -x-79.html
During the installation of the NSCA I stuck on the following commands as it overwrites the previous files :
------------------------------------------------------------------------------------
cp src/nsca /usr/local/nagios/bin
cp sample-config/nsca.cfg /usr/local/nagios/etc
chown nagios.nagcmd /usr/local/nagios/etc/nsca.cfg
chmod g+r /usr/local/nagios/etc/nsca.cfg
cp src/send_nsca /usr/local/nagios/libexec
cp sample-config/send_nsca.cfg /usr/local/nagios/etc
cp sample-config/nsca.xinetd /etc/xinetd.d/nsca
------------------------------------------------------------------------------------
For Installing The Windows Agent NSClient++ on the host I used the following link :
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
Kindly let me know where I'm lacking.
Re: How to tweak the metrics for number of files?
Posted: Fri Jul 13, 2018 11:07 am
by jomann
You don't actually have to install NSCA - which is installed on Nagios XI already by default, and can be configured in the Inbound Transfer settings in the Admin section - to do what @lmiltchev mentioned earlier in this post. You just need to install NSClient++ and then setup the check to run using check_nrpe (which can be done using the NRPE wizard and selecting Windows on step 1 also).
Re: How to tweak the metrics for number of files?
Posted: Mon Jul 16, 2018 11:56 am
by linearstack
Hello,
I tried the steps provided by you, but the command is not generating any output.
And it is also not giving any error.
Is it something missing?
Re: How to tweak the metrics for number of files?
Posted: Mon Jul 16, 2018 2:25 pm
by lmiltchev
I tried the steps provided by you, but the command is not generating any output.
Can you show us the actual command run from the command line on the Nagios Xi server, along with the output of it?
Also run:
Code: Select all
/usr/local/nagios/libexec/check_nrpe -H <Windows IP>
and show the output.
Please post the
nsclient.ini and
nsclient.log from the Windows server.
Re: How to tweak the metrics for number of files?
Posted: Tue Jul 17, 2018 12:40 am
by linearstack
I tried the command as per the instructions provided :
**********************************
[root@LABLINNIX01 ~]# /usr/local/nagios/libexec/check_nrpe -H 192.168.101.141 -c check_count -a '-p C:\Test -r -w 3 -c 6'
Exception processing request: Request contained arguments (not currently allowed, check the allow arguments option).
[root@LABLINNIX01 ~]#
**********************************
But it generated the above error. But if I run the command as :
**********************************
[root@LABLINNIX01 ~]# /usr/local/nagios/libexec/check_nrpe -H 192.168.101.141 -c check_count -a path=’C:\\Test’ ’warning=count>3’ ’critical=count>6’
[root@LABLINNIX01 ~]#
**********************************
This command didn't give any error but do not generate any output.
And the command you asked to run now has the following output:
**********************************
[root@LABLINNIX01 ~]# /usr/local/nagios/libexec/check_nrpe -H 192.168.101.141
I (0.4.4.23 2016-04-05) seem to be doing fine...
[root@LABLINNIX01 ~]#
**********************************
Please find the attached nsclient.ini file and nsclient.log file
Re: How to tweak the metrics for number of files?
Posted: Tue Jul 17, 2018 8:45 am
by mcapra
Please see this NSClient++ community thread for the solution:
https://forums.nsclient.org/t/arguments ... shell/3456
http://docs.nsclient.org/howto/external ... #arguments
There are a few configuration directives in your NSClient++ configuration file that may need to be set (depending on your NSClient++ version) in order for NSClient++ to allow args to be passed from check_nrpe.
The first 2 that come to mind:
Code: Select all
[/settings/NRPE/server]
allow arguments=true
[/settings/external scripts]
allow arguments=true
Re: How to tweak the metrics for number of files?
Posted: Tue Jul 17, 2018 9:11 am
by lmiltchev
@linearstack, let us know if allowing arguments under the [/settings/NRPE/server] and [/settings/external scripts] sections solved your problem.
Re: How to tweak the metrics for number of files?
Posted: Wed Jul 18, 2018 1:45 am
by linearstack
Even after allowing the arguments in the under the [/settings/NRPE/server] and [/settings/external scripts] sections didn't solved the problem.
When tried to run the command it run witout any error but doesn't give any output
Following is the command after allowing the arguments :
**************************************************
[root@LABLINNIX01 ~]# /usr/local/nagios/libexec/check_nrpe -H 192.168.101.141 -c check_count -a path=’C:\\Test’ ’warning=count>3’ ’critical=count>6’
[root@LABLINNIX01 ~]# /usr/local/nagios/libexec/check_nrpe -H 192.168.101.141 -c check_count -a path=’C:\Test’ ’warning=count>3’ ’critical=count>6’
[root@LABLINNIX01 ~]#
**************************************************
Re: How to tweak the metrics for number of files?
Posted: Wed Jul 18, 2018 9:09 am
by lmiltchev
In the example I showed you some time ago, I wrapped the arguments in single quotes, e.g.
as the way the command is defined, it expects only 1 argument... Also, don't use ">" for thresholds.
Instead of running this:
Code: Select all
/usr/local/nagios/libexec/check_nrpe -H 192.168.101.141 -c check_count -a path=’C:\\Test’ ’warning=count>3’ ’critical=count>6’
try running this:
Code: Select all
/usr/local/nagios/libexec/check_nrpe -H 192.168.101.141 -c check_count -a 'p C:\Test -r -w 3 -c 6'
Re: How to tweak the metrics for number of files?
Posted: Fri Jul 20, 2018 2:44 am
by linearstack
Hello,
I am somehow now stuck on another message : ssl_err !=5
Please find the example :
******************************************************************************************
[root@LABLINNIX01 ~]# /usr/local/nagios/libexec/check_nrpe -H 192.168.101.141 -c check_count -a 'p C:\Test -r -w 3 -c 6'
CHECK_NRPE: (ssl_err != 5) Error - Could not complete SSL handshake with 192.168.101.141: 1
[root@LABLINNIX01 ~]# /usr/local/nagios/libexec/check_nrpe -H 192.168.101.141
CHECK_NRPE: (ssl_err != 5) Error - Could not complete SSL handshake with 192.168.101.141: 1
[root@LABLINNIX01 ~]#
******************************************************************************************
I tried to ping the 192.168.101.141 from 192.168.101.142(Nagios server) and vice versa and it is pinging fine.