Nagios help
Marc Powell
lists at xodus.org
Fri Aug 20 15:20:40 CEST 2010
Hey newme me,
On Aug 20, 2010, at 1:15 AM, newme me wrote:
> Here is what I need -
>
> Want to create a wrapper script which returns a cumulative summary. I need a step by step instructions on how to hook a script like this into nagios?
It's pretty easy...
- create your script to perform the check. Pay particular attention to the Output and Return Code requirements of http://nagiosplug.sourceforge.net/developer-guidelines.html
- create a command{} definition that calls your script.
- create one or more service definitions that reference your new command{} definition
- reload nagios
- ...
- PROFIT!
> What I desire -
>
> Instead of a cumulative result, can I display the result in Nagios on a per application basis using this one script (and a wrapper script on top of it)?
Seems straightforward to me. Accept a command line argument referencing what you want to look for and search the output for that status. Print out the status and exit with a corresponding exit code.
> If you can also provide me with a wrapper script for reference in relation to how the result can be presented to Nagios that would be great.
Look at pretty much any of the plugins at http://exchange.nagios.org. I'd bet that the majority of them call some external program, parse it's output and return results.
--
Marc
------------------------------------------------------------------------------
This SF.net email is sponsored by
Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list