Munin is a networked resource monitoring tool that can help analyze resource trends and "what just happened to kill our performance?" problems. It is designed to be very plug and play. A default installation provides a lot of graphs with almost no work.

In Norse mythology Hugin and Munin are the ravens of the god king Odin. They flew all over Midgard for him, seeing and remembering, and later telling him. "Munin" means "memory".

Install Munin&160;by issuing as root

apt-get install munin munin-node munin-plugins-extra

Activate as many plugins as required, there is more than 230 plugins!

acpi                      jmx_                     qmailscan-simple
amavis                    load                     quota_usage_
apache_accesses           loggrep                  samba
apache_processes          lpar_cpu                 selinux_avcstat
apache_volume             lpstat                   sendmail_mailqueue
apc_envunit_              mailman                  sendmail_mailstats
apc_nis                   mailscanner              sendmail_mailtraffic
apt                       mbmon_                   sensors_
apt_all                   memcached_               slapd_
asterisk_channels         memory                   slapd_bdb_cache_
asterisk_channelstypes    mhttping                 slony_lag_
asterisk_codecs           multigraph_tester        smart_
asterisk_meetme           multiping                snmp__cpuload
asterisk_meetmeusers      multips                  snmp__df
asterisk_sipchannels      multips_memory           snmp__fc_if_
asterisk_sippeers         munin_stats              snmp__fc_if_err_
asterisk_voicemail        munin_update             snmp__if_
bind9                     mysql_                   snmp__if_err_
bind9_rndc                mysql_bytes              snmp__if_multi
bonding_err_              mysql_innodb             snmp__load
buddyinfo                 mysql_isam_space_        snmp__memory
cmc_tc_sensor_            mysql_queries            snmp__netapp_diskusage_
colour_tester             mysql_slowqueries        snmp__netapp_inodeusage_
courier_                  mysql_threads            snmp__netstat
courier_mta_mailqueue     named                    snmp__print_pages
courier_mta_mailstats     netopia                  snmp__print_supplies
courier_mta_mailvolume    netstat                  snmp__processes
cps_                      nfs4_client              snmp__rdp_users
cpu                       nfs_client               snmp__sensors_fsc_bx_fan
cpuspeed                  nfsd                     snmp__sensors_fsc_bx_temp
cupsys_pages              nfsd4                    snmp__sensors_fsc_fan
df                        nginx_request            snmp__sensors_fsc_temp
df_abs                    nginx_status             snmp__sensors_mbm_fan
df_inode                  nomadix_users_           snmp__sensors_mbm_temp
dhcpd3                    ntp_                     snmp__sensors_mbm_volt
digitemp_                 ntp_kernel_err           snmp__swap
diskstat_                 ntp_kernel_pll_freq      snmp__uptime
diskstats                 ntp_kernel_pll_off       snmp__users
ejabberd_                 ntp_offset               snmp__winload
entropy                   ntp_states               snmp__winmem
env                       nut_misc                 snort_alerts
exim_mailqueue            nutups_                  snort_bytes_pkt
exim_mailqueue_alt        nut_volts                snort_drop_rate
exim_mailstats            nvidia_                  snort_pattern_match
extinfo_tester            open_files               snort_pkts
fail2ban                  open_inodes              snort_traffic
files_                    openvpn                  spamstats
foldingathome             perdition                squeezebox_
foldingathome_rank        ping_                    squid_cache
foldingathome_wu          plugin.sh                squid_icp
forks                     plugins.history          squid_objectsize
freeradius_acct           pm3users_                squid_requests
freeradius_auth           pop_stats                squid_traffic
freeradius_proxy_acct     port_                    surfboard
freeradius_proxy_auth     postfix_mailqueue        swap
fw_conntrack              postfix_mailstats        sybase_space
fw_forwarded_local        postfix_mailvolume       tcp
fw_packets                postgres_bgwriter        threads
haproxy_                  postgres_cache_          tomcat_
hddtemp                   postgres_checkpoints     tomcat_access
hddtemp2                  postgres_connections_    tomcat_jvm
hddtempd                  postgres_connections_db  tomcat_threads
hddtemp_smartctl          postgres_locks_          tomcat_volume
http_loadtime             postgres_querylength_    uptime
id                        postgres_scans_          users
if_                       postgres_size_           varnish_
if_err_                   postgres_transactions_   vlan_
ifx_concurrent_sessions_  postgres_tuples_         vlan_inetuse_
interrupts                postgres_users           vlan_linkuse_
iostat                    postgres_xlog            vmstat
iostat_ios                processes                vserver_cpu_
ip_                       proc_pri                 vserver_loadavg
ipac-ng                   proxy_plugin             vserver_resources
ipmi_                     ps_                      warning_tester
ipmi_sensor_              psu_                     yum
ircu                      qmailqstat               zimbra_
irqstats                  qmailscan

Here are some I did add to the list of already activated one. Some were added for obvious reason like mysql, nginx and fail2ban to monitor SSH brute force attempt…

cd /etc/munin/plugins/

ln -s /usr/share/munin/plugins/nginx_status nginx_status

ln -s /usr/share/munin/plugins/nginx_request nginx_request

ln -s /usr/share/munin/plugins/mysql_ mysql

ln -s /usr/share/munin/plugins/mysql_queries mysql_queries

ln -s /usr/share/munin/plugins/fail2ban fail2ban

Fail2Ban require root access to the socket of fail2ban, so edit munin-node

vi /etc/munin/plugin-conf.d/munin-node

And append at the end

[fail2ban*]
user root

Restart Munin-node and force the munin-cron process to run the initial html reports or wait 5 minutes…

/etc/init.d/munin-node restart
sudo -u munin munin-cron

Add to the crontab of the user Munin the command to run Munin every 5 minutes:

sudo -u munin crontab –e
*/5 * * * * /usr/bin/munin-cron

Protect the server host where Munin&160;will output its reports

htpasswd -c /etc/nginx/.htpasswd username

Now add a new site to nginx

vi /etc/nginx/sites-enabled/waltercedric
And put at least the following inside

server {
listen&160;&160;&160;&160;&160;&160; 80;
server_name&160; munin.acme.com;
root /var/cache/munin/www;
location / {
&160;&160;&160; expires off;
&160;&160;&160; auth_basic "Munin";
&160;&160;&160; auth_basic_user_file /etc/nginx/.htpasswd;
}
}

And reload nginx configuration with service nginx reload

You can now point any browser to http://munin.acme.com

comments powered by Disqus

You might like also

Use the latest nginx in Ubuntu 12.04 Precise Pangolin
Official version of nginx for Ubuntu Precise is 1.1.19 but the latest available stable version is 1.2.8 (Changes), In this post I will present you how to update to the latest available version. Thanks to Ondřej Surý,&160; maintainer for some Debian packages, you can have the latest PHP5 maintained by Debian PKG PHP Team in Ubuntu Precise, Quantal , and Lucid. Just run as root the following to use nginx add-apt-repository ppa:ondrej/nginxapt-get update apt-get upgrade apt-get dist-upgrade You can check …
2197 Days ago
Use the latest PHP 5.4 in Ubuntu 12.04 Precise Pangolin
11-Apr-2013 The PHP development team announces the immediate availability of PHP 5.4.14 and PHP 5.3.24. These releases fix about 10 bugs aswell as upgrading the bundled PCRE library. All users of PHP are encouraged to upgrade to PHP 5.4.14. For source downloads of PHP 5.4.14 and PHP 5.3.24 please visit our downloads page, Windows binaries can be found on windows.php.net/download/. The list of changes are recorded in the ChangeLog. Thanks to Ondřej Surý,&160; maintainer for some Debian packages, you can …
2197 Days ago
Updating PHP5 to PHP 5.3.10 on Ubuntu
Thanks to Nathan Rennie-Waldock. you can have the latest PHP5 5.3.10 running in Ubuntu Oneiric, Natty, Maverick and Lucid. PHP 5.3.10 fixes critical remote code execution vulnerability The vulnerability was introduced by the fix for a hash collision denial-of-service flaw Proof-of-concept code that exploits this vulnerability has already been published online Nathan Rennie-Waldock Personal Package Archives (PPA) is located at https://launchpad.net/~nathan-renniewaldock/+archive/ppa Just run as root the following to use PHP 5.3.10 sudo add-apt-repository ppa:nathan-renniewaldock/ppasudo apt-get update sudo apt-get upgrade Canonical …
2636 Days ago
Vmware Virtual Appliance Ubuntu 11.10 x64 Server
Download and install the latest&160; VMware Player 4.0.2 to run this Virtual Appliance “Ubuntu 11.10 x64 Server” Ready to user stock Ubuntu 64 bit Server 11.10 (Oneiric Ocelot) on Vmware This virtual appliance may be used by multi purpose operations, such as source control management server, development server, ftp server, or for testing some changes before rolling them out against your productive server and so on… &160; &160; Download for FREE&160; Ubuntu 11.10 x64 Server.7z (2.2GB) for Vmware From http://linux.waltercedric.com/ …
2637 Days ago
Vmware Virtual Appliance Ubuntu 11.10 x64 Desktop
Download and install VMware Player 4.0.2 to run this Virtual Appliance “Ubuntu 11.10 x64 Server” Ready to user stock Ubuntu 64 bit Desktop 11.10 (Oneiric Ocelot) on Vmware This virtual appliance may be used by multi purpose operations, such as source control management server, development server, ftp server, and so on… &160; Download for FREE Ubuntu 11.10 x64 Desktop.7z (4.65GB) for Vmware&160; From http://linux.waltercedric.com/ VM Information CPU's : 1 Memory : 1G Disk : 20G Authentication Credentials Username : user …
2637 Days ago
Updating PHP5 to PHP 5.3.9 on Ubuntu 11.10 Oneiric
Thanks to Ondřej Surý,&160; maintainer for some Debian packages, you can have the latest PHP5 maintained by Debian PKG PHP Team in Ubuntu Oneiric, Natty, Maverick and Lucid. Currently it is the previous version 5.3.9, but that’s already a lot better than 5.3.6 (Official in Ubuntu 11.10 Oneiric). I did contact Ondřej to ask him for updating the Personal Package Archive to 5.3.10. Personal Package Archives (PPA) allow you to upload Ubuntu source packages to be built and published as …
2638 Days ago
Ubuntu update to the latest nginx 1.1.13
Here is how to update in Ubuntu Oneiric 11.10&160; to the latest development version of nginx (1.1.13). The latest stable version being the 1.0.11 add-apt-repository ppa:chris-lea/nginx-devel apt-get update apt-get upgrade …
2643 Days ago
Updating From Ubuntu 10.04 LTS to Ubuntu 11.10
Make sure that your data are safe and that your backups are working and in a safe place: obviously not on the server you are currently upgrading! While being logged in as root, you’ll have to edit the file /etc/update-manager/release-upgrades and set the value prompt to normal. …
2654 Days ago
Backup Your Ubuntu/Debian Server Automatically
I am using ReoBack for this duty REOBack (pronounced "ray-o-back") is a backup solution designed for Linux users and system administrators. It is designed to be simple to set up, and easy to use. It is great as a quick solution for those who procrastinate about backups. It supports automatic full/incremental backups of files you define, remote backups via NFS or FTP, as well as auto deletion of old backups. And here is my how to install for Debian /Ubuntu …
2878 Days ago
No Thumbnail was found
What is mod_evasive? mod_evasive is an evasive maneuvers module for Apache to provide evasive action in the event of an HTTP DoS or DDoS attack or brute force attack. It is also designed to be a detection and network management tool, and can be easily configured to talk to ipchains, firewalls, routers, and etcetera. mod_evasive presently reports abuses via email and syslog facilities. Detection is performed by creating an internal dynamic hash table of IP Addresses and URIs, and denying …
2978 Days ago