https://github.com/bodsch/check_redis
monitoring plugin check_redis
https://github.com/bodsch/check_redis
icinga2 icinga2-plugin monitoring monitoring-plugins monitoring-scripts nagios redis
Last synced: about 1 month ago
JSON representation
monitoring plugin check_redis
- Host: GitHub
- URL: https://github.com/bodsch/check_redis
- Owner: bodsch
- License: agpl-3.0
- Created: 2022-10-11T09:27:45.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-09-12T03:57:10.000Z (over 1 year ago)
- Last Synced: 2025-03-29T20:51:13.397Z (2 months ago)
- Topics: icinga2, icinga2-plugin, monitoring, monitoring-plugins, monitoring-scripts, nagios, redis
- Language: Python
- Homepage:
- Size: 20.5 KB
- Stars: 2
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# monitoring check for redis
## dependencies
* `redis` Python(3) library, in debian/ubuntu `python3-redis`
## usage
```
./check_redis.py --help
usage: check_redis.py [-h] [-H HOST] [-p PORT] [-P PASSWORD] [-d DBNAME] [-t TIMEOUT] [-w WARNING] [-c CRITICAL] [-k KEY_VALUE]monitoring plugin for redis-server
options:
-h, --help show this help message and exit
-H HOST, --host HOST Redis server to connect to. (default is 127.0.0.1)
-p PORT, --port PORT Redis port to connect to. (default is 6379)
-P PASSWORD, --password PASSWORD
Redis password to connect to.
-d DBNAME, --dbname DBNAME
Redis database name (default is db0)
-t TIMEOUT, --timeout TIMEOUT
Number of seconds to wait before timing out and considering redis down
-w WARNING, --warning WARNING
Warning threshold.
-c CRITICAL, --critical CRITICAL
Critical threshold.
-k KEY_VALUE, --key KEY_VALUE
Stat to monitor (memory_mb, hit_ratio, or custom)
```## examples
```
./check_redis.py
OK REDIS version: 7.0.5, connected_clients: 1, db0: 1, used_memory_human: 672.77K, uptime_in_days: 2
``````
./check_redis.py --key hit_ratio --critical 0 --warning 1
OK: Redis hit_ratio is 0 || hit_ratio=0;1;0;0;0
``````
./check_redis.py --key memory_mb --critical 1 --warning 3
OK: Redis memory_mb is 8.98046875 || memory_mb=8.98046875;3;1;0;8.98046875
```