[ClusterLabs] pacemaker alerts node_selector

vockinger at gmail.com vockinger at gmail.com
Thu Nov 26 01:51:32 EST 2020


Hi, thank you for your reply.

I tried it this way:

    <alerts>
      <alert id="test_alert_avzone_1" path="/usr/share/pacemaker/alerts/test_alert.sh">
	  <select>
	  	<select_nodes>hana_node_1</select_nodes>	  
	  </select>
        <instance_attributes id="test_alert_1-instance_attributes">
          <nvpair name="HANASID" value="XAI" id="test_alert_1-instance_attributes-HANASID"/>
          <nvpair name="AVZone" value="AV1" id="test_alert_1-instance_attributes-AVZone"/>
        </instance_attributes>
        <recipient id="test_alert_avzone_1-recipient-1" value="/usr/share/pacemaker/alerts/test_alert.sh"/>
      </alert>
      <alert id="show" path="test_alert_avzone_1"/>
    </alerts>


During the save the select is been reset to 
  <select>
	  <select_nodes / >	 
 </select>


Do I need to specify in addition to select_nodes the section <element name="select_attributes">

Thank you, Alfred


-----Ursprüngliche Nachricht-----
Von: Users <users-bounces at clusterlabs.org> Im Auftrag von Reid Wahl
Gesendet: Donnerstag, 26. November 2020 05:30
An: Cluster Labs - All topics related to open-source clustering welcomed <users at clusterlabs.org>
Betreff: Re: [ClusterLabs] pacemaker alerts node_selector

What version of Pacemaker are you using, and how does it behave?

Depending on the error/misbehavior you're experiencing, this might have been me. Looks like in commit bd451763[1], I copied the alerts-2.9.rng[2] schema instead of the alerts-2.10.rng[3] schema.

[1] https://github.com/ClusterLabs/pacemaker/commit/bd451763
[2] https://github.com/ClusterLabs/pacemaker/blob/master/xml/alerts-2.9.rng
[3] https://github.com/ClusterLabs/pacemaker/blob/master/xml/alerts-2.10.rng

On Wed, Nov 25, 2020 at 9:31 AM <vockinger at gmail.com> wrote:
>
> Hi, I would like to trigger an external script, if something happens on a specific node.
>
>
>
> In the documentation of alerts, i can see <select_nodes /> but whatever I put into the XML, it’s not working…..
>
>
>
> configuration>
>
>     <alerts>
>
>         <alert id="my-alert" path="/path/to/my-script.sh">
>
>             <select>
>
>               <select_nodes />
>
>               <select_fencing />
>
>             </select>
>
>             <recipient id="my-alert-recipient1" 
> value="someuser at example.com"/>
>
>         </alert>
>
>     </alerts>
>
> </configuration>
>
> Can anybody send me an example about the right syntax ?
>
>
>
> Thank you very much……
>
>
>
> Best regards, Alfred
>
> _______________________________________________
> Manage your subscription:
> https://lists.clusterlabs.org/mailman/listinfo/users
>
> ClusterLabs home: https://www.clusterlabs.org/



--
Regards,

Reid Wahl, RHCA
Senior Software Maintenance Engineer, Red Hat CEE - Platform Support Delivery - ClusterHA

_______________________________________________
Manage your subscription:
https://lists.clusterlabs.org/mailman/listinfo/users

ClusterLabs home: https://www.clusterlabs.org/



More information about the Users mailing list