Git Product home page Git Product logo

redis-munin's Introduction

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

redis-munin's People

Contributors

bpineau avatar kozakana avatar nkavassalis avatar vaughany avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

redis-munin's Issues

No .label provided [no data display]

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

fix project title typo

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)

redis-cli: command not found

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.

Support for unix sockets

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

Problem with multiple redis monitors on the same munin-node

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..

plugin works but list on node doesn´t show it

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":

redis:

Has 'suggest' capability, but isn't a wildcard plugin

Maybe there is some problem with the plugin output?

Thanks!

Kind regards,
Daniel

Suggest feature is not working for non socket connections

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:

  1. The script fails as the comparison is not valid in line 9 (variable ip_socket is empty)
  2. The suggestion is invalid. Instead of "127.0.0.1_6379" the suggest returns "-h 127.0.0.1_-p 6379"

Bad suggestion: -h 127.0.0.1_-p 6379

I'll provide an patch for both in a minute.

Support multigraph with multiple instances

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.