https://github.com/doppelar0n/check_gem
A nagios plugin to check if gem updates are available
https://github.com/doppelar0n/check_gem
bash nagios nagios-checks nagios-plugin nagios-plugins ruby ruby-gem rubygem shell update-checker
Last synced: 3 months ago
JSON representation
A nagios plugin to check if gem updates are available
- Host: GitHub
- URL: https://github.com/doppelar0n/check_gem
- Owner: doppelar0n
- License: mit
- Created: 2024-11-05T23:44:38.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-11-06T01:33:25.000Z (8 months ago)
- Last Synced: 2025-03-30T15:03:57.308Z (4 months ago)
- Topics: bash, nagios, nagios-checks, nagios-plugin, nagios-plugins, ruby, ruby-gem, rubygem, shell, update-checker
- Language: Shell
- Homepage:
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# check_gem
`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.## Install
copy the `check_gem` plugin into your plugin directory, usually `/usr/lib/nagios/plugins/`:
```bash
sudo cp check_gem /usr/lib/nagios/plugins/
```Make sure the script is executable:
```bash
sudo chmod +x /usr/lib/nagios/plugins/check_gem
```## Usage
Run the script with the following parameters:
```bash
/usr/lib/nagios/plugins/check_gem -w 5 -c 20
```### Options
- `-w`, `--warning ` Minimum number of gem packages available for upgrade to return `WARNING` status. Default: 1
- `-c`, `--critical ` Minimum number of gem packages available for upgrade to return `CRITICAL` status. Default: 10
- `-h`, `--help` Display this help message.## Example
```bash
/usr/lib/nagios/plugins/check_gem -w 5 -c 15
CRITICAL - 16 gem(s) need updates
```### Test
Run test with:
```bash
docker run -it -v "$PWD:/code" bats/bats:latest /code/test
```## License
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for more information.