How to tweak the metrics for number of files?
-
linearstack
- Posts: 26
- Joined: Tue Nov 07, 2017 7:35 pm
Re: How to tweak the metrics for number of files?
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.
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?
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).
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
-
linearstack
- Posts: 26
- Joined: Tue Nov 07, 2017 7:35 pm
Re: How to tweak the metrics for number of files?
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?
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?
Can you show us the actual command run from the command line on the Nagios Xi server, along with the output of it?I tried the steps provided by you, but the command is not generating any output.
Also run:
Code: Select all
/usr/local/nagios/libexec/check_nrpe -H <Windows IP>Please post the nsclient.ini and nsclient.log from the Windows server.
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
linearstack
- Posts: 26
- Joined: Tue Nov 07, 2017 7:35 pm
Re: How to tweak the metrics for number of files?
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
**********************************
[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
You do not have the required permissions to view the files attached to this post.
Re: How to tweak the metrics for number of files?
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:
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
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/
Re: How to tweak the metrics for number of files?
@linearstack, let us know if allowing arguments under the [/settings/NRPE/server] and [/settings/external scripts] sections solved your problem.
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
linearstack
- Posts: 26
- Joined: Tue Nov 07, 2017 7:35 pm
Re: How to tweak the metrics for number of files?
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 ~]#
**************************************************
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?
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:
try running this:
Code: Select all
-a '<my arguments>'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’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'Be sure to check out our Knowledgebase for helpful articles and solutions!
-
linearstack
- Posts: 26
- Joined: Tue Nov 07, 2017 7:35 pm
Re: How to tweak the metrics for number of files?
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.
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.