Difference between revisions of "Munin on Centos 6.5"
Line 76: | Line 76: | ||
− | ''' | + | |
+ | == '''Plugins''' == | ||
+ | |||
+ | '''All actions should be done on the client!''' | ||
+ | You can to add plugins from default munin plugins or import it from other resourses. | ||
+ | For adding default plugins just move files from one directory for other. For example mysql plugin: | ||
+ | ln -s /usr/share/munin/plugins/mysql_* /etc/munin/plugins/ | ||
+ | service munin-node restart | ||
+ | Import new plugins is more difficult. You need to insert plugins to /usr/share/munin/plugins/ and grant rules for this files. For example openvz plugins: | ||
+ | cd /usr/share/munin/plugins/ | ||
+ | chmod 755 openvz* | ||
+ | |||
+ | Then create links for this file in source Munin directory: | ||
+ | |||
+ | ln -s /usr/share/munin/plugins/openvz_* /etc/munin/plugins/ | ||
+ | |||
+ | Create file openvz in /etc/munin/plugins-conf.d/ and insert: | ||
+ | [openvz*] | ||
+ | user root | ||
+ | |||
+ | Restart munin-node: | ||
+ | |||
+ | service minin-node restart | ||
+ | [[Category:Linux]] |
Revision as of 13:46, 2 June 2015
Installation
Add epel repository:
yum install epel-release
Install Munin:
yum install munin munin-node -y
Munin configuring
Open:
nano /etc/httpd/conf.d/munin.conf
Insert after comments:
Alias /munin /var/www/html/munin <Directory /var/www/html/munin> Options FollowSymLinks AllowOverride None Order allow,deny Allow from all </Directory>
Open:
/etc/munin/munin.conf
Edit:
#Uncomment the following lines dbdir /var/lib/munin htmldir /var/www/html/munin logdir /var/log/munin rundir /var/run/munin # a simple host tree. Set your system name [your_server_name] address 127.0.0.1 use_node_name yes
Edit rules:
chown -R munin:munin /var/www/html/munin/
Create new user 'munin' and password for this user:
htpasswd -cm /etc/munin/munin-htpasswd munin
Start Munin, turn on autostarting, restart apache:
/etc/init.d/munin-node start chkconfig munin-node on service httpd restart
Open Munin GUI: http://yourdomain/munin/
Adding new server for monitoring
Install Munin on your client system:
yum install munin-node -y
Open:
/etc/munin/munin-node.conf
Point IP address and name of you main munin server. For example 77.111.333.444:
host_name your_new_HOST allow ^77\.111\.333\.444$ allow ^::1$
Start munin-node on client:
service munin-node start chkconfig munin-node on
On main munin server open:
nano /etc/munin/munin.conf
And add new munin client:
[your_new_HOST] address your_IP_clients_server use_node_name yes
In 5 minutes new host will be add.
Plugins
All actions should be done on the client! You can to add plugins from default munin plugins or import it from other resourses. For adding default plugins just move files from one directory for other. For example mysql plugin:
ln -s /usr/share/munin/plugins/mysql_* /etc/munin/plugins/ service munin-node restart
Import new plugins is more difficult. You need to insert plugins to /usr/share/munin/plugins/ and grant rules for this files. For example openvz plugins:
cd /usr/share/munin/plugins/ chmod 755 openvz*
Then create links for this file in source Munin directory:
ln -s /usr/share/munin/plugins/openvz_* /etc/munin/plugins/
Create file openvz in /etc/munin/plugins-conf.d/ and insert:
[openvz*] user root
Restart munin-node:
service minin-node restart