Re: [Pacemaker] Notification when a node is down

2014-09-15 Thread Ken Gaillot

On 09/12/2014 02:30 AM, Sihan Goi wrote:

Is there any way for a Pacemaker/Corosync/PCS setup to send a
notification when it detects that a node in a cluster is down? I read
that Pacemaker and Corosync logs events to syslog, but where is the
syslog file in CentOS? Do they log events such as a failover occurrence?


Pacemaker/corosync do extensive logging, even more so if debug is set to 
on in corosync.conf. Syslog is configurable to log the messages however 
you want; the default file locations vary from OS to OS.


Monitoring and notification are usually handled by a dedicated package 
for that purpose, such as nagios, icinga, monit or zabbix. These 
packages can monitor services on the nodes directly, as well as the 
health of pacemaker itself. Here, we use icinga with Phil Garner's 
check_crm plugin:


https://www.icinga.org/

https://github.com/dnsmichi/icinga-plugins/blob/master/scripts/check_crm

-- Ken Gaillot kjgai...@gleim.com
Network Operations Center, Gleim Publications

___
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
Bugs: http://bugs.clusterlabs.org


Re: [Pacemaker] Notification when a node is down

2014-09-15 Thread David Vossel


- Original Message -
 Hi,
 
 Is there any way for a Pacemaker/Corosync/PCS setup to send a notification
 when it detects that a node in a cluster is down? I read that Pacemaker and
 Corosync logs events to syslog, but where is the syslog file in CentOS? Do
 they log events such as a failover occurrence?

This might be a useful reference.

http://clusterlabs.org/doc/en-US/Pacemaker/1.1-pcs/html-single/Pacemaker_Explained/index.html#idm207039249856

-- Vossel

 Thanks.
 
 --
 - Goi Sihan
 gois...@gmail.com
 
 ___
 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
 Bugs: http://bugs.clusterlabs.org
 

___
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
Bugs: http://bugs.clusterlabs.org


Re: [Pacemaker] Notification when a node is down

2014-09-15 Thread Steven Hale
On 15 September 2014 16:49, David Vossel dvos...@redhat.com wrote:

 This might be a useful reference.

 http://clusterlabs.org/doc/en-US/Pacemaker/1.1-pcs/html-single/Pacemaker_Explained/index.html#idm207039249856

I've been having trouble with this too, and I spent ages on the above
link trying to make it work.

I've got the MailTo resource setup as a clone on all nodes.  I get
emails telling me when a resource moves to or away from a node.  But I
get nothing at all if a resource has failed for some reason and just
ends up in the stopped state.

I can't get ClusterMon to work with email notifications.  Looking
through the source I can't see how it can ever work.

Looking at /usr/lib/ocf/resource.d/pacemaker/ClusterMon the start
method runs a command like this:

${HA_SBIN_DIR}/crm_mon -p $OCF_RESKEY_pidfile -d -i $OCF_RESKEY_update
$OCF_RESKEY_extra_options -h $OCF_RESKEY_htmlfile

The example in the documentation uses the extra_options parameter to
pass through the email settings.

nvpair id=ClusterMon-instance_attributes-extra_options
name=extra_options value=-T pacema...@example.com -F
pacema...@node2.example.com -P PACEMAKER -H mail.example.com/

But the man page for crm_mon doesn't say anything about -T, -F, or
-P options!  crm_mon has no ability at all to send email.  I
eventually gave up and assumed that the documentation for this feature
was either out of date or just plain wrong.

This is with Pacemaker 1.1.10 from CentOS7 default repository.

pacemaker-cli-1.1.10-32.el7_0.x86_64

If the documentation for email notifications (7.2) *is* correct, then
could someone give me a hint as to what I'm doing wrong?

Thanks!

___
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
Bugs: http://bugs.clusterlabs.org


Re: [Pacemaker] Notification when a node is down

2014-09-15 Thread Michael Schwartzkopff
Am Montag, 15. September 2014, 10:59:39 schrieb Ken Gaillot:
 On 09/12/2014 02:30 AM, Sihan Goi wrote:
  Is there any way for a Pacemaker/Corosync/PCS setup to send a
  notification when it detects that a node in a cluster is down? I read
  that Pacemaker and Corosync logs events to syslog, but where is the
  syslog file in CentOS? Do they log events such as a failover occurrence?

This is the job of a monitoring system. The monitoring system checks the state 
of the cluster form time to time and sends out notifications if anything is 
not as expected.

You cannoy rely only on a cluster-centric solution. If all nodes are down, 
your users will notice. If you have a good monitoring system, it will 
recognize first and alert you. So you need external monitoring.

I prefer SNMP since it is the only IETF standard in management protocols.

Mit freundlichen Grüßen,

Michael Schwartzkopff

-- 
[*] sys4 AG

http://sys4.de, +49 (89) 30 90 46 64, +49 (162) 165 0044
Franziskanerstraße 15, 81669 München

Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263
Vorstand: Patrick Ben Koetter, Marc Schiffbauer
Aufsichtsratsvorsitzender: Florian Kirstein

signature.asc
Description: This is a digitally signed message part.
___
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
Bugs: http://bugs.clusterlabs.org


[Pacemaker] Notification when a node is down

2014-09-12 Thread Sihan Goi
Hi,

Is there any way for a Pacemaker/Corosync/PCS setup to send a notification
when it detects that a node in a cluster is down? I read that Pacemaker and
Corosync logs events to syslog, but where is the syslog file in CentOS? Do
they log events such as a failover occurrence?

Thanks.

-- 
- Goi Sihan
gois...@gmail.com
___
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
Bugs: http://bugs.clusterlabs.org