I have a service, sssd, that keeps dying on two Linux servers. While I am waiting to resolve that, I would like to be able to monitor the output of the command:
service sssd status
With the following actions
1) if the word "running" is in the result, set condition up
2) if the word "down" is in the result, set condition down
3) if the word "dead" is in the result, run the command "service sssd restart"
Same question here and this is what I understand thus far:
- the only way to do what you need is to use a "Linux/Unix Script Monitor" available via "Server and Application Monitor" (SAM) product - which is separate from NPM.
- this would involve writing a short script that runs a "service status" status command and captures the output
- restarting a service would involve creating an alert where a "trigger" action is a script
(I wish this was as simple as with Windows services)