28.7. 클러스터 경고 생성 및 수정
경고를 만들고, 받는 사람을 추가하고, 경고를 수정하고, 경고를 제거하고, 각 단계에서 구성된 경고를 표시할 수 있습니다.
클러스터의 각 노드에 경고 에이전트를 직접 설치해야 하지만 pcs 명령을 한 번만 실행해야 합니다.
프로세스
간단한 경고를 만듭니다. 경고 ID 값이 지정되지 않았으므로 시스템은 경고 ID 값을 만듭니다.
# pcs alert create path=/my/pathrec_value수신자를 경고에 추가합니다. 이 명령은 수신자 ID를 지정하지 않으므로alert-recipient값은 수신자 ID로 사용됩니다.# pcs alert recipient add alert value=rec_valuerec_value2의 두 번째 수신자를 경고에 추가합니다. 이 명령은 수신자의my-recipientID를 지정합니다.# pcs alert recipient add alert value=rec_value2 id=my-recipient경고 구성을 표시합니다.
# pcs alert config Alerts: Alert: alert (path=/my/path) Recipients: Recipient: alert-recipient (value=rec_value) Recipient: my-recipient (value=rec_value2)my-alert의 경고 ID를 사용하여 두 번째 경고를 추가합니다.# pcs alert create id=my-alert path=/path/to/script description=alert_description options option1=value1 opt=val meta timeout=50s timestamp-format="%H%B%S"수신자 값이
my-other-recipient인 두 번째 경고에 대한 수신자를 추가합니다. 수신자 ID를 지정하지 않으므로 시스템은my-alert-recipient의 수신자 ID를 제공합니다.# pcs alert recipient add my-alert value=my-other-recipient경고 구성을 표시합니다.
# pcs alert Alerts: Alert: alert (path=/my/path) Recipients: Recipient: alert-recipient (value=rec_value) Recipient: my-recipient (value=rec_value2) Alert: my-alert (path=/path/to/script) Description: alert_description Options: opt=val option1=value1 Meta options: timestamp-format=%H%B%S timeout=50s Recipients: Recipient: my-alert-recipient (value=my-other-recipient)경고
my-alert에 대한 경고 값을 수정합니다.# pcs alert update my-alert options option1=newvalue1 meta timestamp-format="%H%M%S"수신자
my-alert-recipient에 대한 경고 값을 수정합니다.# pcs alert recipient update my-alert-recipient options option1=new meta timeout=60s경고 구성을 표시합니다.
# pcs alert Alerts: Alert: alert (path=/my/path) Recipients: Recipient: alert-recipient (value=rec_value) Recipient: my-recipient (value=rec_value2) Alert: my-alert (path=/path/to/script) Description: alert_description Options: opt=val option1=newvalue1 Meta options: timestamp-format=%H%M%S timeout=50s Recipients: Recipient: my-alert-recipient (value=my-other-recipient) Options: option1=new Meta options: timeout=60s수신자
my-alert-recipient를경고에서 제거합니다.# pcs alert recipient remove my-recipient경고 구성을 표시합니다.
# pcs alert Alerts: Alert: alert (path=/my/path) Recipients: Recipient: alert-recipient (value=rec_value) Alert: my-alert (path=/path/to/script) Description: alert_description Options: opt=val option1=newvalue1 Meta options: timestamp-format="%M%B%S" timeout=50s Recipients: Recipient: my-alert-recipient (value=my-other-recipient) Options: option1=new Meta options: timeout=60s구성에서
myalert경고를 제거합니다.# pcs alert remove myalert경고 구성을 표시합니다.
# pcs alert Alerts: Alert: alert (path=/my/path) Recipients: Recipient: alert-recipient (value=rec_value)