puppet agent heartbeat

27 views
Skip to first unread message

moons...@gmail.com

unread,
Feb 17, 2016, 10:37:46 AM2/17/16
to Puppet Users
is there any way we can check the heartbeat of puppet agents?

and if agent is down can puppet try to bring up the server. 

Thanks,

John Gelnaw

unread,
Feb 17, 2016, 11:12:35 AM2/17/16
to Puppet Users
On Wednesday, February 17, 2016 at 10:37:46 AM UTC-5, moons...@gmail.com wrote:
is there any way we can check the heartbeat of puppet agents?

and if agent is down can puppet try to bring up the server. 

It may be a bit primitive, but I've been using crontab to "manually" run the puppet agent.  

I use the fqdn_rand() function to pick a number between 1-30, then set a crontab with that minute, and that minute+30, as the times to run.  Does a nice job of distributing the agent load across my enterprise. 

 $r1 = fqdn_rand(30)
 $r2 = $r1 + 30

 cron { 'puppet-agent':
   ensure  => present,
   user    => root,
   minute  => [$r1, $r2],
   environment => 'MAILTO=""',
   command => "/usr/bin/puppet agent --test --environment $puppetEnvironment",
 }

Angel L. Mateo

unread,
Feb 18, 2016, 2:04:19 AM2/18/16
to puppet...@googlegroups.com
El 17/02/16 a las 17:12, John Gelnaw escribió:
I have something similar to this, but instead of running the agent in
onetime mode, I start the daemon if it is not running. The command I run
in the cron is:

/etc/init.d/puppet status > /dev/null 2>&1 || /etc/init.d/puppet start

--
Angel L. Mateo Martínez
Sección de Telemática
Área de Tecnologías de la Información
y las Comunicaciones Aplicadas (ATICA)
http://www.um.es/atica
Tfo: 868887590
Fax: 868888337
Reply all
Reply to author
Forward
0 new messages