Monit parameters
Hello,
I have a question about configuring monit. Let's say I have the following lines for monitoring the sshd. Quote:
What I want to do is if sshd stopped running for some reason, I want it to start it as I want sshd to be running at all times. So does the line Quote:
Quote:
Quote:
Quote:
Quote:
If the stop and start lines aren't associated with the restart line then when do they kick in? |
Monit will first issue the stop then the start command.
|
Thanks!
Is this line necessary for the restart to work or does it work without it? Quote:
|
Monit doesn't have any concept of ESP or otherwise guessing what a user wants. Until then an "if [TEST] then [DOSOMETHING]" line is necessary, yes.
|
Then how would I add one for ntp? It uses UDP port 123 not tcp.
I've added the lines below and stopped the ntp service and it seems to work as it started ntp service. Quote:
|
Sure your PID test would work OK (but group doesn't do much here unless you have other services in the "ntp" group), and Monit understands UDP and NTP (NTP3) so you should have no trouble following the manual, see "connection testing" for examples.
|
Ah, okay...
Thanks for all the help. Is there a way to monitor a service that doesn't create a pid file? There's this application that runs that doesn't create the pid file but would like to monitor it. |
For checking the PID there are workarounds like using a wrapper script that saves the PID on application start but basically it depends on if the application has any features Monit can check. I hope you understand that without providing more details it's hard to tell.
|
Ah, okay, thanks for the help!
|
All times are GMT -5. The time now is 02:39 AM. |