Traffic Graphs - Index Type etc...

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
User avatar
kberrien
Posts: 17
Joined: Tue Jun 01, 2004 7:57 pm

Traffic Graphs - Index Type etc...

Post by kberrien »

Tried asking on the maillist and got no reply. I'm slugging my way through SNMP & Cacti. I've got some working graphs with the local host & ucd/net templates.

Now, I'm trying to tackle the traffic graphs. But what are the following, they are in the: Template: Interface - Traffic (bytes/sec, Total Bandwidth)]

Custom Data

Index Type
Index Value
Output Type ID

This has got me stumped. Didn't see anything in the docs, though it does talk about these fields in other areas (not graph template), and in those areas it says to leave them blank. Leaving blank, it does not save.

Kevin
Lux
Cacti User
Posts: 195
Joined: Tue Nov 11, 2003 10:57 am
Location: Luxembourg

Post by Lux »

User avatar
kberrien
Posts: 17
Joined: Tue Jun 01, 2004 7:57 pm

Helped, but not helped....

Post by kberrien »

Thats a good thread. I understand a bit more on how Cacti works by reading that, and reading up on the associated problem I have now.

The thread isn't in anyways entirely clear, so I tried some values and now all I get is the ole:

ERROR: opening '/var/www/html/cacti/rra/gold_linux_in_62.rrd': No such file or directory

I'm guessing my values are not correct. Seems I either create a graph, get no errors like above, and I get a working graph. Else, I make a graph, I get errors, and get no graph (or blank). Cacti seems entirely hit or miss, and there isn't any decent documentation. :cry:
Lux
Cacti User
Posts: 195
Joined: Tue Nov 11, 2003 10:57 am
Location: Luxembourg

Post by Lux »

What exactly are you trying to do? Perhaps someone will be able to help....

Mike
User avatar
kberrien
Posts: 17
Joined: Tue Jun 01, 2004 7:57 pm

Traffic Graphs

Post by kberrien »

I'm trying to make traffic graphs.

At present, I'm graphing two linux boxes, one running cacti (local & snmp), the other via snmp. I've got disk space, load average, cpu usage, etc.. running just fine.

I then tried the Interface (bytes/sec) graph. Index Type, Index Value, and Output Type ID need to be populated, but its unclear with what. The documentation says nothing.

I've tried some values, kind of winging it and I get errors. Cacti is a great program, and works great for the graphs I can create (can't get a single graph on a 2k box!), but man does the documentation stink. :x

I think part of the problem perhaps is that Cacti is really Cacti + RRD Tools + SNMP all packaged together.... but the documentation isn't written that way, and Cacti isn't at the point yet where the program takes up enough of the trouble of configuring all these pieces together.
Lux
Cacti User
Posts: 195
Joined: Tue Nov 11, 2003 10:57 am
Location: Luxembourg

Post by Lux »

Out of the box, cacti should be able to create traffic graphs without any troubles through the add graphs menu.

Have you added the host that you want to graph the interface traffic from to your devices? Was the SNMP Interface statistics data query successful?

When you go into the add graphs menu, do you get a list of the available interfaces?

Mike
User avatar
kberrien
Posts: 17
Joined: Tue Jun 01, 2004 7:57 pm

What I can/have done.

Post by kberrien »

Sure, I've got many graphs for my linux boxes. Getting any graphs from my Win2k hasn't been successful.

I can create devices, SNMP tests all work.

For instance, on my web server, I've got Memory usage (Linux-Memory Usage), Processes (Unix - Processes), Load Average (Unix-Load Average), CPU Usage (ucd/net) all working fine. On my file/game server I've got all using ucd/net, filespace graphs, cpu usage working fine as well.

The traffic graphs require these fields, which haven't been defined in the documentation. That seems to be the problem with those.

Walk-thru of traffic graph - File server, via ucd/net snmp (running net-snmp) on target fireserver:

Create New Graph
Select host, create interface - bytes/sec
Now I'm at Create 1 Graph From Host Template - and I need values for Index Type, Index Value, Output Type ID.

I try: IfIndex, 2, 13 (as suggested in the above thread) - save

Click Graph Management - open my new traffic graph
turn on debug mode.

ERROR: opening '/var/www/html/cacti/rra/gold_linux_server_traffic_in_82.rrd': No such file or directory

do a http://host/cacti/cmd.php, still have error. Cmd.php shows nothing about my new interface-traffic graph.
Lux
Cacti User
Posts: 195
Joined: Tue Nov 11, 2003 10:57 am
Location: Luxembourg

Post by Lux »

The numbers 2 and 18 are highly unlikely to work for you since thefirst number can be different for every device that you monitor and teh second depends on the host template that you are using.

Lets step back a little bit. What host template are you using for this device? Is it one of the generic templates that came with Cacti, or is it something that you have created yourself?

One other thing to try. Go into the "devices" menu and select your troublesome host. Scroll down to the Associated Data Queries section. Do you have "SNMP Interface statistics" listed? If yes, then click on the green "O" to the right of the query and post the output to this thread. That should help narrow down the problem some.

Mike
User avatar
kberrien
Posts: 17
Joined: Tue Jun 01, 2004 7:57 pm

Traffic graphs....

Post by kberrien »

>The numbers 2 and 18 are highly unlikely to work for you

Yeah, well it was one of those, lemme try ANYTHING, and see where it gets me. :D

>What host template are you using for this device?

Using the generic template, ucd/net SNMP Host

>Do you have "SNMP Interface statistics" listed?

Yup, here's the query dump

+ Running data query [1].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/var/www/html/cacti/resource/snmp_queries/interface.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.2.1.2.2.1.1'
+ Located input field 'ifIndex' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.2.1.2.2.1.1'
+ Found item [ifIndex='1'] index: 1 [from value]
+ Found item [ifIndex='2'] index: 2 [from value]
+ Located input field 'ifDescr' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.2.1.2.2.1.2'
+ Found item [ifDescr='lo'] index: 1 [from value]
+ Found item [ifDescr='eth0'] index: 2 [from value]
+ Located input field 'ifName' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.2.1.31.1.1.1.1'
+ Located input field 'ifAlias' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.2.1.31.1.1.1.18'
+ Located input field 'ifType' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.2.1.2.2.1.3'
+ Found item [ifType='softwareLoopback(24)'] index: 1 [from value]
+ Found item [ifType='ethernetCsmacd(6)'] index: 2 [from value]
+ Located input field 'ifSpeed' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.2.1.2.2.1.5'
+ Found item [ifSpeed='10000000'] index: 1 [from value]
+ Found item [ifSpeed='100000000'] index: 2 [from value]
+ Located input field 'ifHwAddr' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.2.1.2.2.1.6'
+ Found item [ifHwAddr=''] index: 1 [from value]
+ Found item [ifHwAddr='00:00:00:E8:60:82:95'] index: 2 [from value]
+ Located input field 'ifIP' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.2.1.4.20.1.2'
+ Found item [ifIP='127.0.0.1'] index: 1 [from regexp oid parse]
+ Found item [ifIP='192.168.50.6'] index: 2 [from regexp oid parse]

Tried another host, this is the box cacti is running on. Host template is Local Linux machine, with net-snmp running on it, I've got interface stats listed, here's the dump for that one.

+ Running data query [1].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/var/www/html/cacti/resource/snmp_queries/interface.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.2.1.2.2.1.1'
+ Located input field 'ifIndex' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.2.1.2.2.1.1'
+ Found item [ifIndex='1'] index: 1 [from value]
+ Found item [ifIndex='2'] index: 2 [from value]
+ Located input field 'ifDescr' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.2.1.2.2.1.2'
+ Found item [ifDescr='lo'] index: 1 [from value]
+ Found item [ifDescr='eth0'] index: 2 [from value]
+ Located input field 'ifName' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.2.1.31.1.1.1.1'
+ Located input field 'ifAlias' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.2.1.31.1.1.1.18'
+ Located input field 'ifType' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.2.1.2.2.1.3'
+ Found item [ifType='softwareLoopback(24)'] index: 1 [from value]
+ Found item [ifType='ethernetCsmacd(6)'] index: 2 [from value]
+ Located input field 'ifSpeed' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.2.1.2.2.1.5'
+ Found item [ifSpeed='10000000'] index: 1 [from value]
+ Found item [ifSpeed='10000000'] index: 2 [from value]
+ Located input field 'ifHwAddr' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.2.1.2.2.1.6'
+ Found item [ifHwAddr=''] index: 1 [from value]
+ Found item [ifHwAddr='00:00:00:94:99:4F:FE'] index: 2 [from value]
+ Located input field 'ifIP' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.2.1.4.20.1.2'
+ Found item [ifIP='127.0.0.1'] index: 1 [from regexp oid parse]
+ Found item [ifIP='192.168.50.5'] index: 2 [from regexp oid parse]

Thanks. I got some other graphs I had problems with (persmissions issues) working last night, so I'd love to get these working!
Lux
Cacti User
Posts: 195
Joined: Tue Nov 11, 2003 10:57 am
Location: Luxembourg

Post by Lux »

Based on your output, your index value for the ethernet interface should be 2.

the output type ID should be the ID of the graph that you are trying to create.

2=Interface Traffic (bits/sec)
31=Interface Traffic (bits/sec 95th percentile)
32=Interface Traffic (bits/sec total bandwidth)

To check what the ID is, open up the graph template that you want to use and look at the URL in your browser. you should see something like this:

http://www.cacti.lu/cacti/graph_templat ... edit&id=32

The id is marked as, well its marked as ID!

Mike
User avatar
kberrien
Posts: 17
Joined: Tue Jun 01, 2004 7:57 pm

No such luck, cmd.php errors

Post by kberrien »

Tried those numbers, which corrispond correctly. No such luck, will won't create .rra file.

I took a look at my cmd.php output. Without the graph, or data source, I get a clean run.

When I add a graph, (I get 2 - one call Traffic, other Traffic (ip addr) eth0), I get the following errors.

snmp: gold.x.net:161, dsname: traffic_out, oid: .1.3.6.1.2.1.2.2.1.16.2, value: 1730716201
ERROR: Duplicate DS name: traffic_in
snmp: gold.x.net:161, dsname: traffic_in, oid: .1.3.6.1.2.1.2.2.1.10.2, value: 2364872157
ERROR: Duplicate DS name: traffic_in

update /var/www/html/cacti/rra/gold_linux_file_game_server_traffic_in_128.rrd --template traffic_out:traffic_in N:1730716201:2364872157
ERROR: opening '/var/www/html/cacti/rra/gold_linux_file_game_server_traffic_in_128.rrd': No such file or directory
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests