monit script for consul agent?

269 views
Skip to first unread message

Vikram Kone

unread,
Aug 27, 2015, 3:47:25 PM8/27/15
to Consul
hi, 
does anyone have a monit script that monitors consul agent?

I had this
check process consul with pidfile /home/weveadmin/consul/consul.pid
    start program = "/home/weveadmin/consul/consul  agent -config-dir /home/weveadmin/consul/consul.d/server/ -pid-file /home/weveadmin/consul/consul.pid >> /home/weveadmin/consul/consul.log 2>&1"
    stop program  = "/home/weveadmin/consul/consul leave"


but it's not working...this is the error in the logs..it says consul timed out? Looks like monit is killing consul even before it had a chance to be fully up.

what am I missing?

weveadmin@weve:~$ tail /var/log/monit.log
[UTC Aug 27 19:45:56] info     : 'weve.weve-r6akjgt8.d4.internal.cloudapp.net' Monit reloaded
[UTC Aug 27 19:45:56] error    : 'consul' process is not running
[UTC Aug 27 19:45:56] info     : 'consul' trying to restart
[UTC Aug 27 19:45:56] info     : 'consul' start: /home/weveadmin/consul/consul
[UTC Aug 27 19:46:26] error    : 'consul' failed to start (exit status -1) -- /home/weveadmin/consul/consul: Program timed out -- ==> WARNING: It is highly recommended to set GOMAXPROCS higher than 1
==> Starting raft data migration...
==> Starting Consul agent...
==> Starting Consul agent RPC...
==> Joining cluster...
    Join com

Alvaro Miranda Aguilera

unread,
Aug 30, 2015, 8:34:37 AM8/30/15
to consu...@googlegroups.com
Hello

I personally haven't used monit.

But I found this:
https://github.com/vito/consul-release/tree/master/jobs/consul-agent

Alvaro
> --
> This mailing list is governed under the HashiCorp Community Guidelines -
> https://www.hashicorp.com/community-guidelines.html. Behavior in violation
> of those guidelines may result in your removal from this mailing list.
>
> GitHub Issues: https://github.com/hashicorp/consul/issues
> IRC: #consul on Freenode
> ---
> You received this message because you are subscribed to the Google Groups
> "Consul" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to consul-tool...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/consul-tool/b9460d13-ed13-49ef-b7f3-aa0548e2d2c6%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages