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_gemRun 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 returnWARNINGstatus. Default: 1-c,--critical <number>Minimum number of gem packages available for upgrade to returnCRITICALstatus. Default: 10-h,--helpDisplay this help message.
/usr/lib/nagios/plugins/check_gem -w 5 -c 15
CRITICAL - 16 gem(s) need updatesRun test with:
docker run -it -v "$PWD:/code" bats/bats:latest /code/testThis project is licensed under the MIT License. See the LICENSE file for more information.