[Nagiosplug-help] Plugins Output
Subhendu Ghosh
sghosh at sghosh.org
Mon Jan 26 19:26:01 CET 2004
On Mon, 26 Jan 2004, Feng HE wrote:
> Hello
>
> i am writing a Nagios plugin and want to know, how should a output to
> Nagios looks like?or it must implement as Passive service checks in
> format llike this: [<timestamp>]
> PROCESS_SERVICE_CHECK_RESULT;<host_name>;<description>;<return_code>;
> <plugin_output>
>
> best regards!
>
> AeoLus
Normally plugins are coded as if they are going to be used as active
plugins.
For a passive plugin, you need at least 3 arguments in addition to those
required for the plugin to work:
1. hostname (as in Nagios config)
2. servicename (as in Nagios config)
3. /path/filename of the command file (usually /usr/local/nagios/var/rw/command)
The plugin must also output the return code on the status line.
Also the plugin must be running on the same system as Nagios and as a user
who has permission to write to the Nagios command file.
It may just be easier to write a standard plugin and use nsca to send a
passive response...
--
-sg
More information about the Help
mailing list