On May 24, 2010, at 10:05 AM, Simpson, John R wrote: > Greetings all, > > First, my compliments to the Pacemaker and Corosync developers. I’ve > been trying out Pacemaker for the past few months, and (especially from the > command line) I’ve found building and managing Pacemaker-based clusters more > intuitive and flexible than RHCS. > > Is there any way to generate SNMP traps and/or email notifications when > a resource is moved or a node is STONITH’d? > > Using the Pacemaker resource agent ClusterMon to run crm_mon I receive > the start, stop, and monitor notifications I expect, but there are no > specific notifications when a resource is moved or a node is killed. I’d > like to send up a giant red flag when one of these major events occurs, > rather than having to derive it from start/stop/monitor alerts (i.e. all the > resources usually hosted on node01 suddenly started and were monitored on > node02 – node01 must have been stonith’d). I’m using the external/ssh > stonith agent for lab tests, if that is a factor. > > I’m using the following ClusterMon configuration and Pacemaker / > Corosync / SNMP versions: > > primitive Monitor-Cluster ocf:pacemaker:ClusterMon \ > params htmlfile="/var/www/html/rlb-cluster-monitor.html" \ > params pidfile="/var/run/rlb-cluster-monitor.pid" \ > params extra_options="--mail-host=outbound.msg.reyrey.net:25 > --mail-from=john_simp...@reyrey.com --mail-to=john_simp...@reyrey.com > --snmp-traps=10.205.1.18" \ > op start interval="0" timeout="90s" \ > op stop interval="0" timeout="100s" > > pacemaker-libs-devel-1.0.8-3.el5 > pacemaker-libs-1.0.8-3.el5 is > pacemaker-1.0.8-3.el5 > corosynclib-1.2.0-1.el5 > corosync-1.2.0-1.el5 > corosynclib-devel-1.2.0-1.el5 > net-snmp-libs-5.3.2.2-7.el5_4.2 > net-snmp-5.3.2.2-7.el5_4.2 > > Best regards, > > John > John Simpson > Senior Software Engineer, I. T. Engineering and Operations >
Ironically, pacemaker does not provide self-monitoring facilities, at least I wasn't able to find anything usable. I strongly suggest you to disable --mail-to feature of crm_mon, because you will induce a DoS attack on your mail server. You will be flooded with pretty much useless e-mails (http://developerbugs.linux-foundation.org/show_bug.cgi?id=2313) Also crm_mon is not usable with nagios at the moment (http://developerbugs.linux-foundation.org/show_bug.cgi?id=2344) Your best bet is either write a cron script or a "Dummy" derived resource agent that would parse 'crm resource status' output or create a MailTo resource for each single leaf node and accompanied collocation/ordering constraints. If there is another "native" way to get nagios-like notifications to my pager, I would be happy to know them as well. Vadym
_______________________________________________ Pacemaker mailing list: Pacemaker@oss.clusterlabs.org http://oss.clusterlabs.org/mailman/listinfo/pacemaker Project Home: http://www.clusterlabs.org Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf