
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 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 will output its reports
htpasswd -c /etc/nginx/.htpasswd username
Now add a new site to nginx
vi /etc/nginx/sites-enabled/waltercedricAnd put at least the following inside
server {
listen 80;
server_name munin.acme.com;
root /var/cache/munin/www;
location / {
expires off;
auth_basic "Munin";
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
Privacy Statement | Copyright Notice | Licenses
© 1999-2012 Waltercedric.com. Designed by Cédric Walter. Sitemap
Reproduction without explicit permission is prohibited. All Rights Reserved.
Disclaimer: The editor(s) reserve the right to edit any comments that are found to be abusive, offensive, contain profanity, serves as spam, is largely self-promotional, or displaying attempts to harbour irrelevant text links for any purpose.