Monitor disk space by specific value

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.
alex3105
Posts: 103
Joined: Sat Jul 28, 2018 10:54 am

Re: Monitor disk space by specific value

Post by alex3105 »

Goodnight,

Use the attached file, but the problem persists, I would appreciate the support to solve it.

[root@localhost libexec]# ./check_nrpe -H 192.168.32.16 -c check_drivesize
CHECK_NRPE: (ssl_err != 5) Error - Could not complete SSL handshake with 192.168.32.16: 1
[root@localhost libexec]# ./check_nrpe -H 192.168.32.16 -c check_drivesize -a drive=C: 'warning=used>10G' 'critical=used>5G' show-all 'perf-config=*(unit:G)' detail-syntax='{${drive_or_name} ${used} used / ${size} total}' top-syntax='${status}: ${problem_list}'
CHECK_NRPE: (ssl_err != 5) Error - Could not complete SSL handshake with 192.168.32.16: 1

I attach the latest server files

Regards
Attachments
nsclient.ini
(997 Bytes) Downloaded 238 times
nsclient.log
(4.44 KiB) Downloaded 183 times
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Monitor disk space by specific value

Post by tgriep »

There needs to be a lot of changes done to the nsclient.ini file to post here so I created a new copy of the ini file and posted it here.
Stop the NSClient++ agent, replace the ini file and start the agent.
That should fix the issue for you and allow the nagios server the ability to connect to it.
Attachments
nsclient.ini
(937 Bytes) Downloaded 196 times
Be sure to check out our Knowledgebase for helpful articles and solutions!
alex3105
Posts: 103
Joined: Sat Jul 28, 2018 10:54 am

Re: Monitor disk space by specific value

Post by alex3105 »

I appreciate the response, I got the result without the error that came out of SSL.

I take this opportunity to consult you, referring to this topic, I created the command with the following structure

define command{
command_name check_nrpehdc
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_drivesize -a drive=C: 'warning=used<10G' 'critical=used<5G' show-all 'perf-config=*(unit:G)' detail-syntax='{${drive_or_name} ${used} used / ${size} total}' top-syntax='${status}: ${problem_list}'
}

define command{
command_name check_nrpehde
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_drivesize -a drive=E: 'warning=used<10G' 'critical=used<5G' show-all 'perf-config=*(unit:G)' detail-syntax='{${drive_or_name} ${used} used / ${size} total}' top-syntax='${status}: ${problem_list}'
}

Getting the following results in my web interface:

OK: {C: 13.391GB used / 59.998GB total}
OK: {E: 56.186GB used / 59.997GB total}

My question is ... because the critical service alert does not appear if the value exceeds the set value of 5G.

Best regards
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Monitor disk space by specific value

Post by scottwilkerson »

You have these set to

Code: Select all

'critical=used<5G'
CRITICAL if Used space less than 5G

Do you want them to be critical if free space is less than 5G? If so

Code: Select all

define command{
command_name check_nrpehdc
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_drivesize -a drive=C: 'warning=free<10G' 'critical=free<5G' show-all 'perf-config=*(unit:G)' detail-syntax='{${drive_or_name} ${used} used / ${size} total}' top-syntax='${status}: ${problem_list}'
}

define command{
command_name check_nrpehde
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_drivesize -a drive=E: 'warning=free<10G' 'critical=free<5G' show-all 'perf-config=*(unit:G)' detail-syntax='{${drive_or_name} ${used} used / ${size} total}' top-syntax='${status}: ${problem_list}'
}
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
alex3105
Posts: 103
Joined: Sat Jul 28, 2018 10:54 am

Re: Monitor disk space by specific value

Post by alex3105 »

Indeed, I am resolved .. thank you all for the support.

Best Regards.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Monitor disk space by specific value

Post by scottwilkerson »

alex3105 wrote:Indeed, I am resolved .. thank you all for the support.

Best Regards.
Great!

Locking thread
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked