A command line tool to get a report of sensu checks for a host into your console. Great for putting in your MOTD!
Python Makefile
Switch branches/tags
Nothing to show
Clone or download
Latest commit 16b6237 Nov 4, 2015

README.md

sensu-report

Build Status

Prints a human readable output of the failing Sensu checks into your terminal. Queries the Sensu API and formats it into pretty colors. Basically a text based report of the sensu dashboard, on a particular client. (by default, the local hostmame)

Examples

./sensu-report --server localhost

Failed Sensu checks on this host:
 �[91mCrit: (6 hours ago) apt-get_update: �[0mHit http://archive.ubuntu.com precise-...
 �[91mCrit: (3 hours ago) check-ping-leb2.xkyle.com: �[0mPING CRITICAL - Packet loss...
 �[91mCrit: (3 hours ago) check-ping-remina.gateway.2wire.net: �[0mCRITICAL - Networ...

Put it in Puppet for MOTDs

file { '/usr/bin/sensu_report':
  mode   => '0555',
  source => 'puppet:///files/sensu/sensu_report',
} ->
cron { 'sensu_report':
  command => "/usr/bin/sensu_report -s $sensu_api_server > /etc/motd",
  minute  => fqdn_rand(60),
} ->
sensu::check { "sensu_report":
  handlers    => 'default',
  command     => '/usr/lib/nagios/plugins/check_file_age -w 7200 -c 21600 -f /etc/motd',
  subscribers => 'sensu-test'
}

Support

Open an issue or fork and open a Pull Request