[Pacemaker] Enable remote monitoring
Gao,Yan
ygao at suse.com
Tue Jan 22 05:28:40 UTC 2013
Hi,
Here's the code for supporting nagios plugins in lrmd:
https://github.com/gao-yan/pacemaker/commits/nagios
A new resource class "nagios" is introduced.
Actions:
- probe: A resource defined for a resource container is not probed. (We
can also add a condition in pengine to just avoid probing a nagios class
resource.)
- start: Invokes the nagios plugin with specified parameters (Maps the
instance attributes to the long options of the nagios plugin). If it
returns non-OK, re-invokes it after some delay (delay = start_timeout /
10), until it returns OK or exceeds the start timeout.
- monitor: Recurring invocation to the nagios plugin with specified
parameters.
- stop: Nothing special is done. The recurring monitor is canceled anyway.
- metadata: Reads the corresponding metadata from a xml file in
NAGIOS_METADATA_DIR.
(As we know nagios plugins don't support metadata. The current plan is
to generate the corresponding metadata according to the help of the
plugins, and put them into NAGIOS_METADATA_DIR for use -- Dejan already
has progress on this. Thank, Dejan!)
For nagios plugins, the exit code are:
STATE_OK = 0,
STATE_WARNING = 1,
STATE_CRITICAL = 2,
STATE_UNKNOWN = 3,
STATE_DEPENDENT = 4,
AFAICS, STATE_OK should map to PCMK_EXECRA_OK, and the others should all
belong to PCMK_EXECRA_UNKNOWN_ERROR. Well, apparently, there's no code
to express "NOT_RUNNING" in nagios plugins. I think it should be fine,
since there's no probe.
Any suggestions are appreciated!
Thanks,
Gao,Yan
--
Gao,Yan <ygao at suse.com>
Software Engineer
China Server Team, SUSE.
* English - detected
* English
* Chinese (Simplified)
* English
* Chinese (Simplified)
<javascript:void(0);> <#>
More information about the Pacemaker
mailing list