Question
How can I monitor Remote Agents going down on my instance?
Answer
This can be done by means of a job that will run on the Master every few minutes (as required). This can be achieved by means of a SQL or a shell script job.
- The first one is using SQL. Below is the SQL that you can use to do that:
select count(*) from aw_node_view where so_status_name = 'Srvc_Down';
- The other one could be a shell driven script (Unix/Linux only) that is running and taking an action based completely on the results of the script. A small shell command to keep an eye of bad status values can be:
awexe node | awk '$2=="Srvc_Down" {print $1}'
This command just lists all Agents in a Srvc_Down status. If you would like to do a count on the agents in Srvc_Down you can just put a 'wc -l' at the end:
awexe node | awk '$2=="Srvc_Down" {print $1}'| wc -l
The output of the above commands (and/or SQL script) can then be used to take any necessary action like sending emails, notifications, etc.
**NOTE - The 'awexe' commands will NOT work if the Master is down. However, in that case the SQL above can be used outside of AM via a scheduled script to perform the required action(s).