a way to identify Graph Items?
Moderators: Developers, Moderators
a way to identify Graph Items?
Hi guys,
I have multiple graphs under graph management.
Each graph has over 100 graph items for different purposes.
My issue is that sometimes I get requests to modify or delete a single data source from the graph. But it takes HOURS to do these changes since each item is named Item #5 Item #38 Item #210 and so on! Plus there's no way to search among items based on the data source for the item.
How do you work with such issue? is there a way to change the name from the item# to something like the data source name?
Thanks!<
I have multiple graphs under graph management.
Each graph has over 100 graph items for different purposes.
My issue is that sometimes I get requests to modify or delete a single data source from the graph. But it takes HOURS to do these changes since each item is named Item #5 Item #38 Item #210 and so on! Plus there's no way to search among items based on the data source for the item.
How do you work with such issue? is there a way to change the name from the item# to something like the data source name?
Thanks!<
-
- Posts: 33
- Joined: Sun Mar 25, 2012 12:22 pm
Re: a way to identify Graph Items?
I don't often have to delete or tweak which Data Source/RRA is referenced, but when I do ... yes, it is cumbersome.rootameen wrote:Hi guys,
I have multiple graphs under graph management.
Each graph has over 100 graph items for different purposes.
My issue is that sometimes I get requests to modify or delete a single data source from the graph. But it takes HOURS to do these changes since each item is named Item #5 Item #38 Item #210 and so on! Plus there's no way to search among items based on the data source for the item.
How do you work with such issue? is there a way to change the name from the item# to something like the data source name?
Thanks!<
You could compare Data Source IDs to determine which is used where.
Couple of options, the former (using only the Cacti web interface) probably being the easiest and most ideal.
Method #1
- From Console View, choose Data Sources in left menu
- Next filter by your host
- Find the DS in question
- Make note of the number in the ID column
- Also be aware that if you were to click on the blue hyperlink name for the DS, you'd find the path to the Round Robin Archive (RRA saved in an RRD file) which also has the ID number
- Write down or switch to another web browser tab
- From Graph View, view the graphs for the host in question
- On the graph that has the DS you are interested in, click the wrench image
- Take a look at the longer DEF lines which reference the RRA file
- Compare the two RRA ID numbers should match up (though this could get complicated if you have a RRA with multiple DSes inside it).
- Once again, you can use the ID number from either of the two DS locations mentioned above
With Data Templates which do not allow for custom DS names, you don't have the option of modifying the DS name. Otherwise that would be an option to give you peace of mind, though it is tedious and cumbersome to do that just to identify which DS it is.
Method #3
Also, with SQL DB access and a data map of the database (to help keep it straight), you could write queries that will give you the information and potential ease you need. Database backups are highly recommended in that case. Not for the faint of heart!
silvertip257
Re: a way to identify Graph Items?
Sorry, maybe I wasn't clear enough.
I have some graphs that are based on stacking multiple interfaces / devices to show total stats. The issue is that I cannot show the name of each item next to it. If I insert it in the value field it will try to put it in the graph as a legend but that will stop graphing since I'm basing my graph on areas.
I hope this makes it a bit clearer. Is there a way I can add it next to the (traffic in / out)?
Thanks!
I have some graphs that are based on stacking multiple interfaces / devices to show total stats. The issue is that I cannot show the name of each item next to it. If I insert it in the value field it will try to put it in the graph as a legend but that will stop graphing since I'm basing my graph on areas.
I hope this makes it a bit clearer. Is there a way I can add it next to the (traffic in / out)?
Thanks!
Re: a way to identify Graph Items?
Found a fix. to be edited.
-
- Posts: 33
- Joined: Sun Mar 25, 2012 12:22 pm
Re: a way to identify Graph Items?
Yeah, gotcha now.rootameen wrote:Sorry, maybe I wasn't clear enough.
I have some graphs that are based on stacking multiple interfaces / devices to show total stats. The issue is that I cannot show the name of each item next to it. If I insert it in the value field it will try to put it in the graph as a legend but that will stop graphing since I'm basing my graph on areas.
<...snipped...>
I hope this makes it a bit clearer. Is there a way I can add it next to the (traffic in / out)?
Thanks!
Use the Text Format field (accessed when editing each graph item) to put in labels/text.
Please share your solution.rootameen wrote: Found a fix. to be edited.
silvertip257
Re: a way to identify Graph Items?
1. On line 571 of The following file: /var/www/cacti/graphs.php Add the following to the query:
data_template_data.name_cache,
2. On line 621 of the following file: /var/www/cacti/lib/html.php Change the line to the following:
$matrix_title = "(" . $item["data_source_name"] . "): " . $item["text_format"] . $item["name_cache"];
Results after implementing the fix:
Good luck!
data_template_data.name_cache,
2. On line 621 of the following file: /var/www/cacti/lib/html.php Change the line to the following:
$matrix_title = "(" . $item["data_source_name"] . "): " . $item["text_format"] . $item["name_cache"];
Results after implementing the fix:
Good luck!
-
- Posts: 33
- Joined: Sun Mar 25, 2012 12:22 pm
Re: a way to identify Graph Items?
You're welcome
Who is online
Users browsing this forum: No registered users and 1 guest