Difference between revisions of "SUNScholar/Disaster Recovery/System Monitor/Client"

From Libopedia
Jump to navigation Jump to search
m
 
(48 intermediate revisions by the same user not shown)
Line 1: Line 1:
Login and become the root user.
+
<center>
 +
'''[[SUNScholar/Disaster Recovery/System Monitor|Back to Disaster Recovery System Monitor]]'''
 +
</center>
  
==[[SUNScholar/Disaster_Recovery/Preparation|First click here to create a PostgreSQL credentials file.]]==
+
<font color="red">'''First [[SUNScholar/Disaster_Recovery/Preparation|click here]] to create a PostgreSQL credentials file.'''</font>
  
 
Then continue.
 
Then continue.
  
==Install munin as follows:==
+
Add a firewall rule to allow the monitoring server to get the stats:
  apt-get install libdbd-pg-perl
+
sudo ufw allow 4949
 +
 
 +
Install munin as follows:
 +
 
 +
Login and become the root user and install the following:
 +
  sudo apt-get install munin-node libdbd-pg-perl libxml-simple-perl libcache-cache-perl
 +
 
 +
Setup munin to allow the monitoring server to gather statistics as follow:
 +
sudo nano /etc/munin/munin-node.conf
  
  apt-get install munin-node
+
Add the following to the file:
 +
  allow $IP-ADDRESS-of-monitoring-server%
 +
''Note: At SULIS our monitoring server IP address is: 146.232.128.15''
  
==Setup munin to allow the monitoring server to gather statistics as follow:==
+
Change the following:
nano /etc/munin/munin-node.conf
 
===Add the following to the bottom of the file:===
 
allow $ip-address-of-monitoring-server%
 
===Change the following:==
 
 
  host_name %hostname-of-client%
 
  host_name %hostname-of-client%
 +
 +
See example below.
 +
<pre>
 +
# Set this if the client doesn't report the correct hostname when
 +
# telnetting to localhost, port 4949
 +
#
 +
host_name repository.sun.ac.za
 +
 +
# A list of addresses that are allowed to connect.  This must be a
 +
# regular expression, since Net::Server does not understand CIDR-style
 +
# network notation unless the perl module Net::CIDR is installed.  You
 +
# may repeat the allow line as many times as you'd like
 +
 +
allow ^127\.0\.0\.1$
 +
allow ^146\.232\.128\.15$
 +
allow 146.232.128.15
 +
</pre>
  
 
{{NANO}}
 
{{NANO}}
  
==Run the following command to check to update stats available:==
+
Run the following command to update stats available:
  munin-node-configure --shell | bash -
+
  sudo munin-node-configure --shell | bash -
 +
 
 +
Restart the local Munin daemon
 +
 
 +
; It is necessary to restart the local munin daemon so that the remote server may connect.
 +
 
 +
sudo service munin-node restart
  
==Check which stats are available==
+
Check which stats are available
 
  cd /etc/munin/plugins
 
  cd /etc/munin/plugins
  
 
  ls -l
 
  ls -l
 
==Add a firewall rule to allow the monitoring server to get the stats:==
 
ufw allow 4949
 
  
 
Thats it. As usual there is a lot of documentation about Munin out there.
 
Thats it. As usual there is a lot of documentation about Munin out there.
  
'''[[SUNScholar/Disaster Recovery/System Monitor|Back to Disaster Recovery System Monitor]]'''
+
===References===
 +
*http://serverfault.com/questions/339472/configuring-the-tomcat-plugin-of-munin
 +
*http://munin-monitoring.org/browser/munin-contrib/plugins/tomcat/tomcat_access
 +
*https://github.com/matsukaz/Munin-Tomcat-Plugin-with-multi-connectors
 +
*https://github.com/witscher/tomcat7-munin-plugins
 +
[[Category:System Administration]]

Latest revision as of 11:20, 28 May 2016

Back to Disaster Recovery System Monitor
First click here to create a PostgreSQL credentials file.

Then continue.

Add a firewall rule to allow the monitoring server to get the stats:

sudo ufw allow 4949

Install munin as follows:

Login and become the root user and install the following:

sudo apt-get install munin-node libdbd-pg-perl libxml-simple-perl libcache-cache-perl

Setup munin to allow the monitoring server to gather statistics as follow:

sudo nano /etc/munin/munin-node.conf

Add the following to the file:

allow $IP-ADDRESS-of-monitoring-server%

Note: At SULIS our monitoring server IP address is: 146.232.128.15

Change the following:

host_name %hostname-of-client%

See example below.

# Set this if the client doesn't report the correct hostname when
# telnetting to localhost, port 4949
#
host_name repository.sun.ac.za 

# A list of addresses that are allowed to connect.  This must be a
# regular expression, since Net::Server does not understand CIDR-style
# network notation unless the perl module Net::CIDR is installed.  You
# may repeat the allow line as many times as you'd like

allow ^127\.0\.0\.1$
allow ^146\.232\.128\.15$
allow 146.232.128.15

NANO Editor Help
CTL+O = Save the file and then press Enter
CTL+X = Exit "nano"
CTL+K = Delete line
CTL+U = Undelete line
CTL+W = Search for %%string%%
CTL+\ = Search for %%string%% and replace with $$string$$
CTL+C = Show line numbers

More info = http://en.wikipedia.org/wiki/Nano_(text_editor)


Run the following command to update stats available:

sudo munin-node-configure --shell | bash -

Restart the local Munin daemon

It is necessary to restart the local munin daemon so that the remote server may connect.
sudo service munin-node restart

Check which stats are available

cd /etc/munin/plugins
ls -l

Thats it. As usual there is a lot of documentation about Munin out there.

References