I am using Monit to monitor and restart if necessary some Flexlm licensing 
servers.

I am checking if port 1999 is open on a remote server, and restarting f 
necessary.
The snippet is:


check host license3 with address 1.2.3.4

start program = "/usr/bin/ssh  license3 /sbin/service flexlm start"  with 
timeout 20 seconds
stop  program = "/usr/bin/ssh  license3 /sbin/service license stop"   with 
timeout 20 seconds
     if failed port 1999 type tcp with timeout 5 seconds then restart

If I stop the license server Monit will detect this, and I can see that the 
stop then start command is run.
The frustrating thing is that the Flexlm server immediately dies.

I can start the license server OK when running that ssh command fromt he 
command line.

If I install monit locally on the license server license3 and use

start program = "/sbin/service flexlm start"

I get the same thing, ie the command line works, but when Monit runs the 
command it does not.

Am I barking up a wrong tree here - does Monit always require a PID for a 
process, even though all I want to do is monitor a port?



Dr John Hearns | McLaren Racing Limited
McLaren Technology Centre, Chertsey Road, Woking, Surrey GU21 4YH, UK

T:  +44 (0) 1483 262000
D:  +44 (0) 1483 262352
F:  +44 (0) 1483 261928
E:  [email protected]
W: www.mclaren.com<http://www.mclaren.com/>

The contents of this e-mail are confidential and for the exclusive use of the 
intended recipient.
If you are not the intended recipient you should not read, copy, retransmit or 
disclose its contents.
If you have received this email in error please delete it from your system 
immediately and notify us either by email or telephone.
The views expressed in this communication may not necessarily be the views held 
by McLaren Racing Limited. 
McLaren Racing Limited | McLaren Technology Centre | Chertsey Road | Woking | 
Surrey | GU21 4YH | UK | Company Number: 01517478



--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general

Reply via email to