New check_by_ssh option

This forum is intended for the discussion of Nagios plugin development. Feature requests, patches, bug fixes, and all types of development-related discussions are welcome!

NOTE: The SourceForge.net nagiosplug-devel mailing list has been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

New check_by_ssh option

Postby cunningrat » Thu Apr 10, 2014 1:09 pm

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

Re: New check_by_ssh option

Postby slansing » Mon Apr 14, 2014 1:48 pm

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

Re: New check_by_ssh option

Postby abrist » Mon Apr 14, 2014 1:54 pm

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

Postby abrist » Fri Apr 25, 2014 10:59 am

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

Postby abrist » Tue Apr 29, 2014 10:09 pm

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


Return to Nagios Plugin Development

Who is online

Users browsing this forum: No registered users and 2 guests