Re: [Puppet Users] Monitoring services

2013-11-04 Thread Yasha Zislin
I got it fixed. :) If anybody is interested, here is the problem/solution. So it turns out that puppet actually calls "start" init script instead of restart (even though I've specified "hasrestart=true"). If one of the instances is still running, start script will say that service is already r

Re: [Puppet Users] Monitoring services

2013-11-04 Thread Yasha Zislin
Jason, So when both instances die of this service, puppet does restart it. When one instance dies, like I said earlier, it gives that message "stopped to running" and nothing happens. I've ran debug and in addition to typical stopped to running message, I got "Unscheduling refresh on Service [

Re: [Puppet Users] Monitoring services

2013-11-02 Thread Puppet List
A common way to do this is to symlink from the real init script to service-instancename The real script can check it was called as a link; extract the I stance name and source a configuration file of that name. Would a example be useful? On 2 Nov 2013 12:04, "Neil" wrote: > A common way to do thi

Re: [Puppet Users] Monitoring services

2013-11-02 Thread Neil
A common way to do this is to symlink from the real init script to service-instancename The real script can check it was called as a link; extract the I stance name and source a configuration file of that name. Would a example be useful? On 2 Nov 2013 02:20, "Jason Antman" wrote: > Yasha, > > In

Re: [Puppet Users] Monitoring services

2013-11-01 Thread Jason Antman
Yasha, Interesting. When it says the status has changed from stopped to running, it should be calling the restart command. Can you post the puppet agent --debug output somewhere, either attached or pastebin/etc.? And perhaps the init script itself? So you're using one init script for multiple ins

Re: [Puppet Users] Monitoring services

2013-11-01 Thread Yasha Zislin
Jantman, The problem is that init status script does return 0 when puppet checks the service. Since I have one of the two instances of service running, init script returns 0 and that's not cool. Multiple instances just run with different parameters like interface. So when you look at ps auxf, y

Re: [Puppet Users] Monitoring services

2013-11-01 Thread Jason Antman
Yasha, What distribution are you running? Is there any chance that you've specified somewhere a non-default provider for the Service type? I'm confused... this doesn't seem to be a Puppet issue to me. You include "hasstatus => true"... so Puppet should restart the service if your init script retu

Re: [Puppet Users] Monitoring services

2013-11-01 Thread Nikola Petrov
You better use another tool for this that will "provision" your process. There are many examples for this: http://smarden.org/runit/ http://upstart.ubuntu.com/cookbook/ http://mmonit.com/monit/ maybe more. I am currently using upstart and it is maybe one of the easiest to setup and integrates wit

[Puppet Users] Monitoring services

2013-11-01 Thread Yasha Zislin
Hello, I have multiple instances of a service running on linux server. This service has status, restart, start and stop init scripts. One of the instances keeps dying for unknown reasons (probably network related). I have puppet configured to monitor the service but it doesnt consider it to be