Check_nt performance counter

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.
Locked
SwimmingFish849
Posts: 7
Joined: Wed Sep 12, 2018 8:01 am

Check_nt performance counter

Post by SwimmingFish849 »

Hi,
I have a check running to get the free disk space on a server which works fine, i then push this into Grafana and it all comes through with no problems
I'm wondering how i would go about changing the performance data that is collected though, at the moment it collects the used disk space but ideally i would want to to collect the free disk space

This is the data that shows in Nagios:
Status Information: c: - total: 119.66 Gb - used: 18.99 Gb (16%) - free 100.67 Gb (84%)
Performance Data: 'c:\ Used Space'=18.99Gb;101.71;113.67;0.00;119.66

The command that runs is:
define command{
command_name check_nt
command_line $USER1$/check_nt -H $HOSTADDRESS$ -p 12489 -v $ARG1$ $ARG2$
}

The check that runs is:
define service{
use generic-service
host_name FS01
service_description C:\ System Drive Space
check_command check_nt!USEDDISKSPACE!-l c -w 85 -c 95
}

The data i'm seeing being collected by Nagios is:
"metrics,command=check_nt,crit-fill=none,host=FS01,performanceLabel=c:\\\\ Used\\ Space,service=C:\\\\ System\\ Drive\\ Space,unit=Gb,warn-fill=none"

Any help on what I would need to change would be really appreciated

Thanks :)
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Check_nt performance counter

Post by npolovenko »

Hello, @SwimmingFish849. According to this article, the "check_nt" only supports percentage values for used disk space.
https://support.nagios.com/kb/article/d ... s-770.html

Have you considered activating the nrpe portion of the NSClient and running the nrpe check instead?
./check_nrpe -H 10.25.11.3 -c check_drivesize -a drive=C: 'warning=free<20%' 'critical=free<10%' show-all 'perf-config=*(unit:G)' detail-syntax='{${drive_or_name} ${free_pct}% free / ${size} total}' top-syntax='${status}: ${problem_list}'
OK: {C: 68% free / 99.51GB total}|'C: free'=68.09949G;19.90195;9.95097;0;99.50976 'C: free %'=68%;20;10;0;100
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
SwimmingFish849
Posts: 7
Joined: Wed Sep 12, 2018 8:01 am

Re: Check_nt performance counter

Post by SwimmingFish849 »

Hi,

I haven't given the nrpe a shot - i'll try that though and see how i get one, thanks

Cheers
SwimmingFish849
Posts: 7
Joined: Wed Sep 12, 2018 8:01 am

Re: Check_nt performance counter

Post by SwimmingFish849 »

OK, i'm giving NRPE a shot but getting some issues with the command :(

It does work to show the disk space:
./check_nrpe -H x.x.x.x -n -c CheckDrivesize -a ShowAll MinWarnFree=10% MinCritFree=5G Drive=c:
OK c:: Total: 149.655GB - Used: 51.448GB (35%) - Free: 98.208GB (65%)|'c: free'=98.20772GB;14.96552;5;0;149.65527 'c: free %'=66%;10;3;0;100

But when I try to run the command mentioned here to get the free space t errors: https://support.nagios.com/kb/article.php?id=770

./check_nrpe -H x.x.x.x -n -c CheckDrivesize -a ShowAll Drive=c: 'MinWarnFree=10G' 'MinCritFree=5G' 'perf-config=*(unit:G)' detail-syntax='{${drive_or_name} ${free} free / ${size} total}' top-syntax='${status}: ${problem_list}'

Filter processing failed: Failed to get size for perf-config=*(unit:G): 7b: The filename, directory name, or volume label syntax is incorrect.
: 0 <= convert(5368709120)
SwimmingFish849
Posts: 7
Joined: Wed Sep 12, 2018 8:01 am

Re: Check_nt performance counter

Post by SwimmingFish849 »

Problem solved, an updated version of the client on the windows box solved the issue - it's now reporting used disk space which works perfectly in Grafana

Thanks for you help on this one :)
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Check_nt performance counter

Post by cdienger »

Glad to hear!
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked