MRTG on Linux

How to configure MRTG on Linux ?

I was asked to generate a MRTG graphc from the data ? Any guideline and sample on how to do this ?

Tks
AXISHKAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Zephyr ICTCloud ArchitectCommented:
There are plenty of guides out there:

For RH/Centos 6.5 (basically the same for version 7) this one is pretty thorough and easy to follow.

Just boils down to:

1. Make sure Apache is installed
2. Install SNMP
3. Install MRTG
4. Config MRTG
AXISHKAuthor Commented:
Any more guideline on further customize the layout into different graphic option ?

Tks
Zephyr ICTCloud ArchitectCommented:
Except for the official MRTG manual not immediately that I know of, take a look at cfgmaker for example.
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

AXISHKAuthor Commented:
#1Under /etc/snmp/snmpd.conf

74 com2sec local localhost mysql01
75 com2sec mynetwork 192.168.49.0/24 mysql01

How should I change to monitor a remote server

#2 What's the meaning of this command
snmpwalk -v2c -c mysql01 localhost system

#3 What's the purpose of the command
cfgmaker --ifref=descr --ifdesc=descr mysql01@192.168.49.19 > /etc/mrtg/mrtg.cfg

#4 Execute 3 times the below  script line - what does it do ?

#5 does it use the mrtg.cfg to generate the output data, ie index.html ?
[root@mysql01 ~]# indexmaker --columns=1 /etc/mrtg/mrtg.cfg > /var/www/mrtg/index.html


Tks again .
Zephyr ICTCloud ArchitectCommented:
#1Under /etc/snmp/snmpd.conf

74 com2sec local localhost mysql01
75 com2sec mynetwork 192.168.49.0/24 mysql01
Line 74 means it will also monitor localhost, line 75 means it monitors the whole network range, to add a remote host to monitor instead of a whole network range add something like this:

com2sec   user     <hostname or ip>  public

Open in new window

Where user is the user authenticated for snmp and public the snmp community.

#2 What's the meaning of this command
snmpwalk -v2c -c mysql01 localhost system
It will test your localhost or remote host for snmp access and to see if information comes back. The syntax is kinda the same as in the config earlier ...

snmpwalk -v2c -c user <hostname or ip> public

Open in new window


#3 What's the purpose of the command
cfgmaker --ifref=descr --ifdesc=descr mysql01@192.168.49.19 > /etc/mrtg/mrtg.cfg
It will add devices you want to graph into your mrtg.cfg file ... Read the syntax in the link I provided to the cfgmaker for more info...

--ifref= interface reference, can be different kinds of things, you can set it as --ifref=ip  for ip-address or as it is in the example interface description. same goes for the --ifdesc, then it's user@ip-address-of-the-remote-device and put this into the config.

#4 Execute 3 times the below  script line - what does it do ?
It's a script the writer of the post used to update the config, i.e change some log files I think, he runs it 3 times to make sure all changes are reflected.

#5 does it use the mrtg.cfg to generate the output data, ie index.html ?
[root@mysql01 ~]# indexmaker --columns=1 /etc/mrtg/mrtg.cfg > /var/www/mrtg/index.html

Yes

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
AXISHKAuthor Commented:
Tks
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.