MRTG and SNMP setup

refer here :

http://www.cyberciti.biz/nixcraft/linux/docs/uniqlinuxfeatures/mrtg/mrtg_references.php

mrtg.png

Basically , you need to properly setup the snmpd..
then test will snmp walk…

then only setup mrtg to parse the data and generate output
peridocally..

su -
yum install net-snmp-utils net-snmp -y

kill -9 21282
ps xa | grep rpm
rpm -aq | grep mrtg
cd /var/www/html/
ls
mkdir stats
cfgmaker --global 'WorkDir: /var/www/html/stats' --output /etc/mrtg/sa.cfg [email protected]
indexmaker --output=/var/www/html/stats/index.html /etc/mrtg/sa.cfg
which mrtg
ls
cd ..

cp -av /var/www/mrtg/*.png /var/www/html/stats/
ls

env LANG=C mrtg /etc/mrtg/sa.cfg
crontab -e

export SERVER="192.168.x.xxx"
iptables -A OUTPUT -p udp -s $SERVER --sport 1024:65535 -d 0/0 --dport 161:162 -m state --state NEW,ESTABLISHED -j ACCEPT

iptables -A INPUT -p udp -s 0/0 --sport 1024:65535 -d $SERVER --dport 161:162 -m state --state NEW,ESTABLISHED -j ACCEPT

iptables -A OUTPUT -p udp -s $SERVER --sport 161:162 -d 0/0 --dport 1024:65535 -m state --state ESTABLISHED -j ACCEPT

iptables -A OUTPUT -p udp -s $SERVER --sport 1024:65535 -d 0/0 --dport 161:162 -m state --state NEW,ESTABLISHED -j ACCEPT

service iptables sa ve
cd html/
ls
cd stats/
ls
vi .htaccess

mkdir /var/members
htpasswd -c /var/members/.htpass wd mrtgadmin

ls
cd ..
ls
cd /etc/mrtg/
ls
vi sa.cfg

ps xa
ip addr

ls
pwd
indexmaker --output=/var/www/html/stats/index.html /etc/mrtg/sa.cfg

screenshot.png

Related Post

8 Responses

  1. Arsento says:

    I liked it. So much useful material. I read with great interest.

    Reply
  2. aLe aRdHo says:

    Nice Articel, thanks for sharing 😉

    Reply
  3. watches says:

    OK. Bless you on your mission. watches

    Reply
  4. Suresh says:

    Thanks & All the Best.

    Reply
  5. jimmy choo outlet online says:

    Your article is very nice

    Reply
  6. Davein says:

    SO FUN ARTIAL

    Reply
  7. burberry bags says:

    ack Obama. Younger voters and liberals, too, but to a lesser extent. All are important Democratic constituencies that helped him win the White House in 2008 and whose support he’ll need to keep it next year. An analysis of Associated Press-GfK polls, includin

    Reply
  8. moncler says:

    I added it to favorites and i’ll be your constant reader.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *