Note: This post is over two years old and so the information contained here might be out of date. If you do spot something please leave a comment and we will endeavour to correct.
26th July 2013 - 5 minutes read time
When you first install a Munin node it will try to install as many plugins as it can so that it can report on different things. For example, if you have a Varnish server running then Munin will detect this and enable the plugins so that it can report on the activity of Varnish. Once you have started getting data through to your Munin server then you can turn on plugins on the nodes to get more data.
The data of any plugin is presented in a standard format and so is understood by the Munin server. Perhaps the most important plugin for my work is the Apache status plugin that shows what is going on inside Apache. This plugin isn't always installed with the Munin node and so you might have to do this yourself. This is a good way of getting familiar with Munin plugins.
To install a Munin plugin you just need to link it from the directory /usr/share/munin/plugins/ to /etc/munin/plugins/. If you look at the contents of the first directory you will see a lot of different plugins available, some of which will already be linked from the second directory. You can run the following command to install the Apache plugins. Once the Munin plugin is linked you need to restart the Munin node to pick up the plugin.
You might find that the Apache plugins are aready linked. If this is the case then it will probably be because Munin can't see the Apache reports. You'll need to enable the Server Status Apache mod in order to allow Munin to report on Apache statistics. The first thing to do is turn on the ExtendedStatus setting in the Apache configuration file. If you are on Ubuntu then the file you need is located at /etc/apache2/mods-available/status.conf. This setting might also live in the file sudo vi /etc/http/conf/httpd.conf if you are on Centos. You need to change the ExtendedStatus flag to be On, which usually means just uncommenting the line in question.
ExtendedStatus On
Once this is done you need to allow access to the /server-status address from the server itself. This page reports on various statistics from the Apache server, including the number of requests being made and the number of Apache workers currently active. This page is used by the Munin Apache plugins to gain information about the Apache server. Because of the sensitive nature of this data it's best to block access from anyone but requests from the localhost. Adding the following clause into your Apache server config will do this. If you are on Ubuntu then this is already defined.
<IfModule mod_status.c>
ExtendedStatus On
<Location /server-status>
SetHandler server-status
Order deny,allow
Deny from all
Allow from localhost ip6-localhost
</Location>
</IfModule>
Once you have made these changes you need to restart Apache for them to be loaded. With this in place on your Munin node you will now start seeing Apache statistics being generated in your Munin graph data.
I work on a couple of ThinkPad laptops (T490 and a P14s) and whilst they have fingerprint scanners I haven't really considered using them. I once attempted to get a fingerprint scanner working in Linux on an old HP laptop and that experience put me off trying again.
Timing web requests is possible in curl using the -w or --write-out flag. This flag takes a number of different options, including several time based options.
In Linux, creating a symlink is a common way of ensuring that the directory structure of a deployment will always be the same. For example you might create a symlink so that the release directory of release123/docroot will instead be just current.
I'm a proponent of automation, so when I find myself running the same commands over and over I always look for a way of wrapping that in an alias or script.
Grep is a really powerful tool for finding things in files. I often use it to scan for plugins in the Drupal codebase or to scan through a CSV or log file for data.
For example, to scan for user centric ViewsFilter plugins in the Drupal core directory use this command (assuming you are relative to the core directory).
Comments
Submitted by John on Sat, 07/04/2015 - 18:18
PermalinkAdd new comment