Graph Item trouble

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

Moderators: Developers, Moderators

User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

aphexer wrote:

Code: Select all

..
DEF:a="/home/cacti/web/rra/host_bytes_38.rrd":bytes:AVERAGE \
DEF:b="/home/cacti/web/rra/host_bytes_39.rrd":bytes:AVERAGE \
...
GPRINT:a:MAX:"Maximum\:%8.2lf%s\n"  \
...
Anyone knows why my outbound max is the same as the input one? What's wrong with the graph template?
That's why it is wrong. The Graph Item refers to the wrong data source. Please select it from the Graph Tenmplate and associate the correct data source
Reinhard
aphexer
Posts: 13
Joined: Sat Jul 29, 2006 3:17 pm

Post by aphexer »

There is only one data template. The data template stores an amount of bytes. So I have 2 .rrd for inbound+outbound. In the "Graph Template Items" section I obviously can only select that one data template, how can I select the wrong one there?

Thanks for your help.

(Sorry that this goes off topic on the total calculations)
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

The rrd *_38 seems to hold inbound stuff whereas the _39 holds outbound. The wrong Outbound MAX refers to the _38 inbound rrd.
You will have to visit the Graph Template to correct this issue
Reinhard
aphexer
Posts: 13
Joined: Sat Jul 29, 2006 3:17 pm

Post by aphexer »

Yes, where do I correct it? Am I correct to say it's in the page where I took 2 screenshots from in my previous post? It looks correct to me.

Thank you,
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Please select "Graph Management"; then select the Graph Template you're working on. Now select the item#8 (I suppose, it should be the 2nd MAX item). Change the data source on that very item. If in doubt, please post a screenshot of the Graph Template
Reinhard
aphexer
Posts: 13
Joined: Sat Jul 29, 2006 3:17 pm

Post by aphexer »

I assume you meant "graph templates"?

As I said before, there is only one related data template, so I'm quite stuck when you tell me to choose another one :)

Attached the screenshot.

Also took a screenshot from graph management, where you can see I just select 2 different datasources for in and out.

Perhaps this thread should be split?

Thanks,
Attachments
cacti_template1.png
cacti_template1.png (10.55 KiB) Viewed 3097 times
cacti_graphmanagement.png
cacti_graphmanagement.png (4.67 KiB) Viewed 3097 times
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

aphexer wrote:I assume you meant "graph templates"?
Yes. But I need a screenshot of the list of Graph Items
Reinhard
aphexer
Posts: 13
Joined: Sat Jul 29, 2006 3:17 pm

Post by aphexer »

Here it is :)

Thanks again,
Attachments
cacti_graph_items_list.png
cacti_graph_items_list.png (15.16 KiB) Viewed 3042 times
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Please select item#7 and item#8 in turn. You should find that they are referencing different data sources. Make the data source of item#8 match the one of item#7
Reinhard
aphexer
Posts: 13
Joined: Sat Jul 29, 2006 3:17 pm

Post by aphexer »

I posted screenshots after selecting items 7 and 8. I thought only a data template was choosen there, not the specific data source the actual data comes from.

There is only one data template, you can see both reference the same one.

Any further suggestions?

Thanks,
Attachments
cacti_graph_item_7.png
cacti_graph_item_7.png (10.35 KiB) Viewed 3024 times
cacti_graph_item_8.png
cacti_graph_item_8.png (10.53 KiB) Viewed 3024 times
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

IMHO, they do not reference the same one. They do reference two different ones who unfortunately have the same name.
Reinhard
aphexer
Posts: 13
Joined: Sat Jul 29, 2006 3:17 pm

Post by aphexer »

I hope this convinces you that they are really the same:

I hover the mouse over the url of the data item, it displays this:
graph_templates_items.php?action=item_edit&id=827&graph_template_id=46
and
graph_templates_items.php?action=item_edit&id=828&graph_template_id=46
for items 7 and 8 respectively.

So their item id's are 827 and 828.

Then I run this query:

Code: Select all

SELECT *
FROM graph_template_input_defs
WHERE graph_template_item_id=827
OR graph_template_item_id=828
result:
graph_template_input_id graph_template_item_id
123 827
123 828

You see they both reference graph_template_input_id 123.

Just to check what this '123' is:

Code: Select all

SELECT * FROM graph_template_input WHERE id = 123;
id hash graph_template_id name description column_name
123 e83b9acc226991a83438baa515829011 46 Data Source [out] task_item_id

(description column is empty)

Does this suffice to say they really reference the right thing? Or am I looking over something?

Thanks.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Referring to my first post in this thread
gandalf wrote:
aphexer wrote:

Code: Select all

..
DEF:a="/home/cacti/web/rra/host_bytes_38.rrd":bytes:AVERAGE \
DEF:b="/home/cacti/web/rra/host_bytes_39.rrd":bytes:AVERAGE \
...
GPRINT:a:MAX:"Maximum\:%8.2lf%s\n"  \
...
which is incomplete for our current discussion, I would again need the whole rrdtool graph output. If I remember correctly, the last GPRINTs did not refer to the same data source; e.g. two where referring to b and one was referring to a. Please post again
Reinhard
aphexer
Posts: 13
Joined: Sat Jul 29, 2006 3:17 pm

Post by aphexer »

This is it:

Code: Select all

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=1186684556 \
--end=1186770956 \
--title="host - Total Traffic" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
COMMENT:"From 2007/08/09 20\:35\:56 To 2007/08/10 20\:35\:56\c" \
COMMENT:"  \n" \
--vertical-label="bytes per second" \
--slope-mode \
DEF:a="/path/to/rra/host_bytes_38.rrd":bytes:AVERAGE \
DEF:b="/path/to/rra/host_bytes_39.rrd":bytes:AVERAGE \
AREA:a#00CF00:"Inbound"  \
GPRINT:a:LAST:" Current\:%8.2lf%s"  \
GPRINT:a:AVERAGE:"Average\:%8.2lf%s"  \
GPRINT:a:MAX:"Maximum\:%8.2lf%s\n"  \
LINE1:b#002A97:"Outbound"  \
GPRINT:b:LAST:"Current\:%8.2lf%s"  \
GPRINT:b:AVERAGE:"Average\:%8.2lf%s"  \
GPRINT:a:MAX:"Maximum\:%8.2lf%s\n"  \
COMMENT:"Total In\:  350.57 MB\n"  \
COMMENT:"Total Out\: 2.41 GB\n"
The graph from here http://forums.cacti.net/viewtopic.php?p=107752#107752 is associated with this one. (another time frame though).

I can easily understand you think there's something obviously wrong on my end, still I have no clue.

Thanks again.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

aphexer wrote:This is it:
/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=1186684556 \
--end=1186770956 \
--title="host - Total Traffic" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
COMMENT:"From 2007/08/09 20\:35\:56 To 2007/08/10 20\:35\:56\c" \
COMMENT:" \n" \
--vertical-label="bytes per second" \
--slope-mode \
DEF:a="/path/to/rra/host_bytes_38.rrd":bytes:AVERAGE \
DEF:b="/path/to/rra/host_bytes_39.rrd":bytes:AVERAGE \
AREA:a#00CF00:"Inbound" \
GPRINT:a:LAST:" Current\:%8.2lf%s" \
GPRINT:a:AVERAGE:"Average\:%8.2lf%s" \
GPRINT:a:MAX:"Maximum\:%8.2lf%s\n" \

LINE1:b#002A97:"Outbound" \
GPRINT:b:LAST:"Current\:%8.2lf%s" \
GPRINT:b:AVERAGE:"Average\:%8.2lf%s" \
GPRINT:a:MAX:"Maximum\:%8.2lf%s\n" \

COMMENT:"Total In\: 350.57 MB\n" \
COMMENT:"Total Out\: 2.41 GB\n"
The graph from here http://forums.cacti.net/viewtopic.php?p=107752#107752 is associated with this one. (another time frame though).

I can easily understand you think there's something obviously wrong on my end, still I have no clue.

Thanks again.
See the marked lines? The blue one only refer to the DEF statement a. That's correct. The red one is not correct. 3 of 4 items refer to DEF sattement b; they are correct. But the MAX item refers to a in turn. Unfortunately, both data sources (alias DEF statements) use the same data source item name. So it's difficult to distinguish between the two.
That's why I was struggeling with you on the Graph template.
The task is to change the Graph so that it comes up with the correct MAX data source item.
Hope, I made myself plain enough.
Reinhard
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests