Maintenance: November 2002 Archives

Configuration:
MRTG ver. 2.97
Net-SNMP ver. 4.2.6
OS : RedHat Linux 7.3

This doc should help you with configuring a RedHat Linux box for monitoring system parameters (local/remote), using Net-SNMP and MRTG.


About MRTG and Net-SNMP

MRTG (Multi-Router Traffic Grapher)
The Multi Router Traffic Grapher (MRTG) is a tool to monitor the traffic load on network-links. MRTG generates HTML pages containing graphical images which provide a LIVE visual representation of this traffic.
Check http://www.ee.ethz.ch/stats/mrtg/ for an example.
MRTG is based on Perl and C and works under UNIX and Windows NT.
MRTG is being successfully used on many sites around the net


Net-SNMP

Net-SNMP is a collection of various tools relating to the Simple Network Management Protocol including:

* An extensible agent
* An SNMP library
* tools to request or set information from SNMP agents
* tools to generate and handle SNMP traps
* a version of the unix 'netstat' command using SNMP
* a graphical Perl/Tk/SNMP based mib browser

To manage and process logs of multiple webservers, Rsync provides the best method for transferring the logs from servers to centralized log processing server.

There are two major steps involved
a) Configuring the Log Processing Server (IP: 192.168.1.1)
b) Configuring the client (say, www.myserver.com) to transfer the logs to the central server.

Configuring the Log Processing Server

Let this server have IP address 192.168.1.1. We create a directory , /usr/local/logs, where the log files would be downloaded. We create a subdirectory for www.myserver.com, under /usr/local/logs. (mkdir /usr/local/logs/www.myserver.com)

a. create a group logman and add user logman to it. This will be the uid/gid for the log files
b. edit/create /etc/rsyncd.conf, with the following details:

uid = logman
gid = logman
use chroot = yes
max connections = 4
log file = /var/log/rsyncd.log
pid file = /etc/rsyncd.pid

[www.myserver.com_logs]
comment = here are the apache access logs from www.myserver.com downloaded
path = /usr/local/logs/www.myserver.com/
hosts allow = www.myserver.com
read only = no

c. Now, run rsync:
# rsync --daemon

We have now successfully configured our server to received log files.

Configuring the clients to transfer the logs

on the client system (www.myserver.com), run this command periodically, to transfer the logs:
rsync -azvu /usr/local/apache/logs/access_logs 192168.1.1::www.myserver.com_logs

This way, the logs would be transferred to 192.168.1.1, and would be updated (not deleted and recreated, differential transfer) everytime.

About this Archive

This page is a archive of entries in the Maintenance category from November 2002.

Maintenance: April 2005 is the next archive.

Find recent content on the main index or look in the archives to find all content.

Maintenance: November 2002: Monthly Archives

Powered by
Movable Type 4.01