MRTG for Cisco Switch

Discussion in 'Cisco' started by Benson, Aug 31, 2004.

  1. Benson

    Benson Guest

    Hi,

    I have configured the MRTG for a Cisco2950, the MRTG configuration
    shows it contains 24 ports, but after the compilation ( perl mrtg
    cisco2950.cfg ), I found only some graphers, not all graphers of the
    Port ?

    1. How can I configure the MRTG configuration (cisco2950.cfg ) file so
    that it can display all port grapher ?

    2. I just found one html page for one port, how can I configure the
    MRTG configuration ( cisco2950.cfg ) so that one html page shows all
    24 ports ?

    3. I also found the configuration ( cisco2950.cfg ) has only
    12.5Mbyts/s for one port, but no 100 Mbytes; or auto-detect the port
    speed ?

    Thank every MRTG expert.
     
    Benson, Aug 31, 2004
    #1
    1. Advertising

  2. Benson

    Tax Johnson Guest

    "Benson" <> wrote in message
    news:...
    > Hi,
    >
    > I have configured the MRTG for a Cisco2950, the MRTG configuration
    > shows it contains 24 ports, but after the compilation ( perl mrtg
    > cisco2950.cfg ), I found only some graphers, not all graphers of the
    > Port ?
    >
    > 1. How can I configure the MRTG configuration (cisco2950.cfg ) file so
    > that it can display all port grapher ?
    >
    > 2. I just found one html page for one port, how can I configure the
    > MRTG configuration ( cisco2950.cfg ) so that one html page shows all
    > 24 ports ?
    >
    > 3. I also found the configuration ( cisco2950.cfg ) has only
    > 12.5Mbyts/s for one port, but no 100 Mbytes; or auto-detect the port
    > speed ?
    >
    > Thank every MRTG expert.


    Cfgmaker will comment out the interface in your config file (cisco2950.cfg)
    if the interface is in an administrative and operational state of "down".
    Consider using the --show-op-down flag. See
    http://people.ee.ethz.ch/~oetiker/webtools/mrtg/cfgmaker.html for more
    details.

    Also, 12.5 M BYTES = 100 M bits, no?

    Regards,
    -tax
     
    Tax Johnson, Sep 1, 2004
    #2
    1. Advertising

  3. Benson

    Joe Sargent Guest

    (Benson) wrote in message news:<>...
    > Hi,
    >
    > I have configured the MRTG for a Cisco2950, the MRTG configuration
    > shows it contains 24 ports, but after the compilation ( perl mrtg
    > cisco2950.cfg ), I found only some graphers, not all graphers of the
    > Port ?
    >
    > 1. How can I configure the MRTG configuration (cisco2950.cfg ) file so
    > that it can display all port grapher ?
    >

    *****************************
    Run this line in your MRTG bin directory....

    perl cfgmaker snmpcommunity@IPaddress --global "WorkDir: c:\www"
    --output IPaddress.cfg

    This will create your config file which will then of course create
    your HTML file.

    If ports are not active or shutdown then they will not be found and
    included. I have created a vbs script that reads a text file where I
    keep all my switches IPs and names. I then run this script and
    creates new config files. I then have another script that indexes
    (read below for more info) to create index html files. I run this
    every month or 2 to make sure my MRTG is up to date (I have a lot of
    move,adds, and changes so this is necessary). I will more than happy
    to forward my scripts to you. Sure makes it easy to keep things up to
    date.

    *******************************
    >
    > 2. I just found one html page for one port, how can I configure the
    > MRTG configuration ( cisco2950.cfg ) so that one html page shows all
    > 24 ports ?
    >

    *********************************
    run this command against your newly created config file to creat your
    index page. Refer to Indexmaker-help.txt for all the options.

    indexmaker.pl configfilename.cfg

    *********************************
    >
    > 3. I also found the configuration ( cisco2950.cfg ) has only
    > 12.5Mbyts/s for one port, but no 100 Mbytes; or auto-detect the port
    > speed ?
    >

    **********************************

    This is actually correct. The port speed is actually 100Mb
    (mega-bits)and the 12.5 represenets 12.5MB (mega-bytes)

    ((100 * 1024)/8)/1024 = 12.5MB

    (this may not be the correct way to write it out but it works! -
    don't worry I have had this problem forever. I hate the little b and
    the big B)

    **********************************



    > Thank every MRTG expert.
     
    Joe Sargent, Sep 1, 2004
    #3
  4. Benson

    Benson Guest

    Thank you for your reply,

    sorry the port speed is 1Gbit/s speed

    Thank you

    "Tax Johnson" <> wrote in message news:<xhaZc.29917$-kc.rr.com>...
    > "Benson" <> wrote in message
    > news:...
    > > Hi,
    > >
    > > I have configured the MRTG for a Cisco2950, the MRTG configuration
    > > shows it contains 24 ports, but after the compilation ( perl mrtg
    > > cisco2950.cfg ), I found only some graphers, not all graphers of the
    > > Port ?
    > >
    > > 1. How can I configure the MRTG configuration (cisco2950.cfg ) file so
    > > that it can display all port grapher ?
    > >
    > > 2. I just found one html page for one port, how can I configure the
    > > MRTG configuration ( cisco2950.cfg ) so that one html page shows all
    > > 24 ports ?
    > >
    > > 3. I also found the configuration ( cisco2950.cfg ) has only
    > > 12.5Mbyts/s for one port, but no 100 Mbytes; or auto-detect the port
    > > speed ?
    > >
    > > Thank every MRTG expert.

    >
    > Cfgmaker will comment out the interface in your config file (cisco2950.cfg)
    > if the interface is in an administrative and operational state of "down".
    > Consider using the --show-op-down flag. See
    > http://people.ee.ethz.ch/~oetiker/webtools/mrtg/cfgmaker.html for more
    > details.
    >
    > Also, 12.5 M BYTES = 100 M bits, no?
    >
    > Regards,
    > -tax
     
    Benson, Sep 1, 2004
    #4
  5. Benson

    Benson Guest

    Thank you for your reply.

    It is great if you would like to share the scripts with me !

    Thank you !!


    (Joe Sargent) wrote in message news:<>...
    > (Benson) wrote in message news:<>...
    > > Hi,
    > >
    > > I have configured the MRTG for a Cisco2950, the MRTG configuration
    > > shows it contains 24 ports, but after the compilation ( perl mrtg
    > > cisco2950.cfg ), I found only some graphers, not all graphers of the
    > > Port ?
    > >
    > > 1. How can I configure the MRTG configuration (cisco2950.cfg ) file so
    > > that it can display all port grapher ?
    > >

    > *****************************
    > Run this line in your MRTG bin directory....
    >
    > perl cfgmaker snmpcommunity@IPaddress --global "WorkDir: c:\www"
    > --output IPaddress.cfg
    >
    > This will create your config file which will then of course create
    > your HTML file.
    >
    > If ports are not active or shutdown then they will not be found and
    > included. I have created a vbs script that reads a text file where I
    > keep all my switches IPs and names. I then run this script and
    > creates new config files. I then have another script that indexes
    > (read below for more info) to create index html files. I run this
    > every month or 2 to make sure my MRTG is up to date (I have a lot of
    > move,adds, and changes so this is necessary). I will more than happy
    > to forward my scripts to you. Sure makes it easy to keep things up to
    > date.
    >
    > *******************************
    > >
    > > 2. I just found one html page for one port, how can I configure the
    > > MRTG configuration ( cisco2950.cfg ) so that one html page shows all
    > > 24 ports ?
    > >

    > *********************************
    > run this command against your newly created config file to creat your
    > index page. Refer to Indexmaker-help.txt for all the options.
    >
    > indexmaker.pl configfilename.cfg
    >
    > *********************************
    > >
    > > 3. I also found the configuration ( cisco2950.cfg ) has only
    > > 12.5Mbyts/s for one port, but no 100 Mbytes; or auto-detect the port
    > > speed ?
    > >

    > **********************************
    >
    > This is actually correct. The port speed is actually 100Mb
    > (mega-bits)and the 12.5 represenets 12.5MB (mega-bytes)
    >
    > ((100 * 1024)/8)/1024 = 12.5MB
    >
    > (this may not be the correct way to write it out but it works! -
    > don't worry I have had this problem forever. I hate the little b and
    > the big B)
    >
    > **********************************
    >
    >
    >
    > > Thank every MRTG expert.
     
    Benson, Sep 1, 2004
    #5
  6. Benson

    Tax Johnson Guest

    "Benson" <> wrote in message
    news:...
    > Thank you for your reply,
    >
    > sorry the port speed is 1Gbit/s speed
    >
    > Thank you
    >
    > "Tax Johnson" <> wrote in message

    news:<xhaZc.29917$-kc.rr.com>...
    > > "Benson" <> wrote in message
    > > news:...
    > > > Hi,
    > > >
    > > > I have configured the MRTG for a Cisco2950, the MRTG configuration
    > > > shows it contains 24 ports, but after the compilation ( perl mrtg
    > > > cisco2950.cfg ), I found only some graphers, not all graphers of the
    > > > Port ?
    > > >
    > > > 1. How can I configure the MRTG configuration (cisco2950.cfg ) file so
    > > > that it can display all port grapher ?
    > > >
    > > > 2. I just found one html page for one port, how can I configure the
    > > > MRTG configuration ( cisco2950.cfg ) so that one html page shows all
    > > > 24 ports ?
    > > >
    > > > 3. I also found the configuration ( cisco2950.cfg ) has only
    > > > 12.5Mbyts/s for one port, but no 100 Mbytes; or auto-detect the port
    > > > speed ?
    > > >
    > > > Thank every MRTG expert.

    > >
    > > Cfgmaker will comment out the interface in your config file

    (cisco2950.cfg)
    > > if the interface is in an administrative and operational state of

    "down".
    > > Consider using the --show-op-down flag. See
    > > http://people.ee.ethz.ch/~oetiker/webtools/mrtg/cfgmaker.html for more
    > > details.
    > >
    > > Also, 12.5 M BYTES = 100 M bits, no?
    > >
    > > Regards,
    > > -tax


    Well, getting back to your first 2 questions, you said that the .cfg file
    shows all interfaces, but your HTML page doesn't. The unused interfaces are
    probably commented out ( have a # in front of each line of the unused
    interfaces in your .cfg file).

    So, you can either manually remove those #'s, or rerun cfgmaker using
    the --show-op-down flag. Then you should rerun indexmaker and your HTML
    page will show all interfaces.

    As far as your 3rd question goes, you're saying that the gigE interfaces
    show up as 12.5 M BYTES?

    As the other poster suggested, it is good to rerun cfgmaker/indexmaker every
    now and then to pickup any new interfaces and/or updated description fields.

    Finally, if you're using gigE, consider using SNMPv2. That will cause MRTG
    to send queries using the 64bit counters instead of the 32 bit counters.

    This is how I did it in Linux (Redhat 7.2):

    #Create a config file for cisco2950.cfg

    /usr/local/mrtg-2/bin/cfgmaker --ifref=descr \
    --ifdesc=descr \
    --show-op-down \
    --snmp-options=:::::2 \
    --output=/usr/local/mrtg-2/bin/cisco2950.cfg \
    --global "Workdir: /var/www/html/mrtg/mrtg-data" \
    --global "Icondir: /mrtg/mrtg-images" \
    --global "Options[_]: growright,bits" publik@192.168.1.1



    /usr/local/mrtg-2/bin/indexmaker --output /var/www/html/mrtg/cisco2950.html
    \
    --prefix=/mrtg/mrtg-data/ \
    --title "cisco2950 traffic analysis" \
    --columns=1 \
    /usr/local/mrtg-2/bin/cisco2950.cfg
     
    Tax Johnson, Sep 1, 2004
    #6
  7. Benson

    winlinfix

    Joined:
    Nov 6, 2007
    Messages:
    1
    switch mrtg

    HI,


    i have installed mrtg on vps and monitoring all server by ip.
    how can i monitor bandwidth by switch?
    i have managed switch too
     
    winlinfix, Nov 6, 2007
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?ISO-8859-2?Q?Pawe=B3_Go=B3aszewski?=

    mrtg, snmp and cisco C2924 resets

    =?ISO-8859-2?Q?Pawe=B3_Go=B3aszewski?=, Oct 31, 2003, in forum: Cisco
    Replies:
    0
    Views:
    576
    =?ISO-8859-2?Q?Pawe=B3_Go=B3aszewski?=
    Oct 31, 2003
  2. optimus
    Replies:
    2
    Views:
    1,231
    optimus
    Jan 2, 2004
  3. Mirek

    MRTG and Cisco routers

    Mirek, Feb 15, 2004, in forum: Cisco
    Replies:
    2
    Views:
    12,185
    owais bin zuber
    Feb 20, 2004
  4. mohammad

    Problem in MRTG & cisco

    mohammad, Apr 29, 2004, in forum: Cisco
    Replies:
    3
    Views:
    807
    Chris Marva
    Apr 29, 2004
  5. Giuen
    Replies:
    0
    Views:
    1,540
    Giuen
    Sep 12, 2008
Loading...

Share This Page