Munin doesn't ship with a memcached plugin. Almost all links that point to that plugin on the Munin wiki are broken. I finally found it here
. Here's what I did to get it to work:
- Download raw text of the plugin. I saved it as "memcached_". Replace @@PERL@@ variable at the top of the file with the path to perl on your system. Make memcached_ executable.
On the munin node that you want to get memcached stats for (ideally you'd add these steps to your automated deployment scripts; I added them in a fabric file called fab_munin.py):
- Copy memcached_ in /usr/share/munin/plugins (or equivalent for your system)
- Make 3 symlinks in /etc/munin/plugins to the memcached_ file, but name each symlink according to the metric that will be displayed in the munin graphs:
- ln -snf /usr/share/munin/plugins/memcached_ memcached_bytes
- ln -snf /usr/share/munin/plugins/memcached_ memcached_counters
- ln -snf /usr/share/munin/plugins/memcached_ memcached_rates
- Install the Perl Cache::Memcached module (you can do it via the cpan cmdline utility)
- Restart the munin-node service
At this point you should see 3 graphs for memcached on the munin dashboard:
- "Network traffic" (from the 'bytes' symlink)
- "Current values" such as bytes allocated/current connections/current items (from the 'counters' symlink)
- "Commands" such as cache misses/cache hits/GETs/SETs (from the 'rates' symlink).
sweet! just followed your instructions and got them running. Thanks.... Keep sharing your experiences, they are very helpful
many thanks, i follow your instructions and got it work..
very helpful, thanks!
Thanks a lot, very simple to understand!!
P.S. this errors means that plugin can't connect to memcached (on my problem this was caused by firewall)
Use of uninitialized value $sock in ref-to-glob cast at /usr/share/perl5/Cache/Memcached.pm line 362.
Use of uninitialized value in vec at /usr/share/perl5/Cache/Memcached.pm line 362.
Use of uninitialized value $sock in ref-to-glob cast at /usr/share/perl5/Cache/Memcached.pm line 369.
Use of uninitialized value in vec at /usr/share/perl5/Cache/Memcached.pm line 369.
Use of uninitialized value $sock in ref-to-glob cast at /usr/share/perl5/Cache/Memcached.pm line 370.
send() on unopened socket at /usr/share/perl5/Cache/Memcached.pm line 370.
Use of uninitialized value $res in numeric gt (>) at /usr/share/perl5/Cache/Memcached.pm line 373.
Use of uninitialized value $sock in hash element at /usr/share/perl5/Cache/Memcached.pm line 180.
Use of uninitialized value $sock in hash element at /usr/share/perl5/Cache/Memcached.pm line 167.
Thanks for the write-up. Worked great.
Installing via debian packages is simpler for ubuntu:
apt-get install libcache-memcached-perl
on ubuntu you can install the memcached plugin like this:
apt-get install munin-plugins-extra
Thanks for the pointers, worked like a charm on 4 machines in as many minutes.
Getting Bad Exit when fetching
yum install perl-Cache-Memcached.noarch
Post a Comment