Page 2 of 2

Re: Monitor disk space by specific value

Posted: Thu Oct 17, 2019 10:25 pm
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

Re: Monitor disk space by specific value

Posted: Fri Oct 18, 2019 2:22 pm
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.

Re: Monitor disk space by specific value

Posted: Sun Oct 20, 2019 11:25 pm
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

Re: Monitor disk space by specific value

Posted: Mon Oct 21, 2019 8:15 am
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}'
}

Re: Monitor disk space by specific value

Posted: Mon Oct 21, 2019 10:12 pm
by alex3105
Indeed, I am resolved .. thank you all for the support.

Best Regards.

Re: Monitor disk space by specific value

Posted: Tue Oct 22, 2019 6:15 am
by scottwilkerson
alex3105 wrote:Indeed, I am resolved .. thank you all for the support.

Best Regards.
Great!

Locking thread