Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

Check_Gentoo_Portage

Rating
0 votes
Favoured:
1
Hits
143360
Files:
FileDescription
check_gentoo_portageversion 0.8.2
Network Monitoring Software - Download Nagios XI
Log Management Software - Nagios Log Server - Download
Netflow Analysis Software - Nagios Network Analyzer - Download
Checks for security updates on Gentoo systems. Also checks that the portage tree is current and optionally if there are any general package upgrades.
Documentation

Checks a Gentoo system for any outstanding security updates through Portage.

./check_gentoo_portage
Portage OK: 0 Security Updates Outstanding


Example of security updates needed:

./check_gentoo_portage
Portage CRITICAL: 12 Security Updates Available


You can also show the age of the Portage tree if using --verbose (or -v for short)

./check_gentoo_portage -v
Portage OK: 0 Security Updates Outstanding. Portage last synchronized 11.9 hours ago

./check_gentoo_portage -v
Portage CRITICAL: 12 Security Updates Available. Portage last synchronized 12.0 hours ago


Also tests the age of the portage tree since GLSA security updates are dependent on this.
Therefore you'll get notified if the Portage tree is too old to be used for security package watching.

./check_gentoo_portage
Portage CRITICAL: Portage tree is 36.5 hours out of date, security package information is not reliable


You can of course choose how old you will allow the Portage tree to be using the --portage-tree-age switch (or -T for short) which is specified in hours.

./check_gentoo_portage --portage-tree-age 40 --verbose
Portage OK: 0 Security Updates Outstanding. Portage last synchronized 36.7 hours ago


Can optionally tell you how many general package updates are available, although this is not recommended since it's slow due to emerge being slow to initialize and you will need to increase the --timeout. You can also choose whether to just show the number of general package updates available or whether to alert on it too.

./check_gentoo_portage --all-updates --timeout 40
Portage OK: 0 Security Updates Outstanding. Package Changes Available: 122 packages


Or with more information including portage age and package changes available:

./check_gentoo_portage --all-updates --timeout 40 --verbose
Portage OK: 0 Security Updates Outstanding. Package Changes Available: 122 packages (114 upgrades, 1 downgrade, 5 new, 2 in new slots, 3 blocks). Portage last synchronized 12.1 hours ago

See ./check_gentoo_portage --help for full details.

Tested across a wide range both x86 and amd64 Gentoo Linux servers. The plugin is intentionally strict so that it will flag a potential error if any gentoo utils are old, missing or have unrecognized output formats. This is the right decision as this is a security related plugin and you wouldn't want it to silently fail to inform you of security updates, only to later get hacked for failing to upgrade. Instead it will give you recommendations on what to update and try again or to contact me if the upstream Portage utils change in behaviour.

Support

For updates, bugs, feature requests or anything else relating to this plugin email me at hpsekhon AT googlemail dot com.

Disclaimer

This program is released under the GPLv2 License.
By downloading or using this plugin you agree to these terms