Hello group, I''ve got a check defined in nagios that allows me to determine if a puppet client has not updated itself in awhile /usr/lib/nagios/plugins/check_file_age -f /var/lib/puppet/state/ state.yaml -w 3600 -c 4000 Now I''d like to start thinking about adding some facts and thought I''d ping the group for ideas. Some interesting things to know would include: - Time stamp of last run - Number of errors (or if errors is just > 0) - Age of lock file if present (useful when a paranoid admin runs puppetd --disable) Best, Adam --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 windowsrefund wrote:> Hello group, > > I''ve got a check defined in nagios that allows me to determine if a > puppet client has not updated itself in awhile > > /usr/lib/nagios/plugins/check_file_age -f /var/lib/puppet/state/ > state.yaml -w 3600 -c 4000 > > Now I''d like to start thinking about adding some facts and thought I''d > ping the group for ideas. Some interesting things to know would > include: > > - Time stamp of last run > - Number of errors (or if errors is just > 0) > - Age of lock file if present (useful when a paranoid admin runs > puppetd --disable)Have you seen the puppetlast script? It''s in the ext/ directory of the Puppet package. That might be useful too. Cheers James Turnbull - -- Author of: * Pulling Strings with Puppet (http://www.amazon.com/gp/product/1590599780/) * Pro Nagios 2.0 (http://www.amazon.com/gp/product/1590596099/) * Hardening Linux (http://www.amazon.com/gp/product/1590594444/) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFJZRiH9hTGvAxC30ARAvMwAKDSbw5ew1nCPYlO2xSVEq3N3T7TYwCdGavK 0D8mUXovqYVbuR3YITFT1KI=vXRa -----END PGP SIGNATURE----- --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
James, Thanks for pointing it out. I''m really not sure what to do with it though. Would you mind shedding some light? Best, Adam On Jan 7, 4:03 pm, James Turnbull <ja...@lovedthanlost.net> wrote:> -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > > > windowsrefund wrote: > > Hello group, > > > I''ve got a check defined in nagios that allows me to determine if a > > puppet client has not updated itself in awhile > > > /usr/lib/nagios/plugins/check_file_age -f /var/lib/puppet/state/ > > state.yaml -w 3600 -c 4000 > > > Now I''d like to start thinking about adding some facts and thought I''d > > ping the group for ideas. Some interesting things to know would > > include: > > > - Time stamp of last run > > - Number of errors (or if errors is just > 0) > > - Age of lock file if present (useful when a paranoid admin runs > > puppetd --disable) > > Have you seen the puppetlast script? It''s in the ext/ directory of the > Puppet package. That might be useful too. > > Cheers > > James Turnbull > > - -- > Author of: > * Pulling Strings with Puppet > (http://www.amazon.com/gp/product/1590599780/) > * Pro Nagios 2.0 > (http://www.amazon.com/gp/product/1590596099/) > * Hardening Linux > (http://www.amazon.com/gp/product/1590594444/) > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.7 (Darwin) > Comment: Using GnuPG with Mozilla -http://enigmail.mozdev.org > > iD8DBQFJZRiH9hTGvAxC30ARAvMwAKDSbw5ew1nCPYlO2xSVEq3N3T7TYwCdGavK > 0D8mUXovqYVbuR3YITFT1KI> =vXRa > -----END PGP SIGNATURE-------~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 windowsrefund wrote:> James, > > Thanks for pointing it out. I''m really not sure what to do with it > though. Would you mind shedding some light?Well it already does what you''ve done with the Nagios check. I was suggesting you could expand it to return the required results you want. If you want facts obviously you can create them but if you want a reporting mechanism that seemed like a logical start. Regards James Turnbull - -- Author of: * Pulling Strings with Puppet (http://www.amazon.com/gp/product/1590599780/) * Pro Nagios 2.0 (http://www.amazon.com/gp/product/1590596099/) * Hardening Linux (http://www.amazon.com/gp/product/1590594444/) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFJZSK59hTGvAxC30ARAl+OAKCZxJQHaN4GOFD3Mugjr06b74LopgCfRnoE F2jPbtitr4BIkTItMqmOM7A=81Xr -----END PGP SIGNATURE----- --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
I have done this: class nrpe inherits puppet::master { include nagios2::nrpe user { "nagios": groups => ''puppet'', } file { "/usr/lib/nagios/plugins/check_puppet": ensure => "present", source => "puppet://$servername/puppet/check_puppet", mode => 755, notify => Service[''nagios-nrpe-server''], require => Package[''nagios-plugins-basic''] } line { check_puppet_line: file => "/etc/nagios/nrpe_local.cfg", line => "command[check_puppet]=/usr/lib/nagios/plugins/check_pup pet", notify => Service[''nagios-nrpe-server''] } nagios2::service { "puppetlast": check_command => "check_nrpe_1arg!check_puppet" } } The check_puppet command is this: http://hg.koumbit.net/module-puppet/file/tip/files/check_puppet Note that this creates one service for all hosts, whereas you may want to do this with NSCA (instead of NRPE) and report one service per host. I didn''t go that fancy way, and would be interested in such a contribution. A. -- Le monochrome, c''est pour ceux qui s''intéressent (encore) au contenu. Usenet dans ces conditions, c''est comme le web avec lynx, on prend trop conscience du vide, c''est déprimant. - JLC dans le Guide du linuxien pervers: "Coup de cafard..."
James Turnbull schrieb am 07. Jan 2009 um 22:03:03 CET:> windowsrefund wrote: > > I''ve got a check defined in nagios that allows me to determine if a > > puppet client has not updated itself in awhile > > > > /usr/lib/nagios/plugins/check_file_age -f /var/lib/puppet/state/ > > state.yaml -w 3600 -c 4000 > > Have you seen the puppetlast script? It''s in the ext/ directory of the > Puppet package. That might be useful too.This script runs only on the puppetmaster (at least for Debian Lenny, it''s part of the puppetmaster-package) and it displays a list of hosts and when the last run was. I would also prefer a by-host check like the OP. Is anything wrong with the proposed check_file_age? Helmut -- ------------------------------------------------------------------------- Helmut Lichtenberg <Helmut.Lichtenberg@fli.bund.de> Tel.: 05034/871-128 Institut für Nutztiergenetik (FLI) 31535 Neustadt Germany ------------------------------------------------------------------------- --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
How about check_puppet.rb in ext/ ? This one runs on the clients =) Regards, AJ On 9/01/09 3:16 AM, "Helmut Lichtenberg" <Helmut.Lichtenberg@fli.bund.de> wrote:> > James Turnbull schrieb am 07. Jan 2009 um 22:03:03 CET: >> windowsrefund wrote: >>> I''ve got a check defined in nagios that allows me to determine if a >>> puppet client has not updated itself in awhile >>> >>> /usr/lib/nagios/plugins/check_file_age -f /var/lib/puppet/state/ >>> state.yaml -w 3600 -c 4000 >> >> Have you seen the puppetlast script? It''s in the ext/ directory of the >> Puppet package. That might be useful too. > > This script runs only on the puppetmaster (at least for Debian Lenny, it''s > part of the puppetmaster-package) and it displays a list of hosts and when the > last run was. > > I would also prefer a by-host check like the OP. Is anything wrong with the > proposed check_file_age? > > Helmut--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---