One aspect I've tried to get working before in Cacti is multi-CPU graphing, but I've never had great success. Today though I found a great post by Peter at goldfisch.at on the subject - along with some other pretty good gems as well, such as extending Cacti by adding a 5-year graph, configuring Cacti to gather disk I/O and using advanced ping. He had a great, concise set of steps to download the correct templates (which I've done before) and get them working correctly (this is where I've had trouble). I'm going to list those steps with a little tweaking of my own mainly so I have them as a ready reference so somewhere down the road I can do this again, but the credit is all his. Thanks Peter.
This originates from the Cacti forums post "Multi CPU Utilization Graph" which has links to the templates referenced here. In fact, you may want to go there to find the latest and greatest on this topic.
Begin by downloading the template(s) you need (these links are all from the thread above which were the most current at the time of this post):
- cacti_graph_template_host_mib_-_multi_cpu_utilization_on_2_processor_box.xml
- cacti_graph_template_host_mib_-_multi_cpu_utilization_on_4_processor_box.xml
- cacti_graph_template_host_mib_-_multi_cpu_utilization_on_8_processor_box.xml
- cacti_graph_template_host_mib_-_multi_cpu_utilization_on_16_processor_box.xml
In turn click on each of the Average All data sources - X sources and perform the following:
- Delete the current CDEF items, such as, "Item #1 Custom String: a,b,+,2,/"
- Add the following three items:
- Item #1 - Special Data Source: ALL_DATA_SOURCES_NODUPS (AKA "All Data Sources (Don't Include Duplicates))
- Item #2 - Custom String: 2/4/8 (depending on X above)
- Item #3 - Operator: /
Now you can create the graphs for each device. Click Devices / <Host Name> / create graphs for this host. Under Graph Templates for the selected host click the drop-down box next to create and select "Host MIB - Multi CPU Utilization on X Processor Box" then click Create. On the next screen you will be asked the Index Type, Index Value and Output Type ID - you don't need to enter any values, just click Create. You aren't done yet - one more important step.
Click Graph Management and locate the graph you just created. Under Supplemental Graph Template Data select the CPUs you wish to graph in your multi-CPU graph. This is most likely HOSTNAME - CPU Utilization - CPU0 (cpu), HOSTNAME - CPU Utilization - CPU1 (cpu) and so on ...
Now that that's done you should have nice multi-CPU graphs. You could even delete any previously created CPU utilization graphs, but be careful not to delete the data-sources because the multi-cpu-graph needs these sources. The multi-CPU graphs will even read data from existing sources.
Cacti multi-CPU utilization graph showing device with two CPUs graphed over the past 24 hours and 7 days:
Cacti multi-CPU utilization graph showing device with eight CPUs graphed over the past month and year:
This is a great post on cacti graph cpu average. Thanks.
ReplyDeleteThanks!!!
ReplyDeleteThe links to the cacti templates are dead. Any chance the files can be found elsewhere? Didn't find them in the original forum thread either, at least not all 4 listed here.
ReplyDeleteLinks are still dead.
ReplyDeleteFound them online via googling the filenames
ReplyDeletehttp://www.goldfisch.at/knowwiki/howtos/cacti
Links are dead, but I found by google. Good job. Thanks!!!!
ReplyDeletelinks are
ReplyDeletehttp://forums.cacti.net/download/file.php?id=14883
http://forums.cacti.net/download/file.php?id=11252
http://forums.cacti.net/download/file.php?id=18379
http://forums.cacti.net/download/file.php?id=11447
I have a 32-core system, where do I get the template for that? Thanks!
ReplyDeleteNIce Doc!!. But when i used apve for 2 -core CPU . IT gives me error:
ReplyDeleteusr/share/cacti/rra/sapdevpsrv_cpu_934.rrd
I have to create a file there??
Thanks!
ReplyDeleteI do step by step . I import 8 cpu graph. I see a result -nan percent. Can you help me please? Thanks friends.
ReplyDeletevinicius.inside@gmail.com. What is a -nan?