check_gem
is a nagios plugin to check if gem updates are available.
gem outdated returns a list of gems for which updates are available.
copy the check_gem
plugin into your plugin directory, usually /usr/lib/nagios/plugins/
:
sudo cp check_gem /usr/lib/nagios/plugins/
Make sure the script is executable:
sudo chmod +x /usr/lib/nagios/plugins/check_gem
Run the script with the following parameters:
/usr/lib/nagios/plugins/check_gem -w 5 -c 20
-w
,--warning <number>
Minimum number of gem packages available for upgrade to returnWARNING
status. Default: 1-c
,--critical <number>
Minimum number of gem packages available for upgrade to returnCRITICAL
status. Default: 10-h
,--help
Display this help message.
/usr/lib/nagios/plugins/check_gem -w 5 -c 15
CRITICAL - 16 gem(s) need updates
Run test with:
docker run -it -v "$PWD:/code" bats/bats:latest /code/test
This project is licensed under the MIT License. See the LICENSE file for more information.