Page 1 of 2

Disk Free Space - Specific Value

Posted: Fri Feb 09, 2018 9:44 am
by swiftarcher
Sorry newbie here running Nagios 5.4.7.

Have rolled out the NSClient++ but need to have Disk Free Space - Specific Value implemented. Is there a way of doing this on a windows server.

Sorry I need to be spoon fed this because I have read the support site it says

NSClient++ via check_nrpe
NSClient++ includes a disk module. The thresholds for the disk checks are triggered if the free space is less than the supplied value.
Path: C:
Unit: GB
Warning: 10GB Free
Critical: 5GB Free
Command:
./check_nrpe -H 10.25.11.3 -c check_drivesize -a drive=C: 'warning=free<10G' 'critical=free<5G' show-all 'perf-config=*(unit:G)' detail-syntax='{${drive_or_name} ${free} free / ${size} total}' top-syntax='${status}: ${problem_list}'
Output:
OK: {C: 68.414GB free / 99.51GB total}|'C: free'=68.41361G;10;5;0;99.50976 'C: free %'=69%;10;5;0;100


But I cant get it to work sorry

Re: Disk Free Space - Specific Value

Posted: Fri Feb 09, 2018 2:45 pm
by npolovenko
Hi, @swiftarcher. The command looks right. What output are you getting when you run the command?

Re: Disk Free Space - Specific Value

Posted: Mon Feb 12, 2018 9:05 am
by swiftarcher
CHECK_NRPE: Received 0 bytes from daemon. Check the remote server logs for error messages.

Also if I run check_nrpe on the client server I get

I <0.5.1.44 2017-08-30> seem to be doing fine...

Hope this helps

Re: Disk Free Space - Specific Value

Posted: Mon Feb 12, 2018 12:15 pm
by npolovenko
@swiftarcher, Can you upload the nsclient.log file from the remote windows server? It's in the same folder with nsclient.ini. Actually, please upload nsclient.ini as well. So two files.

Re: Disk Free Space - Specific Value

Posted: Tue Feb 13, 2018 3:31 am
by swiftarcher
All uploaded thankyou

Re: Disk Free Space - Specific Value

Posted: Tue Feb 13, 2018 2:35 pm
by npolovenko
Hello, @swiftarcher.
Here're some options to change in nsclient.ini file:

Code: Select all

; TODO
[/settings/NRPE/server]
allow arguments = true
allow nasty characters = true
port = 5666

; Undocumented key
verify mode = none

; Undocumented key
insecure = true
Also, your nsclient.log has lots of entries:

Code: Select all

Rejected connection from: 10.10.10.1
I'd try to figure out where it comes from, and either add the IP to allowed hosts in nsclient.ini or do further investigation and stop that server from reaching out to NSClient.

Re: Disk Free Space - Specific Value

Posted: Thu Feb 15, 2018 4:28 am
by swiftarcher
Thankyou just tried but still no joy

Re: Disk Free Space - Specific Value

Posted: Thu Feb 15, 2018 4:31 pm
by npolovenko
@ swiftarcher, What is your version of the NSCLient? As of right now we officially support 0.4.x, and these manuals were written for 0.4 as well.
DId you actually restart NSClient process after making the changes?
Please upload nsclient log file one more time.

Re: Disk Free Space - Specific Value

Posted: Wed Feb 21, 2018 3:34 am
by swiftarcher
Client 0.4.4

Yep restated service after editing the .ini file

Re: Disk Free Space - Specific Value

Posted: Wed Feb 21, 2018 6:45 am
by swiftarcher
npolovenko wrote:@ swiftarcher, What is your version of the NSCLient? As of right now we officially support 0.4.x, and these manuals were written for 0.4 as well.
DId you actually restart NSClient process after making the changes?
Please upload nsclient log file one more time.
I think the version is 0.5.1.44 I maybe mistaken.

Here are some screen shots on what I am doing
First off I ran nscp test on client machine ran check_drivesize command after loading the CheckDisk module.
Then restarted the service on the client machine and then proceeded to configure the Host on NagiosXI.
Clientside1.PNG
Clientside1_1.PNG
Clientside2.PNG