Author Topic: วิธีการตั้งค่า heartbeat ให้ส่งแจ้ง alert email ในกรณี heartbeat มีปัญหา  (Read 233 times)


  • Administrator
  • Hero Member
  • *****
  • Posts: 2075
    • View Profile
    • นั่งสมาธิ สติปัฏฐานสี่ พาเที่ยววัด แนะนำวัด แจกcd ธรรมะฟรี
    • Email
==== pacemaker alert notification email to

Pacemaker provides several sample alert agents, which are installed in /usr/share/pacemaker/alerts by default. These sample scripts may be copied and used as is, or they may be used as templates to be edited to suit your purposes. Refer to the source code of the sample agents for the full set of attributes they support. See Section 13.1.1, “Using the Sample Alert Agents” for an example of a basic procedure for configuring an alert that uses a sample alert agent.
General information on configuring and administering alert agents is provided in Section 13.1.2, “Alert Creation”, Section 13.1.3, “Displaying, Modifying, and Removing Alerts”, Section 13.1.4, “Alert Recipients”, Section 13.1.5, “Alert Meta Options”, and Section 13.1.6, “Alert Configuration Command Examples”.
You can write your own alert agents for a Pacemaker alert to call. For information on writing alert agents, see Section 13.1.7, “Writing an Alert Agent”.

==== Run on server only 1 node is ok [ if ha on 2 nodes] 
# install --mode=0755 /usr/share/pacemaker/alerts/ /var/lib/pacemaker/
# pcs alert create id=smtp_alert path=/var/lib/pacemaker/ options
# pcs alert recipient add smtp_alert
# pcs alert
 Alert: smtp_alert (path=/var/lib/pacemaker/
   Recipient: smtp_alert-recipient (