I need to modify the check_ntp_time check (in plugin version 2.2.0) so that it will not alert (send status OK) upon a socket timeout.
The servers we are using this check on often timeout and we are getting a lot of alerts when we don't need/want them.
I am aware of the following
* This is an odd request
* You can mute the alert emails for any check you wish in Nagios
* Maybe I should figure out why the NTP check is timing out and fix the root cause
* There is a "-q" flag you can add to the check
* This check is written in C and you have to compile it before using it
All I need is for someone with more C knowledge than I have to see if they can modify the source code and then just tell/show me where the modifications were made so that I can do the same on my end.
I already tried modifying this (line 566):
Code: Select all
offset = offset_request(server_address, &offset_result);
if (offset_result == STATE_UNKNOWN) {
result = (quiet == 1 ? STATE_UNKNOWN : STATE_CRITICAL);
Code: Select all
offset = offset_request(server_address, &offset_result);
if (offset_result == STATE_OK) {
result = (quiet == 1 ? STATE_OK : STATE_OK);