New check_by_ssh option

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.
Locked
cunningrat
Posts: 28
Joined: Mon Nov 18, 2013 5:51 pm

New check_by_ssh option

Post 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?
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: New check_by_ssh option

Post 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.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: New check_by_ssh option

Post 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.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: New check_by_ssh option

Post 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?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: New check_by_ssh option

Post 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.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked