bpineau / redis-munin Goto Github PK
View Code? Open in Web Editor NEWMunin plugin for Redis. Monitors lots of things, with few dependencies (pure redis-cli + awk)
Munin plugin for Redis. Monitors lots of things, with few dependencies (pure redis-cli + awk)
This is a Munin public domain plugin for Redis. It tries to extensively cover Redis INFO output, while keeping the dependencies low (currently, only needs awk, tr, sed, redis-cli and Munin 1.4+). It can monitor several Redis instances, remotes or locals to the server (via network or socket connection). To install : just copy the redis_ script to your $MUNIN_LIBDIR (on Debian, that's /usr/share/munin/plugins/). Then create a symbolic link like this: ln -s '/usr/share/munin/plugins/redis_' \ '/etc/munin/plugins/redis_127.0.0.1_6379' Or let "munin-node-configure --shell | bash" do it for you. To monitor remote servers (or monitor local Redis instances listening on non-defaults ports), create a symbolic link accordingly, ie. : /etc/munin/plugins/redis_remoteserverip_remoteserverport To monitor local running socket-based redis setups, create a symbolic link like this: /etc/munin/plugins/redis_socket_socketpath_with_underscores_filename i.e. : ln -s '/usr/share/munin/plugins/redis_' \ '/etc/munin/plugins/redis_socket_var_run_redis_redis.sock' It's important to use the word socket as second part after redis_, to signal the script to use a socket connection. The redis-cli command must have access to the socket. The script convert the naming after socket into a socket real path. Passwords can be set in a config file ala /etc/munin/plugin-conf.d/redis: [redis_*] env.password secret-password and/or [redis_remoteserverip_remoteserverport] env.password another-secret-password and/or [redis_socket_socketpath] env.password another-secret-password
Errorno data display
Field Internal name Type Warn Crit Info
No .label provided keys gauge
This field has the following extra information: NOTE: The plugin did not provide any label for the data source keys. It is in need of fixing.
No .label provided expires gauge
This field has the following extra information: NOTE: The plugin did not provide any label for the data source expires. It is in need of fixing.
Centos, cpanel and Munin version 2.0.25
Munin plugin for Redis. Monitors lots of things, with few depencies (pure redis-cli + awk)
->
Munin plugin for Redis. Monitors lots of things, with few dependencies (pure redis-cli + awk)
Running sudo munin-node-configure --suggest
spits out the following:
# redis_:
# Bad suggestion: -h 127.0.0.1_-p 6379
# No valid suggestions
Hi,
I'm getting the error
$ tail /var/log/munin/munin-node.log
2017/02/02-10:24:30 [21429] Error output from redis_127.0.0.1_6379:
2017/02/02-10:24:30 [21429] /etc/munin/plugins/redis_127.0.0.1_6379: line 61: redis-cli: command not found
Which is weird because it's installed here:
$ type redis-cli
redis-cli is /srv/recent/12659/stack/bin/redis-cli
And my redis plugin is configured to use this path also. It's a bit noisy, but you can see /srv/recent/12659/stack/bin
is listed:
$ sudo cat /etc/munin/plugin-conf.d/redis
[redis_*]
env.PATH /srv/recent/12659/api2/bin:/srv/recent/12659/core/bin:/srv/recent/12659/stack/lib/ruby/gems/2.1.0/gems/bin:/srv/recent/12659/stack/lib/ruby/gems/2.1.0/gems/ruby/2.1.0/bin:/srv/recent/12659/stack/bin:/srv/recent/12659/stack/sbin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin
At first I thought that the plugin somehow did not respect the env.PATH
.
But echoing $PATH
from /etc/munin/plugins/redis_127.0.0.1_6379
outputs the correct path. The PWD is /
at that point, if it helps.
Somewhat desperate I symlinked my redis-cli
to a more conventional place:
ln -nfs "${DM_STACK_DIR}/bin/redis-cli" /usr/bin/redis-cli
But the error remains. Any clues? All my other plugins work without issues.
Redis supports listening to a UNIX socket instead of a port. It would be nice to be able to monitor such a redis instance with this plugin
In my case, I'm running munin-node locally, and I have two redis containers (one is LRU mode and one is for handling pub/sub data and other permanent keys)
2020/04/02 15:10:06 [WARNING] Service collision: plugin dredis_tss-redis-datastore on localhost.localdomain/127.0.0.1:4949 reports redis_total_connections_6379 which already exists on that host. Deleting new data.
2020/04/02 15:10:06 [WARNING] Service collision: plugin dredis_tss-redis-datastore on localhost.localdomain/127.0.0.1:4949 reports redis_changes_since_last_save_6379 which already exists on that host. Deleting new data.
2020/04/02 15:10:06 [WARNING] Service collision: plugin dredis_tss-redis-datastore on localhost.localdomain/127.0.0.1:4949 reports redis_fragmentation_6379 which already exists on that host. Deleting new data.
2020/04/02 15:10:06 [WARNING] Service collision: plugin dredis_tss-redis-datastore on localhost.localdomain/127.0.0.1:4949 reports redis_clients_6379 which already exists on that host. Deleting new data.
2020/04/02 15:10:06 [WARNING] Service collision: plugin dredis_tss-redis-datastore on localhost.localdomain/127.0.0.1:4949 reports redis_pubsub_channels_6379 which already exists on that host. Deleting new data.
2020/04/02 15:10:06 [WARNING] Service collision: plugin dredis_tss-redis-datastore on localhost.localdomain/127.0.0.1:4949 reports redis_expired_keys_6379 which already exists on that host. Deleting new data.
2020/04/02 15:10:06 [WARNING] Service collision: plugin dredis_tss-redis-datastore on localhost.localdomain/127.0.0.1:4949 reports redis_dbs_6379 which already exists on that host. Deleting new data.
2020/04/02 15:10:06 [WARNING] Service collision: plugin dredis_tss-redis-datastore on localhost.localdomain/127.0.0.1:4949 reports redis_commands_6379 which already exists on that host. Deleting new data.
2020/04/02 15:10:06 [WARNING] Service collision: plugin dredis_tss-redis-datastore on localhost.localdomain/127.0.0.1:4949 reports redis_evicted_keys_6379 which already exists on that host. Deleting new data.
2020/04/02 15:10:06 [WARNING] Service collision: plugin dredis_tss-redis-datastore on localhost.localdomain/127.0.0.1:4949 reports redis_memory_6379 which already exists on that host. Deleting new data.
2020/04/02 15:10:06 [WARNING] Service collision: plugin dredis_tss-redis-datastore on localhost.localdomain/127.0.0.1:4949 reports redis_blocked_clients_6379 which already exists on that host. Deleting new data.
I have..
/etc/munin/plugins/dredis_tss-redis-cache -> /path/to/plugins/redis_
/etc/munin/plugins/dredis_tss-redis-datastore -> /path/to/plugins/redis_
I see in the script..
if [ "$1" = "config" ]; then
# Expose all possibles graphes according to server's capabilities
redis-cli $ip_socket $port_path $passwd info | awk -v port=${muninport} -F: '
/^changes_since_last_save:|^rdb_changes_since_last_save:/ {
So it tells me that it's not suffixing/prefixing with some key for individual configs on the same host...
Expectation: should be able to run a single munin-node
where that node is monitoring two redis_
daemons..
Hi there,
thanks for your hard work, the plugin pretty much works very well,
as it doesn´t need any strange packages, but I ran into a problem:
While the plugin does work great, my munin-node does not show it,
if I telnet to it and run the list command.
I tried pretty much everything, munin-node-configure even shows the plugin as enabled,
but somehow it still will not work. The one thing I saw, was "munin-node-configure --shell":
Maybe there is some problem with the plugin output?
Thanks!
Kind regards,
Daniel
I use the default setup in Debian 8 which is redis 2.8 and I found your munin plugin. Thanks for sharing!
Unfortunately the suggest feature doesn't work in my setup. Two errors occure:
Bad suggestion: -h 127.0.0.1_-p 6379
I'll provide an patch for both in a minute.
The current redis plugin doesn't support multiple instances, if you use it like...
# Symlinks to redis_
redis_127.0.0.1_6379
redis_127.0.0.1_6380
Actually the plugin conflicts by processing data graphing and data binding, because of the unique namespacing.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.