Discussion:
[Pacemaker] [Question] About snmp trap of crm_mon.
renayama19661014
2014-07-24 01:54:45 UTC
Permalink
Hi All,

We were going to confirm snmptrap function in crm_mon of Pacemaker1.1.12.
However, crm_mon does not seem to support a message for a new difference of cib.


void
crm_diff_update(const char *event, xmlNode * msg)
{
? ? int rc = -1;
? ? long now = time(NULL);
(snip)
? ? if (crm_mail_to || snmp_target || external_agent) {
? ? ? ? /* Process operation updates */
? ? ? ? xmlXPathObject *xpathObj = xpath_search(msg,
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? "//" F_CIB_UPDATE_RESULT "//" XML_TAG_DIFF_ADDED
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? "//" XML_LRM_TAG_RSC_OP);
? ? ? ? int lpc = 0, max = numXpathResults(xpathObj);
(snip)

Best Regards,
Hideo Yamauch.
Andrew Beekhof
2014-07-24 08:32:40 UTC
Permalink
Post by renayama19661014
Hi All,
We were going to confirm snmptrap function in crm_mon of Pacemaker1.1.12.
However, crm_mon does not seem to support a message for a new difference of cib.
dammit :(
Post by renayama19661014
void
crm_diff_update(const char *event, xmlNode * msg)
{
int rc = -1;
long now = time(NULL);
(snip)
if (crm_mail_to || snmp_target || external_agent) {
/* Process operation updates */
xmlXPathObject *xpathObj = xpath_search(msg,
"//" F_CIB_UPDATE_RESULT "//" XML_TAG_DIFF_ADDED
"//" XML_LRM_TAG_RSC_OP);
int lpc = 0, max = numXpathResults(xpathObj);
(snip)
Best Regards,
Hideo Yamauch.
_______________________________________________
Pacemaker mailing list: Pacemaker at 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 841 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://oss.clusterlabs.org/pipermail/pacemaker/attachments/20140724/cb33acbc/attachment.sig>
Michael Schwartzkopff
2014-07-24 08:49:33 UTC
Permalink
Post by Andrew Beekhof
Post by renayama19661014
Hi All,
We were going to confirm snmptrap function in crm_mon of Pacemaker1.1.12.
However, crm_mon does not seem to support a message for a new difference of cib.
dammit :(
Hi,

I think the new way to send traps is via script. There should be a script
somewhere in the internet. Google help.

ON the other hand you could try my SNMP Subagent for pacemaker. It does not
send traps, but provides the management data about the state of the cluster.
Perhas a trap extension for my agent would be nice.

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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 230 bytes
Desc: This is a digitally signed message part.
URL: <http://oss.clusterlabs.org/pipermail/pacemaker/attachments/20140724/39236bf8/attachment.sig>
Andrew Beekhof
2014-07-24 23:21:50 UTC
Permalink
Post by Michael Schwartzkopff
Post by Andrew Beekhof
Post by renayama19661014
Hi All,
We were going to confirm snmptrap function in crm_mon of Pacemaker1.1.12.
However, crm_mon does not seem to support a message for a new difference of cib.
dammit :(
Hi,
I think the new way to send traps is via script.
If you look at the logic that was pasted, you'll see that we've managed to break notifications for external agents too.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 841 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://oss.clusterlabs.org/pipermail/pacemaker/attachments/20140725/fc841941/attachment.sig>
Andrew Beekhof
2014-07-25 05:02:57 UTC
Permalink
Post by Andrew Beekhof
Post by renayama19661014
Hi All,
We were going to confirm snmptrap function in crm_mon of Pacemaker1.1.12.
However, crm_mon does not seem to support a message for a new difference of cib.
dammit :(
Perhaps someone feels like testing this:
https://github.com/beekhof/pacemaker/commit/3df6aff

Otherwise I'll do it on monday
Post by Andrew Beekhof
Post by renayama19661014
void
crm_diff_update(const char *event, xmlNode * msg)
{
int rc = -1;
long now = time(NULL);
(snip)
if (crm_mail_to || snmp_target || external_agent) {
/* Process operation updates */
xmlXPathObject *xpathObj = xpath_search(msg,
"//" F_CIB_UPDATE_RESULT "//" XML_TAG_DIFF_ADDED
"//" XML_LRM_TAG_RSC_OP);
int lpc = 0, max = numXpathResults(xpathObj);
(snip)
Best Regards,
Hideo Yamauch.
_______________________________________________
Pacemaker mailing list: Pacemaker at 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 841 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://oss.clusterlabs.org/pipermail/pacemaker/attachments/20140725/4d029351/attachment.sig>
renayama19661014
2014-07-25 05:21:44 UTC
Permalink
Hi Andrew,
? https://github.com/beekhof/pacemaker/commit/3df6aff
?
Otherwise I'll do it on monday
An immediate correction, thank you.
I confirm snmp by the end of Monday.

Many Thanks!
Hideo Yamauchi.



----- Original Message -----
From: Andrew Beekhof <andrew at beekhof.net>
To: renayama19661014 at ybb.ne.jp; The Pacemaker cluster resource manager <pacemaker at oss.clusterlabs.org>
Date: 2014/7/25, Fri 14:02
Subject: Re: [Pacemaker] [Question] About snmp trap of crm_mon.
Post by Andrew Beekhof
Post by renayama19661014
Hi All,
We were going to confirm snmptrap function in crm_mon of
Pacemaker1.1.12.
Post by Andrew Beekhof
Post by renayama19661014
However, crm_mon does not seem to support a message for a new
difference of cib.
Post by Andrew Beekhof
dammit :(
? https://github.com/beekhof/pacemaker/commit/3df6aff
Otherwise I'll do it on monday
Post by Andrew Beekhof
Post by renayama19661014
void
crm_diff_update(const char *event, xmlNode * msg)
{
? ? int rc = -1;
? ? long now = time(NULL);
(snip)
? ? if (crm_mail_to || snmp_target || external_agent) {
? ? ? ? /* Process operation updates */
? ? ? ? xmlXPathObject *xpathObj = xpath_search(msg,
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? "//"
F_CIB_UPDATE_RESULT "//" XML_TAG_DIFF_ADDED
Post by Andrew Beekhof
Post by renayama19661014
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? "//"
XML_LRM_TAG_RSC_OP);
Post by Andrew Beekhof
Post by renayama19661014
? ? ? ? int lpc = 0, max = numXpathResults(xpathObj);
(snip)
Best Regards,
Hideo Yamauch.
_______________________________________________
Pacemaker mailing list: Pacemaker at oss.clusterlabs.org
http://oss.clusterlabs.org/mailman/listinfo/pacemaker
Project Home: http://www.clusterlabs.org
http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Post by Andrew Beekhof
Post by renayama19661014
Bugs: http://bugs.clusterlabs.org
renayama19661014
2014-07-28 03:50:17 UTC
Permalink
Hi Andrew,
??https://github.com/beekhof/pacemaker/commit/3df6aff
?
Otherwise I'll do it on monday
I confirmed the output of the SNMP trap of the resource and the SNMP trap of STONITH.
By your correction, the crm_mon command came to send trap.

Please reflect a correction in Master repository.

Best Regards,
Hideo Yamauchi.



----- Original Message -----
From: "renayama19661014 at ybb.ne.jp" <renayama19661014 at ybb.ne.jp>
To: Andrew Beekhof <andrew at beekhof.net>; The Pacemaker cluster resource manager <pacemaker at oss.clusterlabs.org>
Date: 2014/7/25, Fri 14:21
Subject: Re: [Pacemaker] [Question] About snmp trap of crm_mon.
Hi Andrew,
? https://github.com/beekhof/pacemaker/commit/3df6aff
?
Otherwise I'll do it on monday
An immediate correction, thank you.
I confirm snmp by the end of Monday.
Many Thanks!
Hideo Yamauchi.
----- Original Message -----
From: Andrew Beekhof <andrew at beekhof.net>
To: renayama19661014 at ybb.ne.jp; The Pacemaker cluster resource manager <pacemaker at oss.clusterlabs.org>
Date: 2014/7/25, Fri 14:02
Subject: Re: [Pacemaker] [Question] About snmp trap of crm_mon.
? Hi All,
? We were going to confirm snmptrap function in crm_mon of
Pacemaker1.1.12.
? However, crm_mon does not seem to support a message for a new
difference of cib.
? dammit :(
? https://github.com/beekhof/pacemaker/commit/3df6aff
Otherwise I'll do it on monday
? void
? crm_diff_update(const char *event, xmlNode * msg)
? {
? ? int rc = -1;
? ? long now = time(NULL);
? (snip)
? ? if (crm_mail_to || snmp_target || external_agent) {
? ? ? ? /* Process operation updates */
? ? ? ? xmlXPathObject *xpathObj = xpath_search(msg,
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? "//"
F_CIB_UPDATE_RESULT "//" XML_TAG_DIFF_ADDED
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? "//"
XML_LRM_TAG_RSC_OP);
? ? ? ? int lpc = 0, max = numXpathResults(xpathObj);
? (snip)
? Best Regards,
? Hideo Yamauch.
? _______________________________________________
? Pacemaker mailing list: Pacemaker at oss.clusterlabs.org
? http://oss.clusterlabs.org/mailman/listinfo/pacemaker
? Project Home: http://www.clusterlabs.org
http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
? Bugs: http://bugs.clusterlabs.org
_______________________________________________
Pacemaker mailing list: Pacemaker at 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
Andrew Beekhof
2014-07-28 05:13:28 UTC
Permalink
Will do. Thanks for testing!
Post by renayama19661014
Hi Andrew,
Post by Andrew Beekhof
https://github.com/beekhof/pacemaker/commit/3df6aff
Otherwise I'll do it on monday
I confirmed the output of the SNMP trap of the resource and the SNMP trap of STONITH.
By your correction, the crm_mon command came to send trap.
Please reflect a correction in Master repository.
Best Regards,
Hideo Yamauchi.
----- Original Message -----
From: "renayama19661014 at ybb.ne.jp" <renayama19661014 at ybb.ne.jp>
To: Andrew Beekhof <andrew at beekhof.net>; The Pacemaker cluster resource manager <pacemaker at oss.clusterlabs.org>
Date: 2014/7/25, Fri 14:21
Subject: Re: [Pacemaker] [Question] About snmp trap of crm_mon.
Hi Andrew,
Post by Andrew Beekhof
https://github.com/beekhof/pacemaker/commit/3df6aff
Otherwise I'll do it on monday
An immediate correction, thank you.
I confirm snmp by the end of Monday.
Many Thanks!
Hideo Yamauchi.
----- Original Message -----
Post by Andrew Beekhof
From: Andrew Beekhof <andrew at beekhof.net>
To: renayama19661014 at ybb.ne.jp; The Pacemaker cluster resource manager <pacemaker at oss.clusterlabs.org>
Date: 2014/7/25, Fri 14:02
Subject: Re: [Pacemaker] [Question] About snmp trap of crm_mon.
Post by Andrew Beekhof
Post by renayama19661014
Hi All,
We were going to confirm snmptrap function in crm_mon of
Pacemaker1.1.12.
Post by Andrew Beekhof
Post by renayama19661014
However, crm_mon does not seem to support a message for a new
difference of cib.
Post by Andrew Beekhof
dammit :(
https://github.com/beekhof/pacemaker/commit/3df6aff
Otherwise I'll do it on monday
Post by Andrew Beekhof
Post by renayama19661014
void
crm_diff_update(const char *event, xmlNode * msg)
{
int rc = -1;
long now = time(NULL);
(snip)
if (crm_mail_to || snmp_target || external_agent) {
/* Process operation updates */
xmlXPathObject *xpathObj = xpath_search(msg,
"//"
F_CIB_UPDATE_RESULT "//" XML_TAG_DIFF_ADDED
Post by Andrew Beekhof
Post by renayama19661014
"//"
XML_LRM_TAG_RSC_OP);
Post by Andrew Beekhof
Post by renayama19661014
int lpc = 0, max = numXpathResults(xpathObj);
(snip)
Best Regards,
Hideo Yamauch.
_______________________________________________
Pacemaker mailing list: Pacemaker at oss.clusterlabs.org
http://oss.clusterlabs.org/mailman/listinfo/pacemaker
Project Home: http://www.clusterlabs.org
http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Post by Andrew Beekhof
Post by renayama19661014
Bugs: http://bugs.clusterlabs.org
_______________________________________________
Pacemaker mailing list: Pacemaker at 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 841 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://oss.clusterlabs.org/pipermail/pacemaker/attachments/20140728/7d3a7ece/attachment.sig>
Brett Moser
2015-04-22 18:46:49 UTC
Permalink
I just came across this bug on the pacemaker-1.1.12-4.el6.x86_64.rpm that
comes with the RHEL6 / CentOS 6.6 distro. I have just applied the
crm_mon.c patch to the SRPM and built a pacemaker-1.1.12-5.el6.x86_64.rpm
for our internal use. If anyone is interested in this I can make it
available.

regards,
-Brett Moser
Post by Andrew Beekhof
Will do. Thanks for testing!
Post by renayama19661014
Hi Andrew,
Post by Andrew Beekhof
https://github.com/beekhof/pacemaker/commit/3df6aff
Otherwise I'll do it on monday
I confirmed the output of the SNMP trap of the resource and the SNMP
trap of STONITH.
Post by renayama19661014
By your correction, the crm_mon command came to send trap.
Please reflect a correction in Master repository.
Best Regards,
Hideo Yamauchi.
----- Original Message -----
Date: 2014/7/25, Fri 14:21
Subject: Re: [Pacemaker] [Question] About snmp trap of crm_mon.
Hi Andrew,
Post by Andrew Beekhof
https://github.com/beekhof/pacemaker/commit/3df6aff
Otherwise I'll do it on monday
An immediate correction, thank you.
I confirm snmp by the end of Monday.
Many Thanks!
Hideo Yamauchi.
----- Original Message -----
Post by Andrew Beekhof
Date: 2014/7/25, Fri 14:02
Subject: Re: [Pacemaker] [Question] About snmp trap of crm_mon.
Post by Andrew Beekhof
Post by renayama19661014
Hi All,
We were going to confirm snmptrap function in crm_mon of
Pacemaker1.1.12.
Post by Andrew Beekhof
Post by renayama19661014
However, crm_mon does not seem to support a message for a new
difference of cib.
Post by Andrew Beekhof
dammit :(
https://github.com/beekhof/pacemaker/commit/3df6aff
Otherwise I'll do it on monday
Post by Andrew Beekhof
Post by renayama19661014
void
crm_diff_update(const char *event, xmlNode * msg)
{
int rc = -1;
long now = time(NULL);
(snip)
if (crm_mail_to || snmp_target || external_agent) {
/* Process operation updates */
xmlXPathObject *xpathObj = xpath_search(msg,
"//"
F_CIB_UPDATE_RESULT "//" XML_TAG_DIFF_ADDED
Post by Andrew Beekhof
Post by renayama19661014
"//"
XML_LRM_TAG_RSC_OP);
Post by Andrew Beekhof
Post by renayama19661014
int lpc = 0, max = numXpathResults(xpathObj);
(snip)
Best Regards,
Hideo Yamauch.
_______________________________________________
http://oss.clusterlabs.org/mailman/listinfo/pacemaker
Project Home: http://www.clusterlabs.org
http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Post by Andrew Beekhof
Post by renayama19661014
Bugs: http://bugs.clusterlabs.org
_______________________________________________
http://oss.clusterlabs.org/mailman/listinfo/pacemaker
Project Home: http://www.clusterlabs.org
http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Post by renayama19661014
Bugs: http://bugs.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
Loading...