Hi,
For this query, just want to show an alternative way. We may use a two state Shell Command monitor.
This is the general steps for your reference.
1, create a two-state monitor, and save it in unsealed MP
2, name it and select the target
3, provide the script path that already created in Linux box (the script do the actual work and return the result, for example, either of the 2 services is runing, return 1, otherwise, 0)
4, configure the criteria (compare the current value with the threshold), unhealty and healty
5, enable alerting and write the alert description if necessary
Here's some lab test screenshots
sample script (to count the file in /tmp and you should replace it with the actual one)
Hope the above information helps.
Regards,
Alex
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.