|
|
| Author |
Message |
melchandra Cacti User
Joined: 29 Jun 2004 Posts: 312 Location: Indiana
|
Posted: Thu May 11, 2006 9:44 am Post subject: Packetshaper templates |
|
|
Here are some packetshaper templates that I created on Cacti version 0.8.6h. The packetshaper is running software version 7.2.3g1 although I am pretty sure that the templates will work with a varity of software versions on the packetshaper.
The zip file below contains all the exported xml files from cacti.
There are the data queries, which will present a list of all the (classes/partitions) much like the interface query does.
There are the data templates for class and partition data.
There are the graph templates for class and partition data.
Additionaly there is a custom graph I wrote that is a template to graph 8 of the classes. This custom graph stacks the differant classes on top of each other so you can see how differant classes compare to each other.
Import all but the "packetshaper_classes.xml", and the "packetshaper_partitions.xml". Those are the actual query definition XML files that go in the <cacti>/resource/snmp_queries/ path.
| Description: |
|
| Filesize: |
144.9 KB |
| Viewed: |
8119 Time(s) |

|
| Description: |
| Zip file containing the XML export files from cacti. |
|
 Download |
| Filename: |
packetshaper_xml_files.zip |
| Filesize: |
19.63 KB |
| Downloaded: |
689 Time(s) |
Last edited by melchandra on Wed May 17, 2006 8:15 am; edited 2 times in total |
|
| Back to top |
|
 |
chercen
Joined: 09 Apr 2006 Posts: 35 Location: Spain
|
Posted: Wed May 17, 2006 7:50 am Post subject: |
|
|
Hello,
I have tried to import all these templates, but it does not work. When adding a device, I try the data query but all I get is a blank html page with:
Notice: Undefined index: oid_index in /var/www/cacti/lib/data_query.php on line 156
Notice: Undefined index: oid_index in /var/www/cacti/lib/data_query.php on line 159
Warning: Variable passed to each() is not an array or object in /var/www/cacti/lib/data_query.php on line 181
Warning: Variable passed to each() is not an array or object in /var/www/cacti/lib/data_query.php on line 515
Warning: Cannot modify header information - headers already sent by (output started at /var/www/cacti/lib/data_query.php:156) in /var/www/cacti/host.php on line 129
Also, if I clic on the "Data Query", "Associated Graph Templates", "PacketShaper Class Traffic" I get this error:
Warning: Variable passed to each() is not an array or object in /var/www/cacti/data_queries.php on line 356
Any help would be appreciated...
Regards,
Cesar
|
|
| Back to top |
|
 |
melchandra Cacti User
Joined: 29 Jun 2004 Posts: 312 Location: Indiana
|
Posted: Wed May 17, 2006 8:14 am Post subject: |
|
|
I'm sorry. I forget to put the actual XML files in the archive. You will see two new XML files, they need to go in your <cacti>/resource/snmp_queries/ directory.
Try that and see if it works.
I apologize for the fact that this is my first time attempting to export stuff from cacti. It's a rather complicated process and there are a lot of inter-dependant things. So if anybody can point me to a how-to of exporting a complete set of data queries / data templates / graph templates, I would be most thankful.
|
|
| Back to top |
|
 |
chewbacca156
Joined: 04 Apr 2006 Posts: 24
|
Posted: Wed May 17, 2006 11:09 am Post subject: |
|
|
Thank you so much for theses templates.
It's working perfecty.
The only problem is that sometime the title is too long (because of the name of the class)...
|
|
| Back to top |
|
 |
melchandra Cacti User
Joined: 29 Jun 2004 Posts: 312 Location: Indiana
|
Posted: Wed May 17, 2006 12:04 pm Post subject: |
|
|
| chewbacca156 wrote: | | The only problem is that sometime the title is too long (because of the name of the class)... |
Yeah, I actually changed that around a lot before deciding on the longer title. Feel free to change it in the graph template.
We have a lot of class/subclass definitions on our packetshaper so it made sense to include the longer names as it helps to figure out what traffic really is. Otherwise I ended up with 6 graphs all with the class "SSL", instead of "SSL/HTTP", or "SSL/Default", etc etc. And I also changed the cacti option for maximum title length to 128.
|
|
| Back to top |
|
 |
chercen
Joined: 09 Apr 2006 Posts: 35 Location: Spain
|
Posted: Thu May 18, 2006 4:13 am Post subject: |
|
|
OK... thanks a lot..
However I still have a question: when you want to make a "top classes" graph, you clic "Create: Packetshaper Top Classes Template" and then "Create". The next screen asks you for three values:
- Index Type
- Index Value
- Output Type ID
As I didnt know what to type I just clicked "Save", and it worked. However, the graph didnt show anything.
If I want something to be graphed firstly I have to make some "Data queries", "SNMP - Packetshaper Classes", Create Graphs, choose which classes I want to graph and "Create". After doing this, I need to edit the Top Classes Graph, and choose 8 "Graph Item Fields" by hand: HTTP, FTP... Once finished, I get a nice graph similar to yours (posted one).
I do not know if all this works this way, maybe I am doing something wrong, since I do not know why the "Top Classes Template" asks me for those three values.
Is everything this OK? something wrong? is there any way to draw the top classes graph automatically, without having to graph firstly the classes you want to monitor?
Regards,
Cesar
| melchandra wrote: | I'm sorry. I forget to put the actual XML files in the archive. You will see two new XML files, they need to go in your <cacti>/resource/snmp_queries/ directory.
Try that and see if it works.
I apologize for the fact that this is my first time attempting to export stuff from cacti. It's a rather complicated process and there are a lot of inter-dependant things. So if anybody can point me to a how-to of exporting a complete set of data queries / data templates / graph templates, I would be most thankful. |
|
|
| Back to top |
|
 |
melchandra Cacti User
Joined: 29 Jun 2004 Posts: 312 Location: Indiana
|
Posted: Mon May 22, 2006 3:33 pm Post subject: |
|
|
| chercen wrote: | OK... thanks a lot..
However I still have a question: when you want to make a "top classes" graph, you clic "Create: Packetshaper Top Classes Template" and then "Create". The next screen asks you for three values:
- Index Type
- Index Value
- Output Type ID
As I didnt know what to type I just clicked "Save", and it worked. However, the graph didnt show anything.
If I want something to be graphed firstly I have to make some "Data queries", "SNMP - Packetshaper Classes", Create Graphs, choose which classes I want to graph and "Create". After doing this, I need to edit the Top Classes Graph, and choose 8 "Graph Item Fields" by hand: HTTP, FTP... Once finished, I get a nice graph similar to yours (posted one).
I do not know if all this works this way, maybe I am doing something wrong, since I do not know why the "Top Classes Template" asks me for those three values.
Is everything this OK? something wrong? is there any way to draw the top classes graph automatically, without having to graph firstly the classes you want to monitor?
Regards,
Cesar
|
I'm not sure why it asked you for those values. It doesn't do that when I try to add the graph.
The top values template is just a container for 8 other classes. Cacti doesn't know anything about the packetshaper and what classes have the most traffic. It is just a way for you to pick 8 classes and see them all graphed on the same screen together. For that matter, you could pick any 8 classes and group them together. 8 differant p2p classes, 8 http classes, 8 ssl classes, 8 top classes, 8 whatever.... The graph template is just a container to graph data from other sources which is why you have to create the individual class graphs first.
|
|
| Back to top |
|
 |
chewbacca156
Joined: 04 Apr 2006 Posts: 24
|
Posted: Fri Jun 09, 2006 7:53 am Post subject: |
|
|
There's a unit problem in your template.
You're applying the CDEF "Turn Bytes into Bits", but the units written in the legend is Bytes...
I did not found where to change it...
|
|
| Back to top |
|
 |
melchandra Cacti User
Joined: 29 Jun 2004 Posts: 312 Location: Indiana
|
Posted: Fri Jun 16, 2006 7:16 am Post subject: |
|
|
| chewbacca156 wrote: | There's a unit problem in your template.
You're applying the CDEF "Turn Bytes into Bits", but the units written in the legend is Bytes...
I did not found where to change it... |
Sorry for the delayed response, I was at a conference for the last 2 weeks.
The "bytes" on the total summation is a limatation of that special function. You would have to modify the cacti source code to change it. The current/avg/max variables are all in bits, as are the actual graph items (area, stack). I can not change the way the total function works because it is just a comment "total|auto:current:2:auto|"
|
|
| Back to top |
|
 |
zlynt
Joined: 08 Nov 2005 Posts: 9
|
Posted: Thu Feb 22, 2007 4:26 pm Post subject: |
|
|
Thanks for the templates, works great for us! I can tell it took a long time to create. Did you by chance create a top outbound template?
Z
|
|
| Back to top |
|
 |
melchandra Cacti User
Joined: 29 Jun 2004 Posts: 312 Location: Indiana
|
Posted: Thu Feb 22, 2007 4:29 pm Post subject: |
|
|
| The template is generic. Just drop any class you're already graphing into the template.
|
|
| Back to top |
|
 |
chewbacca156
Joined: 04 Apr 2006 Posts: 24
|
Posted: Tue May 15, 2007 3:31 am Post subject: |
|
|
Hello,
I've a little problem with the units in my classes graphs.
The values and units in the legend are correct, but the values on the graph are not...
See the graph below for example...
Got any idea to correct this ?
| Description: |
|
| Filesize: |
17.38 KB |
| Viewed: |
5698 Time(s) |

|
|
|
| Back to top |
|
 |
melchandra Cacti User
Joined: 29 Jun 2004 Posts: 312 Location: Indiana
|
Posted: Tue May 15, 2007 7:10 am Post subject: |
|
|
| It looks like you've got the CDEF's out of whack. The graph is being converted to bytes - that's why it's 1/8 of the bits being reported in the legend. Look at the template and figure out which CDEF you're using, it shouldn't be converting to bytes.
|
|
| Back to top |
|
 |
chewbacca156
Joined: 04 Apr 2006 Posts: 24
|
Posted: Tue May 15, 2007 8:19 am Post subject: |
|
|
You were right.
The legend had the CDEF "Turn Bytes into Bits", and the graph not.
Thank you ;o)
|
|
| Back to top |
|
 |
gjames
Joined: 24 Aug 2007 Posts: 5
|
Posted: Fri Aug 24, 2007 1:17 pm Post subject: Truncated class names |
|
|
Hi
IO have read this thread but cant figure out hoe to get the proper class names on my graphs.
Where exactly do I make the change in the graph template?
Thanks
|
|
| Back to top |
|
 |
|