[Pacemaker] crm_mon SNMP support

Florian Crouzat gentoo at floriancrouzat.net
Mon Jan 21 16:18:14 UTC 2013


Le 29/11/2012 22:10, Andrew Beekhof a écrit :

> Not so fast :-)
>
> crm_mon supports
>
>         -E, --external-agent=value
>                A program to run when resource operations take place.
>
>         -e, --external-recipient=value A recipient for your program
> (assuming you want the program to send something to someone).
>
> so without recompiling, you can call a script - possibly it could call
> something that sends out snmp alerts ;-)


So, I took a first shot at writing an external-agent script that would 
somehow reproduce the behavior of crm_mon when SNMP support is built-in.

Basically, to refocus the discussion, I've written this script because I 
want to be alerted via SNMP on most of the cluster events but sadly my 
version of crm_mon doesn't have SNMP support (RHEL6), so I cannot use 
this feature combined with ocf:pacemaker:ClusterMon but I can use 
crm_mon ability to trigger an external-agent (script, binary...)

Script: http://files.floriancrouzat.net/clusterMon.sh
It respects PCMK-MIB.txt.

ps: yes I know, lots of comments and few actual lines of code but that's 
just because 
http://clusterlabs.org/doc/en-US/Pacemaker/1.1/html-single/Pacemaker_Explained/#ch-notification 
hasn't been published yet.

Any directions, hints or corrections are welcome.

Florian.


-- 
Cheers,
Florian Crouzat




More information about the Pacemaker mailing list