Antoine_Sauteron_1266

Monitoring an agent's status

Discussion created by Antoine_Sauteron_1266 on Jun 28, 2016
Latest reply on Feb 24, 2017 by Ian_Geglia_179
Should you need to know whether one agent or the other is up, you may use the SYS_HOST_ALIVE script command to get its current status.

You can even imagine that a recurring EVNT.TIME will check the status of the agent(s) and restart it or trigger an alert if it has gone down.


> From the PostProcess (!Process) tab of the event, trigger a notification if the agent is down (the "ALARM.AGENT.DOWN" object will need to be created separately) :

:SET &STATUS# = SYS_HOST_ALIVE("SAP01", "CONN.R3.ECC.ABAP")
:IF &STATUS# ='N'
:
SET &ACT#= ACTIVATE_UC_OBJECT("ALARM.AGENT.DOWN")
:ENDIF

> restart the agent with MODIFY_SYSTEM

:SET &STATUS# = SYS_HOST_ALIVE("SAP01", "CONN.R3.ECC.ABAP")
:IF &STATUS# ='N'
:  SET &START# = MODIFY_SYSTEM ("STARTUP", "Agent")
:ENDIF
Please note this will only work if the Service Manager Record has been filled in correctly in the agent's properties in the System Overview.

g9ijnzpxv0x0.png

You may also want to check the Agent Restarter if you want to be able to restart several agents at once.

Outcomes