Simple procedure to monitor the output of a healthcheck script used to verify the status of an application.
We have recently leveraged logmon probe to monitor the health of ASM monitoring stations. There are several posts about logmon invoking commands but I think a generic procedure would add value.
1. Deploy logmon probe to these servers that will run the healthcheck script (unless the script can be run remotely).
2. Make sure the health check script can be invoked it locally.
3. In logmon probe configuration, create a new profile like this:
NOTE: In this example we will call the script that is located under /tmp. Change the path if necessary.
4. Under tab “Watcher Rules” we should have something like:
Note that we capture as errors any output line containing the expression *EE*. (The script can output multiples lines, one per component)
5. And under subtab Watcher Rules-Variables we should create a new variable like this:
With this setting we are going to capture the error message and save it on a variable "ERRORMESSAGE".
6. Save changes. From then on, everytime the script returns an error (identified by key word “EE”) we will raise and alert and capture/display the error message.
Other relevant links: