check_portage is a Nagios plugin, that checks if updates are available for your Gentoo Linux. It reports an OK state to Nagios, if your system is up to date. Or a critical state, if updates are available for your system. If updates are available, it reports a list of these packages.
Its published under the terms of the GNU General Public License version 2.
Screenshots
The system is up to date

There are updates for the system

Download
Requirements
- Nagios 2.5
- Ruby 1.8.5
Possibly it will also work with other versions of these components, but this are the versions with which I tested.
How to setup
- Copy check_portage to /usr/nagios/libexec/ and make it owned by the nagios user. Also make it executable.
- Than you need to put the nagios user into the portage group, so it can run emerge.
- Next, you need to define a new command:
define command { command_name check_portage command_line $USER1$/check_portage } - To use the command you need to add a service definition for your host.
This definition checks portage one time a day:
define service{ use generic-service host_name glotze service_description Portage is_volatile 0 check_period 24x7 max_check_attempts 4 normal_check_interval 1440 retry_check_interval 1 contact_groups admins notification_options w,u,c,r notification_interval 1440 notification_period 24x7 check_command check_portage }