[Pacemaker] email alert by crm_mon?
Andrew Beekhof
andrew at beekhof.net
Wed May 6 06:27:11 UTC 2009
Here is the help text from the latest sources:
Usage: crm_mon mode [options]
Options:
-?, --help This text
-$, --version Version information
-V, --verbose Increase debug output
Modes:
-h, --as-html=value Write cluster status to the named file
-w, --web-cgi Web mode with output suitable for cgi
-s, --simple-status Display the cluster status once as a simple one
line output (suitable for nagios)
-S, --snmp-traps=value Send SNMP traps to this station
-T, --mail-to=value Send Mail alerts to this user. See also
--mail-from, --mail-host, --mail-prefix
Display Options:
-n, --group-by-node Group resources by node
-r, --inactive Display inactive resources
-f, --failcounts Display resource fail counts
-o, --operations Display resource operation history
-t, --timing-details Display resource operation history with timing details
Additional Options:
-i, --interval=value Update frequency in seconds
-1, --one-shot Display the cluster status once on the console and exit
-N, --disable-ncurses Disable the use of ncurses
-d, --daemonize Run in the background as a daemon
-p, --pid-file=value (Advanced) Daemon pid file location
-F, --mail-from=value Mail alerts should come from the named user
-H, --mail-host=value Mail alerts should be sent via the named host
-P, --mail-prefix=value Subjects for mail alerts should start with this string
Examples:
Display the cluster´s status on the console with updates as they occur:
# crm_mon
Display the cluster´s status on the console just once then exit:
# crm_mon -1
Display your cluster´s status, group resources by node, and include
inactive resources in the list:
# crm_mon --group-by-node --inactive
Start crm_mon as a background daemon and have it write the cluster´s
status to an HTML file:
# crm_mon --daemonize --as-html /path/to/docroot/filename.html
Start crm_mon as a background daemon and have it send email alerts:
# crm_mon --daemonize --mail-to user at example.com --mail-host mail.example.com
Start crm_mon as a background daemon and have it send SNMP alerts:
# crm_mon --daemonize --snmp-traps snmptrapd.example.com
On Tue, May 5, 2009 at 3:42 PM, Juha Heinanen <jh at tutpro.com> wrote:
> i'm trying to figure out, how to make heartbeat/pacemaker combo to send
> an email alert when a resource dies on a node or is started on another
> node.
>
> i searched archives and found this:
>
> On Thu, Mar 26, 2009 at 03:18, 可可熊 <cocobear.cn at gmail.com> wrote:
> > for example, there are two nodes, when one node down, another node
> > can know this, can this node mail this information?
>
> newer versions of pacemaker support this as part of the crm_mon daemon.
> the advantage of this method is that the daemon monitors _all_ resource
> events.
>
> how new crm_mon needs to be in order to have this functionality? i have
> pacemaker 1.0.2-2 running and 'crm_mon --help' does not contain anything
> about email alerts. also, debian pacemaker package does not contain an
> init script to start crm_mon as a deamon.
>
> -- juha
>
> _______________________________________________
> Pacemaker mailing list
> Pacemaker at oss.clusterlabs.org
> http://oss.clusterlabs.org/mailman/listinfo/pacemaker
>
More information about the Pacemaker
mailing list