Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


Packetshaper templates
Goto page 1, 2, 3  Next
 
Post new topic   Reply to topic    Cacti Forum Index -> Scripts and Templates
Author Message
melchandra
Cacti User


Joined: 29 Jun 2004
Posts: 312
Location: Indiana

PostPosted: Thu May 11, 2006 9:44 am    Post subject: Packetshaper templates Reply with quote

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.



packetshaper_top_classes.JPG
 Description:
Screenshot
 Filesize:  144.9 KB
 Viewed:  8055 Time(s)

packetshaper_top_classes.JPG



packetshaper_xml_files.zip
 Description:
Zip file containing the XML export files from cacti.

Download
 Filename:  packetshaper_xml_files.zip
 Filesize:  19.63 KB
 Downloaded:  684 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

PostPosted: Wed May 17, 2006 7:50 am    Post subject: Reply with quote

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

PostPosted: Wed May 17, 2006 8:14 am    Post subject: Reply with quote

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

PostPosted: Wed May 17, 2006 11:09 am    Post subject: Reply with quote

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

PostPosted: Wed May 17, 2006 12:04 pm    Post subject: Reply with quote

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

PostPosted: Thu May 18, 2006 4:13 am    Post subject: Reply with quote

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

PostPosted: Mon May 22, 2006 3:33 pm    Post subject: Reply with quote

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

PostPosted: Fri Jun 09, 2006 7:53 am    Post subject: Reply with quote

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

PostPosted: Fri Jun 16, 2006 7:16 am    Post subject: Reply with quote

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

PostPosted: Thu Feb 22, 2007 4:26 pm    Post subject: Reply with quote

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

PostPosted: Thu Feb 22, 2007 4:29 pm    Post subject: Reply with quote

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

PostPosted: Tue May 15, 2007 3:31 am    Post subject: Reply with quote

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 ?



graph_image.php.png
 Description:
 Filesize:  17.38 KB
 Viewed:  5634 Time(s)

graph_image.php.png


Back to top
melchandra
Cacti User


Joined: 29 Jun 2004
Posts: 312
Location: Indiana

PostPosted: Tue May 15, 2007 7:10 am    Post subject: Reply with quote

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

PostPosted: Tue May 15, 2007 8:19 am    Post subject: Reply with quote

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

PostPosted: Fri Aug 24, 2007 1:17 pm    Post subject: Truncated class names Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Scripts and Templates All times are GMT - 5 Hours
Goto page 1, 2, 3  Next
Page 1 of 3

 



Powered by phpBB © 2001, 2005 phpBB Group