Page 1 of 1

New check_by_ssh option

Posted: Thu Apr 10, 2014 1:09 pm
by cunningrat
I'd like an option to be added to check_by_ssh which mirrors the "-u" functionality of check_nrpe.

Namely, when the ssh command terminates abnormally ("plugin timed out", etcetera), this option would force check_by_ssh to return an UNKNOWN status rather than a CRITICAL one.

How difficult would this be to do? Also, how do I make it an "official" request for improvement -- post here to see if it gathers a sufficient number of responses?

Re: New check_by_ssh option

Posted: Mon Apr 14, 2014 1:48 pm
by slansing
You can make a request on the nagios plugins github repo, I'm also going to move this to the plugins development section so it get's some more light.

Re: New check_by_ssh option

Posted: Mon Apr 14, 2014 1:54 pm
by abrist
Yep, github is a good place to open a feature request issue. This is something we have been thinking about, but I don't want to add these type of options to any more plugins as we may end up making this a universal option on the timeout settings for all plugins. Still looking into the issue though.

Re: New check_by_ssh option

Posted: Fri Apr 25, 2014 10:59 am
by abrist
I have started to work on a universal timeout state setting for nagios-plugins. I also talked to Eric Stanley about adding the same type of functionality to check_nrpe - though the changes to check_nrpe will take longer as the core devs are going to be reworking the ssl/cert code for nrpe. Below you will find the nagios-plugins github issue if you care to comment or follow the changes. I will be adding some more information today as well as a branch with some initial ideas:
https://github.com/nagios-plugins/nagio ... /issues/31
Additionally, I will link the following monitoring-plugins pull request url as I am using the discussion as inspiration for the changes and I will most likely join in the discussion there as well.
https://github.com/monitoring-plugins/m ... /pull/1246
Cheers.

EDIT:
I am thinking a good syntax would be:

Code: Select all

-t <timeout value>:<timeout state>
For example:

Code: Select all

-t 10:ok
Would exit with and OK after the timeout of 10 seconds is reached. Integers could be used for state instead:

Code: Select all

-t 10:0
The old syntax will be unaffected:

Code: Select all

-t 10
And you should be able to use the default timeout and set just the state:

Code: Select all

-t :0
Does this look like a good solution?

Re: New check_by_ssh option

Posted: Tue Apr 29, 2014 10:09 pm
by abrist
Update: branch "timeout_state" has been pushed: https://github.com/nagios-plugins/nagio ... eout_state
This is an initial test. Consider it unstable and untested. It is smoking code.