Hi all.
I'm trying to start a network traffic monitoring server using Cacti.
At the present, and for a start, I want to monitor 3 Cisco Catalyst 2950 switches (24x10/100 ).
I've stumbled (so far ) in a couple of issues:
- Creating a graph, for example, the interface 24 of one of the switches, I get 2 rrd files using the Cacti defaults:
- traf_fastethernet024_25_in.rrd
- traf_fastethernet024_25_out.rrd
but if I create a graph for *ANOTHER* switch but same interface (24), cacti will go bananas ... and uses the same 2 files for both switches !
Needless to say that the resulting output ... er... is totally disastrous ...
Another thing that bothers me is that I want all the graphs I create related to traffic analysis be in "Bits per second" instead of the default "Bytes per second".
The only way I could find to do it is creating the graphs and then, graph by graph change the y-axis legend to "Bits per second" and then, item by item, applying the "Bytes to Bits" CDEF ...
This is ******* annoying ...
Isn't there a way to change the defaults to "Bits Per Second" and "Convert Bytes to Bits" (or whatever suits the user that configures) ?
Besides all, great product
Cacti can't tell a rrd from another ?!
Moderators: Developers, Moderators
Cacti can't tell a rrd from another ?!
We're born naked, wet and hungry.
Then things get worse.
Then things get worse.
Your first problem is caused by empty IP address field for the switches (that's normal because they are layer-2 devices). In this case cacti tries to use interface description to autogenerate rrd file name. Interface descriprions are the same for your switches which results in the same rrd file name generated. You would need to change line 67 of snmp_interfaces.php file.
You can change speed unit defaults with two changes in include/utility_functions.php:
line 306
http://www.raxnet.net/board/viewtopic.php?t=444
- bulek
Replace "descriptions" to "hardwareaddress" maybe (check if your filesystem can handle strings like 0:6:52:81:58:6 inside a file name).$snmp_description = mysql_result($sql_id, 0, "description") . "_" . mysql_result($sql_id, 0, "interfacenumber");
You can change speed unit defaults with two changes in include/utility_functions.php:
line 306
line 377$graph_vertical_label = "Bytes Per Second";
to
$graph_vertical_label = "Bits Per Second";
You can also use the script to change already configured grpahs:$sql_id = mysql_query("insert into rrd_graph_item sid,colorid,textformat,sequence,graphid,graphtypeid,consolidationfunction,hardreturn) values ($datasource_id[$o],$graph_color_array[$s],\"$graph_text_format_array[$s]\",((($o*4)+$s)+1),$graph_id,$graph_type,$graph_cf_function,\"$graph_hard_return_array[$s]\")",$cnn_id);
to
$sql_id = mysql_query("insert into rrd_graph_item sid,colorid,textformat,sequence,graphid,graphtypeid,consolidationfunction,hardreturn,cdefid) values ($datasource_id[$o],$graph_color_array[$s],\"$graph_text_format_array[$s]\",((($o*4)+$s)+1),$graph_id,$graph_type,$graph_cf_function,\"$graph_hard_return_array[$s]\",2)",$cnn_id);
http://www.raxnet.net/board/viewtopic.php?t=444
- bulek
First of all, thanks for the detailed answer.
Anyway, even if my filesystem supports the ":" char (Linux, ext3 - It does) , I can't use it ... the rrdtool goes bananas with it:
ERROR: can't parse argument 'DS:traf_0:6:52:5d:7d:5:COUNTER:600:0:100000000'
ERROR: opening '/path/to/cacti/rra/traf_0:6:52:5d:7d:58_25_in.rrd': No such file or directory
ERROR: can't parse argument 'DS:traf_0:6:52:5d:7d:5:COUNTER:600:0:100000000'
ERROR: opening '/path/to/cacti/rra/traf_0:6:52:5d:7d:58_25_out.rrd': No such file or directory
Got to get around it in another way
The other stuff works great
If anyone has other suggestions, I'd like to hear ...
Anyway, even if my filesystem supports the ":" char (Linux, ext3 - It does) , I can't use it ... the rrdtool goes bananas with it:
ERROR: can't parse argument 'DS:traf_0:6:52:5d:7d:5:COUNTER:600:0:100000000'
ERROR: opening '/path/to/cacti/rra/traf_0:6:52:5d:7d:58_25_in.rrd': No such file or directory
ERROR: can't parse argument 'DS:traf_0:6:52:5d:7d:5:COUNTER:600:0:100000000'
ERROR: opening '/path/to/cacti/rra/traf_0:6:52:5d:7d:58_25_out.rrd': No such file or directory
Got to get around it in another way
The other stuff works great
If anyone has other suggestions, I'd like to hear ...
We're born naked, wet and hungry.
Then things get worse.
Then things get worse.
There is a nice function called CleanUpName in include/functions.php. It replaces some characters to "_". You can add ":" to characters being replaced. Then use the function like this:
- bulek
I hope it works for you.$snmp_description = CleanUpName(mysql_result($sql_id, 0, "hardwareaddress")) . "_" . mysql_result($sql_id, 0, "interfacenumber");
- bulek
YES !
Working great ! Thanks !
BTW, you have a little error on your suggestion on file include/utility_functions.php ... that made me less hairy
On line 377 it has to be:
$sql_id = mysql_query("insert into rrd_graph_item (dsid,colorid,textformat,
instead of your suggestion ... I guess you missed the (d on your C&P ...
Minor details
Thanks again for your help and pacience
Working great ! Thanks !
BTW, you have a little error on your suggestion on file include/utility_functions.php ... that made me less hairy
On line 377 it has to be:
$sql_id = mysql_query("insert into rrd_graph_item (dsid,colorid,textformat,
instead of your suggestion ... I guess you missed the (d on your C&P ...
Minor details
Thanks again for your help and pacience
We're born naked, wet and hungry.
Then things get worse.
Then things get worse.
Who is online
Users browsing this forum: No registered users and 4 guests