Puppet: System Administration Automated

Support

Ticket #1188 (closed enhancement: fixed)

Opened 7 months ago

Last modified 7 months ago

'puppetwhen' - list when puppet was last successfully run for each node

Reported by: nigel Assigned to: luke
Priority: low Milestone: unplanned
Component: executables Version: 0.24.4
Severity: normal Keywords: puppetwhen
Cc: Triage Stage: Ready for checkin
Attached Patches: Code Complexity: Trivial

Description

There's a little script that Martyn Smith wrote (and I hacked on) to list for each node when puppet last ran.

Example output:

nigel@freud:~$ sudo puppetwhen
   10 minutes ago: dnsadmin-master.wgtn.cat-it.co.nz
   13 minutes ago: myportfolio-school-nz.wgtn.cat-it.co.nz
   13 minutes ago: myportfolio-ac-nz.wgtn.cat-it.co.nz
   14 minutes ago: mysql.wgtn.cat-it.co.nz
   14 minutes ago: pg81.wgtn.cat-it.co.nz
   15 minutes ago: dnsadmin-slave.wgtn.cat-it.co.nz
   16 minutes ago: dnsadmin-frontend.wgtn.cat-it.co.nz
   16 minutes ago: dnsadmin-database.wgtn.cat-it.co.nz
   19 minutes ago: dnsadmin-dr.wgtn.cat-it.co.nz
   26 minutes ago: mahara-trunk.wgtn.cat-it.co.nz
   26 minutes ago: mahara-1-0-stable.wgtn.cat-it.co.nz
26985 minutes ago: mahara-0910-pgsql.wgtn.cat-it.co.nz
26999 minutes ago: mahara-10-mysql.wgtn.cat-it.co.nz
27011 minutes ago: mahara-10-pgsql.wgtn.cat-it.co.nz
35681 minutes ago: mahara-dh-maketest.wgtn.cat-it.co.nz
35686 minutes ago: mahara-0-9-stable.wgtn.cat-it.co.nz

It's written in perl and uses a hardcoded path to the vardir. Suggestions from IRC include rewriting it in ruby so the vardir is easier to find.

Attachments

puppetwhen (476 bytes) - added by nigel on 04/14/08 00:02:51.
Perl script 'puppetwhen'
puppetlast (0.8 kB) - added by Fujin on 04/17/08 23:44:01.
Ruby version, with error handling

Change History

04/14/08 00:02:51 changed by nigel

  • attachment puppetwhen added.

Perl script 'puppetwhen'

04/16/08 03:35:05 changed by jkrauska

perhaps better named "puppetlast" ?

04/16/08 04:05:38 changed by nigel

FWIW, I don't mind what it's called, or indeed almost any details about it, other than it produces the same information the script currently does :)

04/17/08 06:45:09 changed by jamtur01

  • owner changed from community to jamtur01.
  • status changed from new to assigned.
  • stage changed from Unreviewed to Needs more info.

I think someone on the channel mentioned this had been rewritten in Ruby?

04/17/08 12:40:36 changed by Fujin

  • priority changed from normal to low.
  • complexity changed from Unknown to Trivial.
  • patch changed from None to Code.
  • stage changed from Needs more info to Ready for checkin.
  • milestone set to unplanned.

Ruby is a nice language so far - see attached Ruby version

04/17/08 23:44:01 changed by Fujin

  • attachment puppetlast added.

Ruby version, with error handling

04/19/08 13:57:21 changed by jamtur01

  • owner changed from jamtur01 to luke.
  • status changed from assigned to new.

Added to ext directory in commit [82b9f61bdc0f3141b8744b83978e2fe9cd2a710b] in branch 0.24.x

04/20/08 06:36:40 changed by luke

  • status changed from new to closed.
  • resolution set to fixed.

Merged and pushed.