Results 1 to 7 of 7

Thread: MRTG Problem

  1. #1
    Newbie
    Join Date
    Jun 2004
    Location
    Chittagong, Bangladesh
    Posts
    7

    MRTG Problem

    i m a newbie in RedHat Linux. i've practiced the tutorials of this site about MRTG. but it worked only with public ip. how can i make it use with private ip ?? let me explain details abt what i m going to do:

    i've a RedHat 8 Linux machine using as router for my 3 client machine. I got a private ip frm my isp.

    eth0 : 192.168.100.99 (connected with ISP)
    eth1: 192.168.1.1 (connected with lan)

    now i want to use another linux machine for MRTG server with

    192.168.100.100 on eth0
    192.168.1.x on eth1.

    please let me know what will be my /etc/snmp/snmpd.conf configuration.

    and what will be my cfgmaker command

    please help me out !!

    thanking u all

  2. #2
    Administrator Associate gr8rcake's Avatar
    Join Date
    May 2004
    Posts
    44
    MRTG should work just fine with private IP addresses.

    1) Make sure the target of your MRTG query isn't running firewall software that prevents SNMP requests from your MRTG server.

    2) Make sure you aren't running TCP wrappers (a hosts.allow file that isn't blank) that prevents SNMP queries from the MRTG server.

    3) Make sure the routing on the target device is correct so that your MRTG server can correctly access it. Try using "ping" or try to log into the target device from the MRTG server as a test for this.

    I see where your ISP has given you an RFC1918 IP address. This is invalid on the Internet and they are probably doing NAT to a real Internet IP address somewhere on their network to provide you with Internet access.

    An SNMP query to this RFC1918 IP address from the Internet will fail. You may need to ask your ISP for a non private space IP address, or get them to set up a 1 to 1 NAT for you to allow the query.

    I don't recommend doing or allowing SNMP queries over the Internet. SNMP is un encrypted and you run the risk of sensitive data such as passwords, bandwidth data etc being intercepted by unwanted eyes.

  3. #3
    Newbie
    Join Date
    Jun 2004
    Location
    Chittagong, Bangladesh
    Posts
    7
    thanx for ur reply,

    yap its working now !! thank u very much !! ur tips helped me a lot !!

    "I see where your ISP has given you an RFC1918 IP address. This is invalid on the Internet and they are probably doing NAT to a real Internet IP address somewhere on their network to provide you with Internet access"

    u r right ! but i don need to access mrtg frm internet rite now !! i m just practicing it ........

    another thing, if i want to edit /etc/mrtg/mymrtg.cfg for editing some information like followingings.......

    System: something in Unknown
    Maintainer: root@localhost
    Description: eth0
    ifType: ethernetCsmacd (6)
    ifName:
    Max Speed: 10.0 Mbits/s
    Ip:

    do i need to do anything else for the perfect effectivness of this editing ??

    thanx again

  4. #4
    Administrator Moderator
    Member
    starfish's Avatar
    Join Date
    Apr 2004
    Posts
    141
    Orko,

    I'd suggest that you just use the cfgmaker script to create your configuration file as it is much easier to use than creating a configuration file from scratch. Save a copy of your old of /etc/mrtg/mymrtg.cfg just in case you need it later.

    Here is a link you can use:

    http://www.linuxhomenetworking.com/linux-hn/mrtg.htm

    The information you are asking about appears to be from the HTML graph output of MRTG. You can alter this information using the cfgmaker script too.

    Remember to run the indexmaker script after you create the MRTG configuration files so that the HTML page can be correctly recreated.

  5. #5
    Newbie
    Join Date
    Jun 2004
    Location
    Chittagong, Bangladesh
    Posts
    7
    thanx a lot starfish,

    do u have any url that discuessed details abt cfgmaker ?? i think editing /etc/mrtg/something.mrtg is creating some problem. plz have a look in the follwing link

    http://www.fnfbd.net/mrtgprob.png


    the client was shutdown from 8pm to 11 am . but the mrtg graph in mrtg server is showing the constant consumption of 30 kbits/s rather then 0 kbits/s . i think 30 kbits was the last moment consumption b4 the client pc is going to shut down.

    how can i fix it ?? if i do cfgmaker and indexmaker for the same client, what will happen ?? the new command replace all the privious data abt traffic analysis ?? do i need to delete old /etc/mrtg/something.mrtg file ?? or just cfgmaker --output=/etc/mrtg/something.mrtg ifref=ip ...... will replace everything and will be a new mrtg file without any problem ??

    thank u again,

  6. #6
    Administrator Moderator
    Member
    starfish's Avatar
    Join Date
    Apr 2004
    Posts
    141
    I have seen cases where mistakes in an MRTG config file have caused the same type of flat line graph.

    The URL I gave before explains how to use cfgmaker and indexmaker reasonably well.

    Your MRTG data files are usually stored in the same directory as your MRTG HTML files. Save copies (all files, including HTML) in a safe place before you continue.

    Use cfgmaker to create a new configuration file with a new name. this will reduce the risk of lost data.

    Make sure the labels inside the brackets of the new file is different from the old configuration file. I suspect you may have something looking like this [192.168.100.215_192.168.100.215]. You'll notice that all your data files probably start with this 192.168.100.215_192.168.100.215 label.

    If the values in the brackets are the same in both files, then do a search and replace in the new file to give the values inside the brackets a new name. You don't want to have one configuration file over writing the other's data.

    Run indexmaker with both the new and old configuration files as arguements. This will give you an index.html file with both sets of graphs, the manually configured and the cfgmaker generated ones.

    Include the new configuration file in your crontab file so that MRTG uses it to create new graphing points.

    Test and make sure the graphs are updating correctly.

    If you don't like it, then remove the new files from crontab, and run indexmaker again with only the old configuration file as an argument. Your old index page will then be recreated as before.

  7. #7
    Newbie
    Join Date
    Jun 2004
    Location
    Chittagong, Bangladesh
    Posts
    7

    flat line in graph MRTG

    hi again,
    thanx !! infact i've started MRTG from the link u've given me. it was my first url abt MRTG.

    wateve, i've found the solution myself by using option : unknaszero

    for future reference i'd like to share the following link where i've found the solution.

    http://people.ee.ethz.ch/~oetiker/we...reference.html

    thanking

    thanking u all
    [/url]

Similar Threads

  1. MRTG help
    By zmunawar in forum Redhat / Fedora
    Replies: 3
    Last Post: 04-23-2007, 09:54 PM
  2. MRTG
    By dev_rhce in forum Linux - Software, Applications & Programming
    Replies: 0
    Last Post: 10-13-2004, 01:52 PM
  3. MRTG cfgmaker script problem with Fedora
    By cheezetrix in forum Programming
    Replies: 1
    Last Post: 05-13-2004, 06:15 AM
  4. mrtg #2
    By elovkoff in forum Linux - Hardware, Networking & Security
    Replies: 2
    Last Post: 04-09-2004, 04:50 AM
  5. MRTG
    By elovkoff in forum Linux - Hardware, Networking & Security
    Replies: 7
    Last Post: 04-06-2004, 02:35 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •