Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Configuring MGRT for multiple devices

Posted on 2010-08-31
11
Medium Priority
?
1,426 Views
Last Modified: 2013-12-16
I am attempting to configure MGRT on Ubuntu 10.04 Linux.  I have been able to get a single device going but I am missing something in the conversion to multiple devices.  
0
Comment
Question by:Sparboe
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
  • 2
  • +1
11 Comments
 
LVL 62

Expert Comment

by:gheist
ID: 33575197
you add them one by one
0
 
LVL 80

Expert Comment

by:arnold
ID: 33575383
An alternative and possibly a better solution is to use cacti from cacti.net
Has templates for various devices/applications.
0
 

Author Comment

by:Sparboe
ID: 33576866
"Arnold:   An alternative and possibly a better solution is to use cacti from cacti.net
Has templates for various devices/applications.
"

Thank you for the tip Arnold. The main reason i am using MRTG is for my Nogios installation for bandwidth monitoring.
0
Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

 
LVL 18

Accepted Solution

by:
TobiasHolm earned 1400 total points
ID: 33577230
Hi!

Found this: "You need to generate file and append it to main config file. Create config for server1, server2 and router1:        Code:
cfgmaker --global 'WorkDir: /var/www/mrtg' --output /tmp/server1.cfg  public@server1.example.com
cfgmaker --global 'WorkDir: /var/www/mrtg' --output /tmp/server2.cfg  public@server2.example.comcfgmaker --global 'WorkDir: /var/www/mrtg' --output /tmp/router1.cfg  public@router1.example.com
You may wanna manually edit or review file before updating the main mrtg.cfg file. Use vi text editor to view all files:
       Code:
vi /tmp/server{1,2}.cfg
Next, ipdate main config file by updating all /tmp/*.cfg config file:

Code:
cat /tmp/server{1,2}.cfg /tmp/router1.cfg >> /etc/mrtg/mrtg.cfg
Just create graphs for all devices:
       Code:
LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg
"
Ref: http://nixcraft.com/centos-rhel-fedora/13830-mrtg-multiple-devices.html

Regards, Tobias
0
 

Author Comment

by:Sparboe
ID: 33577495
"gheist: you add them one by one"

How do you add them one at a time?

When i do

cfgmaker --global "WorkDir: /var/www/mrtg" \
--global "EnableIPv6: no" \
--global "RunAsDaemon: yes" \
--global "Options[_]: bits,growright" \
monitor@10.10.0.100 > /etc/mrtg/mrtg.cfg

it over writes everything in the file....

I did see one article that suggested using

cfgmaker --global "WorkDir: /var/www/mrtg" \
--global "EnableIPv6: no" \
--global "RunAsDaemon: yes" \
--global "Options[_]: bits,growright" \
monitor@10.10.0.100 \
monitor@10.10.0.101 \
monitor@10.10.0.1 \
monitor@10.100.0.1 \
monitor@10.30.0.1 \
monitor@10.50.0.1 \
monitor@10.200.0.1 \
monitor@10.60.0.1 \
monitor@10.70.0.1 \
monitor@10.40.0.1\
monitor@10.45.0.1\
monitor@10.20.0.1\
monitor@localhost > /etc/mrtg/mrtg.cfg

the .cfg file seems to have all the information in it.
then running indexmaker

indexmaker /etc/mrtg/mrtg.cfg > /var/www/mrtg/index.html

the webpage contains all the devices however when u click on them they do not link to anywere
the device specific html, log, png are not created.
0
 
LVL 80

Assisted Solution

by:arnold
arnold earned 600 total points
ID: 33579141
instead of > (insert anew)  you use >> (append)

Do you have a cron job that runs mrtg -c /etc/mrtg/mrtg.cfg ?

Performance wise you would be better off using rrdtool to process the data into data files and then the images will only be generated when accessed.

You are also not including what you are monitoring.
 
You need the OID or the logs/scripts from which data points will be provided to mrtg when it runs.

http://oss.oetiker.ch/mrtg/doc/mrtg-reference.en.html
http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch22_:_Monitoring_Server_Performance#OIDs_And_MIBs
0
 

Author Comment

by:Sparboe
ID: 33580030
After following TobiasHolm suggestion I was able to see the webpage with all the graphs - waiting to see if the graphs fill in.

arnold, it looks like your solution would get the same result. I am not sure how to check cron however the other day i retyped in a command to schedual mgrt and it seemed like it was already there.  What would u change in the configuration for rrdtool
0
 

Author Comment

by:Sparboe
ID: 33580230
"arnold:

Do you have a cron job that runs mrtg -c /etc/mrtg/mrtg.cfg ?"

it seems that the graphs are not updating. this leads me back to your question about cron running..  what commands do you use to verify config? what commands would i use to configure cron to update the mrgt graphs / logs

0
 
LVL 80

Expert Comment

by:arnold
ID: 33581221
The way the data is stored.
http://oss.oetiker.ch/mrtg/doc/mrtg-rrd.en.html

Have a look at cacti.net.  It has templates.
That you can configure the device i.e. provide the type of device, the IP/snmp settings and it will build the polling.  Then you can create the graphs.

It uses RRdtool which means the images are generated only when accessed.
0
 
LVL 18

Assisted Solution

by:TobiasHolm
TobiasHolm earned 1400 total points
ID: 33581589
>I am not sure how to check cron

You can use 'crontab -l' to list cron jobs and you can use 'crontab -e' to edit the cron jobs. This is for the current user. Use sudo to list/edit for root user.

Regards, Tobias
0
 

Author Comment

by:Sparboe
ID: 33590679
I added
 
RunAsDaemon: Yes
interval: 5

to /etc/mrtg/mrtg.cfg

then this in the terminal

env LANG=C /user/bin/mrtg /etc/mrtg/mrtg.cfg

that loaded MRTG as a daemon and has ben populating the graphs

now to award some points and get nagios pointed at the logs.......
0

Featured Post

Learn Veeam advantages over legacy backup

Every day, more and more legacy backup customers switch to Veeam. Technologies designed for the client-server era cannot restore any IT service running in the hybrid cloud within seconds. Learn top Veeam advantages over legacy backup and get Veeam for the price of your renewal

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question