Install and setup Munin
Setup munin-node
Enabling munin-node plugins
Munin is a server monitoring and status application that provides two components:
- munin - The server component in which munin-node reports. This program generates the HTML output.
- munin-node - Installert på maskiner som skal overvåkes, tillater plugin-basert arkitektur overvåking av nesten alle fasett av en Vultr VPS.
Munin kan gi status og overvåking for enhver konfigurasjon fra en enkelt VPS til et helt datasenter med maskiner.
Følgende guide forutsetter at du er logget på som root og kjører CentOS 6 x64 på Vultr. Denne veiledningen bør også gjelde for CentOS 7.
Du trenger to servere.
- Server A: Vår overvåkingsserver hvor statusen vil være synlig. Fra nå av referert til som 192.168.10.1.
- Server B: Vår server som vi ønsker å overvåke. Referert til som 192.168.10.2.
Note that you can also monitor Server A, if desired.
Installer og konfigurer Munin
Følg disse trinnene på server A.
Installer først Apache for å betjene Munin-serverstatussiden vår, så vel som Munin selv.
yum install httpd munin
Installer nano hvis du ikke er komfortabel i vi.
yum install nano
It's time to edit the Munin configuration to add monitoring of our additional servers, as by default Munin only monitors the local machine. Run the following.
nano /etc/munin/munin.conf
At the bottom, append the following where 192.168.10.2 is replaced with the IP address of Server B, and "serverb" is replaced with a descriptive hostname.
[serverb]
address 192.168.10.2
use_node_name yes
Additional servers to be monitored can be added in the same manner.
By default, Munin is not secured with a password. To setup a password, run the following:
nano /etc/munin/munin-htpasswd
... and enter a password to secure your Munin installation.
The username is munin.
Start Apache and Munin-node.
service start httpd
service start munin-node
You will now be able to login to http://[SERVER_A_IP]/munin with the username munin and the password you have just specified.
Fortsett nedenfor for å sette opp munin-node på flere maskiner og konfigurere munin-node plugins.
Sett opp munin-node
Følgende kan brukes på Server A, Server B og så mange ekstra servere som er nødvendig.
Installer munin-node hvis den ikke allerede er installert.
yum install munin-node
Rediger munin-node.conffilen.
nano /etc/munin/munin-node.conf
Legg til en ny linje med IP-adressen til Server A. Adressen må være i formatet til et regulært uttrykk. Erstatt "192.168.10.1" IP-adressen til server A.
allow ^192\.168\.10\.1$
På dette tidspunktet kan du starte munin-node.
service munin-node restart
Server Bs status vil være synlig på din Munin-statusside http://[SERVER_A_IP]/munininnen noen få minutter.
Aktiverer munin-node plugins
munin-node kommer pakket med et bredt utvalg av plugins.
For å bla gjennom tilgjengelige plugins:
cd /usr/share/munin/plugins/
ls
Alle plugins kan aktiveres ved å opprette en symbolsk lenke til den i /etc/munin/pluginsmappen. For å aktivere Apache-statusplugins, kjør for eksempel følgende kommandoer:
ln -s /usr/share/munin/plugins/apache_accesses /etc/munin/plugins/apache_accesses
ln -s /usr/share/munin/plugins/apache_processes /etc/munin/plugins/apache_processes
ln -s /usr/share/munin/plugins/apache_processes /etc/munin/plugins/apache_volume
... start deretter munin-node på nytt.
service munin-node restart
Vent noen minutter og statusen din vil være tilgjengelig på hovedserveren din.