Actions

Difference between revisions of "IPHA - Monitoring server status"

From Zenitel Wiki

(Configuration)
Line 24: Line 24:
 
Copy/paste the action commands below into the event:
 
Copy/paste the action commands below into the event:
  
 +
{{Code2|
 
  tmp 2 "2"
 
  tmp 2 "2"
  IF %op(%sev,,230)
+
  IF %op(%sev,<nowiki>==</nowiki>,230)
 
  tmp 2 "1"
 
  tmp 2 "1"
 
  ENDIF
 
  ENDIF
  IF %op(%sev,==,231)
+
  IF %op(%sev,<nowiki>==</nowiki>,231)
 
  tmp 2 "1"
 
  tmp 2 "1"
 
  ENDIF
 
  ENDIF
  IF %op(%sev,==,232)
+
  IF %op(%sev,<nowiki>==</nowiki>,232)
 
  tmp 2 "1"
 
  tmp 2 "1"
 
  ENDIF
 
  ENDIF
  IF %op(%tmp(2),==,1)
+
  IF %op(%tmp(2),<nowiki>==</nowiki>,1)
 
  tmp 0 "Primary Server is operational."
 
  tmp 0 "Primary Server is operational."
 
  IF %op(%syse(232) ,&, %syse(230))
 
  IF %op(%syse(232) ,&, %syse(230))
 
  tmp 0 "Secondary Server is operational."
 
  tmp 0 "Secondary Server is operational."
 
  ENDIF
 
  ENDIF
  IF %op(%op(%syse(230),==,0) ,&, %op(%syse(232),==,0))
+
  IF %op(%op(%syse(230),<nowiki>==</nowiki>,0) ,&, %op(%syse(232),<nowiki>==</nowiki>,0))
 
  tmp 0 "Secondary Server is operational."
 
  tmp 0 "Secondary Server is operational."
 
  ENDIF
 
  ENDIF
Line 45: Line 46:
 
  tmp 1 "Both servers are running."
 
  tmp 1 "Both servers are running."
 
  ENDIF
 
  ENDIF
  IF %op(%syse(231),==,0)
+
  IF %op(%syse(231),<nowiki>==</nowiki>,0)
 
  tmp 1 "ALARM: The link to the other server is down, or the server itself is down"
 
  tmp 1 "ALARM: The link to the other server is down, or the server itself is down"
 
  ENDIF
 
  ENDIF
  LOG "%tmp(0) %tmp(1)"
+
  LOG "%tmp(0) %tmp(1)"}}
  
 
[[Category: AlphaCom Monitoring]]
 
[[Category: AlphaCom Monitoring]]

Revision as of 12:27, 31 May 2022

AlphaCom icon 300px.png

The IP-HA system reports changes of the server state to the Event Handler.

This article describes how to configure the Event Handler in order to report current server state to the System log.

Error reporting

The following strings will be reported to the System Log whenever there is a change of state:

  • One of the servers is operational, and the other server is in standby mode:
Primary Server is operational. Both servers are running.


Secondary Server is operational. Both servers are running.


  • One of the servers is operational, and the other server is Out of Service:
Primary Server is operational. ALARM: The link to the other server is down, or the server itself is down.


Secondary Server is operational. ALARM: The link to the other server is down, or the server itself is down.



Configuration

From AlphaPro, select Exchange & System > Events, and Insert a new event with the following properties:

Event to report status changes in an IPHA system


Copy/paste the action commands below into the event:

Action commands:

tmp 2 "2"
IF %op(%sev,==,230)
tmp 2 "1"
ENDIF
IF %op(%sev,==,231)
tmp 2 "1"
ENDIF
IF %op(%sev,==,232)
tmp 2 "1"
ENDIF
IF %op(%tmp(2),==,1)
tmp 0 "Primary Server is operational."
IF %op(%syse(232) ,&, %syse(230))
tmp 0 "Secondary Server is operational."
ENDIF
IF %op(%op(%syse(230),==,0) ,&, %op(%syse(232),==,0))
tmp 0 "Secondary Server is operational."
ENDIF
IF %syse(231)
tmp 1 "Both servers are running."
ENDIF
IF %op(%syse(231),==,0)
tmp 1 "ALARM: The link to the other server is down, or the server itself is down"
ENDIF
LOG "%tmp(0) %tmp(1)"