• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
Use Munin to show your APC cache stats

Use Munin to show your APC cache stats

Tracy Perry

Well-known member
#1
Tracy Perry submitted a new resource:

Use Munin to show your APC stats. - APC stats displayed via Munin

I use nginx for my http server, and this configuration is configured for that. Feel free to modify it for apache if that is what you use.

In /etc/munin/plugin-conf.d make a file called php_apc and place
Code:
[php_apc_*]
user root
env.url http://localhost/apc_info.php?auto
in it.

Define a localhost for nginx with
Code:
server {
    server_name localhost;
    include /etc/nginx/php.conf;
    root /usr/share/nginx/html;
    allow 127.0.0.1;
    deny all;
    location / {...
Read more about this resource...
 

speedway

Well-known member
#2
Been trying to set munin up all day and so far only have the basics plus Matt's Forum Users working. One of the thing I am having issues with is this one, monitoring APC.

I have all the perquisite perl modules installed (centos 5 BTW) but keep getting this in munin_node logs. Googling hasn't helped at all so I am hoping someone can assist:

Code:
Plugin "php_apc_purge" exited with status 512. ----
Can't locate Munin/Plugin.pm in @INC (@INC contains: /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.8/i386-linux-thread-multi /usr/lib/perl5/5.8.8 .) at /etc/munin/plugins/php_apc_files line 8.
BEGIN failed--compilation aborted at /etc/munin/plugins/php_apc_files line 8.
[/quote
Cheers
Every call to the various function produce the same error. Please be gentle :)
 

Tracy Perry

Well-known member
#3
Been trying to set munin up all day and so far only have the basics plus Matt's Forum Users working. One of the thing I am having issues with is this one, monitoring APC.
Every call to the various function produce the same error. Please be gentle :)
What version of Munin? This was targeted at a Debian install, which is probably different than a CentOS one (I know package format is RPM vs DEB).
 

speedway

Well-known member
#7
I think my version is 1. something, having a bugger of time finding it. I'll check out the python version but will preserve with the perl version. I have pretty much been following this and others found on the web but the majority of them are either Ubuntu or Debian so for me it has been hit and miss.
 

Tracy Perry

Well-known member
#8
I think my version is 1. something, having a bugger of time finding it. I'll check out the python version but will preserve with the perl version. I have pretty much been following this and others found on the web but the majority of them are either Ubuntu or Debian so for me it has been hit and miss.
Did you install Munin by RPM or compile yourself?
 

Tracy Perry

Well-known member
#10
I think my version is 1. something, having a bugger of time finding it. I'll check out the python version but will preserve with the perl version. I have pretty much been following this and others found on the web but the majority of them are either Ubuntu or Debian so for me it has been hit and miss.
Found this pertaining to Ubuntu and Munin prior to 1.3.3
Code:
NAME
      Munin::Plugin - Utility functions for Perl Munin plugins.
 
  Usage
        use lib $ENV{'MUNIN_LIBDIR'};
        use Munin::Plugin;
 
      If your Munin installation predates the MUNIN_* environment variables
      (introduced in 1.3.3) you can put this in your plugin configuration:
 
        [*]
            env.MUNIN_PLUGSTATE /lib/munin/plugin-state
            env.MUNIN_LIBDIR /usr/share/munin
 
      IF, indeed that is the munin plugin state directory.  The default
      install directory for Munin::Plugin is in Perl’s module search path,
      the "use lib" is there for the cases where this is not so, and the
      variable needs to be set to stop Perl from complaining.
 
      The module exports these functions: clean_fieldname, set_state_name,
      save_state, restore_state, tail_open, tail_close.
 

speedway

Well-known member
#12
Found this pertaining to Ubuntu and Munin prior to 1.3.3
Code:
NAME
      Munin::Plugin - Utility functions for Perl Munin plugins.
 
  Usage
        use lib $ENV{'MUNIN_LIBDIR'};
        use Munin::Plugin;
 
      If your Munin installation predates the MUNIN_* environment variables
      (introduced in 1.3.3) you can put this in your plugin configuration:
 
        [*]
            env.MUNIN_PLUGSTATE /lib/munin/plugin-state
            env.MUNIN_LIBDIR /usr/share/munin
 
      IF, indeed that is the munin plugin state directory.  The default
      install directory for Munin::Plugin is in Perl’s module search path,
      the "use lib" is there for the cases where this is not so, and the
      variable needs to be set to stop Perl from complaining.
 
      The module exports these functions: clean_fieldname, set_state_name,
      save_state, restore_state, tail_open, tail_close.
Aha, thanks. Will try that.
 

Tracy Perry

Well-known member
#16
Theres the key, no EPEL repo on my system. I have to thank you for all the investigative stuff, I think I have just been at this too long.
I've had days like that (and more frequently recently). :p
Just happened to have gotten in from seeing Star Trek Into Darkness and just HAD to check in before I went to bed.
 

speedway

Well-known member
#19
I've had days like that (and more frequently recently). :p
Just happened to have gotten in from seeing Star Trek Into Darkness and just HAD to check in before I went to bed.
I am at home recovering from surgery so have sooooooo much time to play with things. I really need to see what is outside some days! I have seen a quote from a gamer, something like "I have been outside, graphics are awesome but the game play sucks!" :)
 

Tracy Perry

Well-known member
#20
I'm retired (but do computer work for a couple of offices on the side) but spend most of my time either here, modding my forum, or down at the land hog hunting with my Hakwen .50 rifle.