Page 1 of 1

Check_nt performance counter

Posted: Fri Oct 05, 2018 5:11 am
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 :)

Re: Check_nt performance counter

Posted: Fri Oct 05, 2018 10:31 am
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

Re: Check_nt performance counter

Posted: Mon Oct 08, 2018 2:55 am
by SwimmingFish849
Hi,

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

Cheers

Re: Check_nt performance counter

Posted: Mon Oct 08, 2018 4:26 am
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)

Re: Check_nt performance counter

Posted: Mon Oct 08, 2018 6:51 am
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 :)

Re: Check_nt performance counter

Posted: Mon Oct 08, 2018 1:25 pm
by cdienger
Glad to hear!