Questions involving customization of templates

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

Post Reply
User avatar
gvibe06
Posts: 20
Joined: Tue Oct 30, 2007 8:12 am
Location: Alpharetta, GA
Contact:

Questions involving customization of templates

Post by gvibe06 »

Ok ... I have this templating thing down (almost).

I'm able to create and modify both Data and Graph templates just as I need too. However there are a couple of items I need some clarification on. I did look at the HOW TO pages and did not see anything specific to this.

When trying to graph Cisco CPU Utilization (see: http://www.cisco.com/warp/public/477/SN ... l_snmp.pdf)

There are two different type of OID's that pull the same cpu data from Ciscos. One is a Counter, and the other is a Gauge32. It seems to me that using the Gauged data would show up better on a 5 min Graph. However, whenever I create a graph using Gauge, I get no Graph image nor do I get any Graph data. Is there a trick to getting a Gauge graph to show up?

The other thing is, that I would like to see how to use the "Make Per 5 Minutes" CDEF funtion. Does this setting require a special data template setting or a special type of graph?

Again, I am reading all of the docs, and do not see anything specific to my questions.

Jeff
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Re: Questions involving customization of templates

Post by BSOD2600 »

gvibe06 wrote:I get no Graph image nor do I get any Graph data. Is there a trick to getting a Gauge graph to show up?
Make sure the max DS in your data template is large enough. If you change it, you'll have to use rrdtool tune to fix the rrd file(s) or delete them so cacti recreates them.
gvibe06 wrote:The other thing is, that I would like to see how to use the "Make Per 5 Minutes" CDEF funtion. Does this setting require a special data template setting or a special type of graph?
Typically this is used with a counter value in the standard 5 min polling interval. Go to Graph Management->CDEFs to see exactly what each does. Basically you just tell the graph items, in a graph template to use that CDEF when displaying the data. Thats it.
User avatar
gvibe06
Posts: 20
Joined: Tue Oct 30, 2007 8:12 am
Location: Alpharetta, GA
Contact:

Post by gvibe06 »

Well ...

I just used the defaults when creating the Graph Templ. Am I even understanding this correctly? If the OID I am pulling data from is identified as a Gauge32 OID, then wouldn't that be the type of graph I need to create in order to see the data properly?

Would a low set 'MaxDS' cause the actual graph image to not generate? The rrd is created, but the graph image never shows up. If I delete it and redo it as a counter graph, I get the image back, but no data. A Gauged CPU graph should only be 0 to 100 DS since it is percentage I am collecting...so increasing the MAX would not make a difference, would it?

Specifically what I am trying to graph is CPU and Memory usage. I know there are plugins that are supposed to do this, but they don't work on the Cisco Catalyst series switches without modifications. So, I figured if I was going to modify something, I might as well learn to write a complete one from scratch. Which is how I ended up here ;)
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

gvibe06 wrote:I just used the defaults when creating the Graph Templ. Am I even understanding this correctly? If the OID I am pulling data from is identified as a Gauge32 OID, then wouldn't that be the type of graph I need to create in order to see the data properly?
It's actually the data template which dictates how the data is stored. The graph template simply formats the data for rrdtool.
gvibe06 wrote:Would a low set 'MaxDS' cause the actual graph image to not generate?
Yes, because rrdtool will discard the incoming data because its too large.
gvibe06 wrote:A Gauged CPU graph should only be 0 to 100 DS since it is percentage I am collecting...so increasing the MAX would not make a difference, would it?
Nope, it shouldn't.
gvibe06 wrote:I know there are plugins that are supposed to do this, but they don't work on the Cisco Catalyst series switches without modifications. So, I figured if I was going to modify something, I might as well learn to write a complete one from scratch. Which is how I ended up here ;)
while learning is always a good experience, it's often easier to learn from example. IMO, I'd just modify the existing template/script to work for your router -- probably just a simple change of an OID.

At any rate, you need debug your scripts/templates to find out where it's going wrong.
1) is cacti properly getting the data returned from the script/template?
2) is the data getting properly stored in the rrd file?
3) is the data getting properly graphed?

Those are the *basic* steps you need to follow.
User avatar
gvibe06
Posts: 20
Joined: Tue Oct 30, 2007 8:12 am
Location: Alpharetta, GA
Contact:

Post by gvibe06 »

At any rate, you need debug your scripts/templates to find out where it's going wrong.
1) is cacti properly getting the data returned from the script/template?
2) is the data getting properly stored in the rrd file?
3) is the data getting properly graphed?

Those are the *basic* steps you need to follow.
OK ...

I did get a Gauged CPU Graph working. You were right, increasing the size of the MaxDS seems to have done it.

Now the problem I am having is with the Total Memory Used graph. On the cisco there are two memory pools. #1 is the most used and is set for Application. #2 rarely changes because it is for the device itself.

I decided to graph only from memory-pool #1 since it is the most active. I ran snmp-walk several time and received data that looks like it would graph properly.

I created the graph (also a Gauge32) ... after increasing the MaxDS to a number high enough to allow for the total memory to fit, I did see the graph image, but its not pushing data.

So i will debug this data template and see if I can find the prob, but I am certain I created it the same way as the CPU graph, only changing the OID and DS Name.
User avatar
gvibe06
Posts: 20
Joined: Tue Oct 30, 2007 8:12 am
Location: Alpharetta, GA
Contact:

Post by gvibe06 »

Yeah

Your not gonna believe this one .. or maybe you will.

I recreated the memory usage data and graph templates ... from scratch.

Only this time, I turned on Graph Debugging and forced a 'php poller.php' run to generate the graph image.

It works now ... :/

Its one of those things, that you swear you did correct, but it ends up not being correct or is fixed by a fluke.

Anyway ... I have exported this template, now that it is working.

Thanks for the help!!
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

gvibe06 wrote:Only this time, I turned on Graph Debugging and forced a 'php poller.php' run to generate the graph image.
If you manually ran php poller.php, that that could be a sign of incorrect filesystem permissions, which prevent the new rrd file(s) from getting created.

Glad you got it working.
Post Reply

Who is online

Users browsing this forum: No registered users and 10 guests