title: monitor nginx with munin
body: <p>I have tried to setup munin to monitor nginx.. I get the graphs in munin but all data is stated as N/A (except the RAM graph which shows used RAM), so I guess there is something wrong with the setup in nginx</p>
  
  <p>But as shown munin is also setup to monitor PHP and it works.. </p>
  
  <h1>munin</h1>
  
  <pre><code>ln -s /usr/share/munin/plugins/nginx_request /etc/munin/plugins/ -v
  ln -s /usr/share/munin/plugins/nginx_status /etc/munin/plugins/ -v
  cd /var/bin &amp;&amp; wget https://github.com/perusio/nginx-munin/archive/master.zip &amp;&amp; unzip master.zip
  cd nginx-munin-master/ &amp;&amp; cp nginx_connection_request nginx_memory /etc/munin/plugins/ -fv
  /etc/init.d/munin-node restart
  </code></pre>
  
  <h1>nginx</h1>
  
  <pre><code>server {
      listen  80;
      server_name  127.0.0.1;
  
      location ~ ^/(status|ping)$ {
          include  fastcgi_params;
          fastcgi_pass  php;
          fastcgi_param  SCRIPT_FILENAME  $fastcgi_script_name;
          allow  127.0.0.1;
          deny  all;
      }
  
      location /nginx_status {
          stub_status  on;
          access_log  off;
          allow  127.0.0.1;
          deny  all;
      }
  }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/mSxDM.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mSxDM.jpg" alt="enter image description here"></a></p>
  
  <h1>update</h1>
  
  <pre><code># munin-run -d nginx_request
  # Processing plugin configuration from /etc/munin/plugin-conf.d/munin-node
  # Setting /rgid/ruid/ to /117/65534/
  # Setting /egid/euid/ to /117 117/65534/
  # Setting up environment
  # About to run '/etc/munin/plugins/nginx_request'
  request.value U
  </code></pre>