Sha256: 526629c64735a567411bd28e864a45a8e39deb731f48f99bea74ab6470b9c722
Contents?: true
Size: 583 Bytes
Versions: 6
Compression:
Stored size: 583 Bytes
Contents
#!/usr/bin/env ruby # Puppetlast, a script to output the last check-in time of nodes. Also outputs the cached configuration state, if expired or not. # # AJ "Fujin" Christensen <aj@junglist.gen.nz> # require 'puppet' Puppet[:config] = "/etc/puppet/puppet.conf" Puppet.parse_config Puppet[:name] = "puppetmasterd" Puppet::Node::Facts.terminus_class = :yaml Puppet::Node::Facts.search("*").sort { |a,b| a.name <=> b.name }.each do |node| puts "#{node.name} #{node.expired? ? 'cached expired, ' : ''}checked in #{((Time.now - node.values[:_timestamp]) / 60).floor} minutes ago" end
Version data entries
6 entries across 6 versions & 1 rubygems
Version | Path |
---|---|
puppet-0.24.9 | ext/puppetlast |
puppet-0.25.1 | ext/puppetlast |
puppet-0.25.0 | ext/puppetlast |
puppet-0.24.6 | ext/puppetlast |
puppet-0.24.7 | ext/puppetlast |
puppet-0.24.8 | ext/puppetlast |