NSClient 0.4.x compatability on Nagios core 3.5.x

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
rohithroki
Posts: 138
Joined: Mon Nov 30, 2015 6:12 am

Re: NSClient 0.4.x compatability on Nagios core 3.5.x

Post by rohithroki »

Hi dwhitfield,

Thanks for reply.

Now it's works for me .

I have executed the service called Memory and the output as shown and working fine.

Code: Select all

[root@nagios_test libexec]# ./check_ncpa.py -H <hostname> -t <my token> -M 'memory/virtual' -w 50 -c 60
OK: Used memory was 22.70 % (Available: 2.89 GiB, Total: 3.74 GiB, Free: 1.31 GiB, Used: 0.61 GiB) | 'available'=2.89GiB;50;60; 'total'=3.74GiB;50;60; 'free'=1.31GiB;50;60; 'used'=0.61GiB;50;60;
but when I tried to monitor the disk ( C: drive) I am getting the below error.

Code: Select all

[root@nagios_test libexec]# ./check_ncpa.py -H <hostname> -t <my token> -M disk/logical/C:|/used_percent -w 50 -c 60
-bash: /used_percent: No such file or directory
close failed in file object destructor:
Error in sys.excepthook:
Original exception was:

I tried all of possibilities by changing the arguments

-M 'disk/logical' -w 50 -c 60
-M 'disk/logical/ _/free'

Please help me out to solve the issue.

cheers,
Simbu
Last edited by dwhitfield on Fri Feb 02, 2018 2:04 pm, edited 2 times in total.
Reason: code blocks FTW
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: NSClient 0.4.x compatability on Nagios core 3.5.x

Post by npolovenko »

@rohithroki, Have you tried it like this:

Code: Select all

./check_ncpa.py <hostname> -t <my token> -M 'disk/logical/C:|/used_percent' --warning 50 --critical 60
You missed the single quotes in your command.

Take a look here:
https://support.nagios.com/kb/article/d ... percentage
And here for other checks:
https://support.nagios.com/kb/category.php?id=186
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
rohithroki
Posts: 138
Joined: Mon Nov 30, 2015 6:12 am

Re: NSClient 0.4.x compatability on Nagios core 3.5.x

Post by rohithroki »

Hi npolovenko,

Thanks for sharing the link and now it's working fine.

[root@nagios_test libexec]# ./check_ncpa.py -H <hostname> -t <my token> -M 'disk/logical/C:|' -w 50 -c 60 -u G
OK: Used disk space was 44.50 % (Used: 64.93 GB, Free: 81.10 GB, Total: 146.03 GB) | 'used'=64.93GB;50;60; 'free'=81.10GB;50;60; 'total'=146.03GB;50;60;

I need to monitor the ping check of the remote client.can you help me to monitor via NCPA agent.

cheers,
Simbu
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: NSClient 0.4.x compatability on Nagios core 3.5.x

Post by npolovenko »

@rohithroki, There's no built-in check ping command in NCPA. So you'd need to find a plugin or build your own that checks ping and run it with NCPA. Here's a tutorial on integrating external plugins with NCPA:
https://support.nagios.com/kb/article/n ... a-722.html
Usually, you can just run a check ping command from the Nagios Server without using any agent, unless the remote server is unreachable from the Nagios server.

Mod edit: Split topic to https://support.nagios.com/forum/viewto ... 79#p243979
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked