Thanks!

It works.

Best regards.

2015-12-21 15:48 GMT+01:00 Martin Pala <[email protected]>:
> Hi,
>
> --8<--
> check process service.x86_64 with pidfile /var/run/service.pid
>  start program = "/etc/init.d/service start"
>  stop program  = "/etc/init.d/service stop"
>  if failed port 8888 then alert  # note: you can use "... then restart" 
> instead of "alert" if you prefer automatic restart of the service
> --8<--
>
> Regards,
> Martin
>
>
>> On 21 Dec 2015, at 15:41, Josu Lazkano <[email protected]> wrote:
>>
>> Hello,
>>
>> I have a service running in a Linux machine that sometimes use to stop 
>> wotking.
>>
>> The PID is there but it doesn't response to telnet:
>>
>> # ps -e | grep service.x86
>> 1782 ?        00:00:22 service.x86_64
>>
>> # telnet localhost 8888
>> Trying ::1...
>> Trying 127.0.0.1...
>> telnet: Unable to connect to remote host: Connection refused
>>
>> In normal state it must response to telnet:
>>
>> # telnet localhost 8888
>> Trying ::1...
>> Trying 127.0.0.1...
>> Connected to localhost.
>> Escape character is '^]'.
>>
>> I am using this script:
>>
>> # cat /etc/monit/conf.d/service.conf
>> check process service.x86_64 with pidfile /var/run/service.pid
>>  start program = "/etc/init.d/service start"
>>  stop program  = "/etc/init.d/service stop"
>>
>> How could I add a telnet check in the configuration file?
>>
>> Thanks for your help.
>>
>> Best regards.
>>
>> --
>> Josu Lazkano
>>
>> --
>> To unsubscribe:
>> https://lists.nongnu.org/mailman/listinfo/monit-general
>
>
> --
> To unsubscribe:
> https://lists.nongnu.org/mailman/listinfo/monit-general



-- 
Josu Lazkano

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

Reply via email to