Different CPU's Utilization in a single web page
Moderators: Developers, Moderators
Different CPU's Utilization in a single web page
hello all
can any one tell me that the cpu utilization of different machine can be displayed in a single web pag. because i want to monitor the cpu utilization of different machine at the same time.
can any one tell me that the cpu utilization of different machine can be displayed in a single web pag. because i want to monitor the cpu utilization of different machine at the same time.
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
Re: Different CPU's Utilization in a single web page
With weathermap 0.91, you would do something like:mtb wrote:hello all
can any one tell me that the cpu utilization of different machine can be displayed in a single web pag. because i want to monitor the cpu utilization of different machine at the same time.
Code: Select all
NODE myserver1
POSITION 100 300
TARGET gauge:/path/to/rrdfile/myserver1_cpu.rrd:1min:-
LABEL {node:this:name} {node:this:bandwidth_in}
That will leave you with node labels that look like "myserver1 4.5"
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
- Diggit2001
- Cacti User
- Posts: 195
- Joined: Tue May 03, 2005 4:29 pm
- Location: MD, US
Hello there. I've never been one to piggy back on someone else's thread, but I was wondering if you'd gotten this workin since I am trying to accomplish pretty much the same thing and am so far having no luck. Here is my config:
Thanks
-Chris
If anyone could let me know what the heck I'm doing wrong, I would appreciate it.WIDTH 800
HEIGHT 600
# BACKGROUND /var/www/html/plugins/weathermap/images/background_800x600.png
HTMLSTYLE overlib
HTMLOUTPUTFILE cpuusage.html
IMAGEOUTPUTFILE cpuusage.png
TITLE Server CPU Usage
KEYPOS 10 420 CPU Usage
KEYTEXTCOLOR 0 0 0
KEYBGCOLOR 255 255 255
BGCOLOR 255 255 255
TITLECOLOR 0 0 0
TIMECOLOR 0 0 0
# End of global section
# DEFAULT definitions:
#LINK DEFAULT
#ARROWSTYLE classic
BANDWIDTH 100M
# End of DEFAULTS section
# Node definitions:
NODE metaframe1_cpu0
LABEL {node:this:name} {node:this:bandwidth_in}
OVERLIBGRAPH https://hostname.domainname.com/graph_i ... _width=300
ICON /var/www/html/plugins/weathermap/images/my_server.png
TARGET gauge: /var/www/html/rra/metaframe1_cpu_1330.rrd:1min:-
LABELOFFSET S
POSITION 100 300
NODE metaframe1_cpu1
LABEL {node:this:name} {node:this:bandwidth_in}
OVERLIBGRAPH https://hostname.domainname.com/graph_i ... _width=300
ICON /var/www/html/plugins/weathermap/images/my_server.png
TARGET gauge: /var/www/html/rra/metaframe1_cpu_1331.rrd:1min:-
LABELOFFSET S
POSITION 250 300
NODE exch2k3_cpu0
LABEL {node:this:name} {node:this:bandwidth_in}
OVERLIBGRAPH https://hostname.domainname.com/graph_i ... _width=300
ICON /var/www/html/plugins/weathermap/images/my_server.png
TARGET gauge: /var/www/html/rra/exch2k3_cpu_1055.rrd:1min:-
LABELOFFSET S
POSITION 400 300
NODE exch2k3_cpu1
LABEL {node:this:name} {node:this:bandwidth_in}
OVERLIBGRAPH https://hostname.domainname.com/graph_i ... _width=300
ICON /var/www/html/plugins/weathermap/images/my_server.png
TARGET gauge: /var/www/html/rra/exch2k3_cpu_1056.rrd:1min:-
LABELOFFSET S
POSITION 550 300
# End of NODE section
# Link definitions:
# End of LINK section
# That's All Folks!
Thanks
-Chris
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
What are you seeing, or not seeing?Diggit2001 wrote:Hello there. I've never been one to piggy back on someone else's thread, but I was wondering if you'd gotten this workin since I am trying to accomplish pretty much the same thing and am so far having no luck.
If anyone could let me know what the heck I'm doing wrong, I would appreciate it.
Thanks
-Chris
You have a space between gauge: and the rrd filename in your TARGETs, which means that all your values will probably be out by 8x. Other than that, it looks right to me.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
- Diggit2001
- Cacti User
- Posts: 195
- Joined: Tue May 03, 2005 4:29 pm
- Location: MD, US
Well, the maps get drawn but they don't reflect the current CPU usage. They all stay at 0, even though when I look at the actual graph, it's showing anywhere between 5 and 15 % usage. None of the servers on the map are doign anything. They're just gray.What are you seeing, or not seeing?
You have a space between gauge: and the rrd filename in your TARGETs, which means that all your values will probably be out by 8x. Other than that, it looks right to me.
Thanks
- Diggit2001
- Cacti User
- Posts: 195
- Joined: Tue May 03, 2005 4:29 pm
- Location: MD, US
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
OK. So take a look in the cacti.log - I suspect you'll see something about DS names not being correct.
The difference between your map, and the OP's is that yours is Windows servers and their's is Unix Load Average. Chances are you'll need to change the DS name (the '1min') to something else.
Here's an article I wrote a while ago about this type of problem, and how to sort it out.
The difference between your map, and the OP's is that yours is Windows servers and their's is Unix Load Average. Chances are you'll need to change the DS name (the '1min') to something else.
Here's an article I wrote a while ago about this type of problem, and how to sort it out.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
- Diggit2001
- Cacti User
- Posts: 195
- Joined: Tue May 03, 2005 4:29 pm
- Location: MD, US
Ahh, excellent article. That really helps to make sense of whats going on here but I have thus far been unsuccessful with getting this to work. When I check out one of my data sources and turn on debug mode, like your article suggests, I get this:
-Chris
So, I then change the Target line in my config to this:/usr/bin/rrdtool create \
/var/www/html/rra/exch2k3_cpu_1055.rrd \
--step 300 \
DS:cpu:GAUGE:600:0:100 \
RRA:AVERAGE:0.5:1:600 \
RRA:AVERAGE:0.5:6:700 \
RRA:AVERAGE:0.5:24:775 \
RRA:AVERAGE:0.5:288:797 \
RRA:MIN:0.5:1:600 \
RRA:MIN:0.5:6:700 \
RRA:MIN:0.5:24:775 \
RRA:MIN:0.5:288:797 \
RRA:MAX:0.5:1:600 \
RRA:MAX:0.5:6:700 \
RRA:MAX:0.5:24:775 \
RRA:MAX:0.5:288:797 \
RRA:LAST:0.5:1:600 \
RRA:LAST:0.5:6:700 \
RRA:LAST:0.5:24:775 \
RRA:LAST:0.5:288:797 \
and I see this in my logs:TARGET gauge:/var/www/html/rra/exch2k3_cpu_1055.rrd:cpu
I'm sure I'm missing something still with the DS, but I haven't figured out what the heck it is. I do appreciate your continued assistance.09/10/2007 10:01:58 AM - WEATHERMAP: Poller[0] ReadData: NODE exch2k3_cpu0, target: gauge:/var/www/html/rra/exch2k3_cpu_1055.rrd:cpu on config line 49 was not recognised as a valid TARGET
-Chris
- Diggit2001
- Cacti User
- Posts: 195
- Joined: Tue May 03, 2005 4:29 pm
- Location: MD, US
OK, I think I've got it. I changed the TARGET line to this:
Thanks again for your help.
-Chris
This seems to have done the trick. Now I'm off to figure out if I can combine the totals of all 4 CPUS on the single server and average them out to a single output.TARGET gauge:/var/www/html/rra/exch2k3_cpu_1055.rrd:cpu:cpu
Thanks again for your help.
-Chris
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
Yes. If you specify DS names, you must specify two (one for in and one for out). You can just use '-' to mean 'none' though. This is because the same code is used for links and nodes, and a link without in and out doesn't make much sense.
To sum all four into one, just list the 4 targets on one line:
To sum all four into one, just list the 4 targets on one line:
Code: Select all
TARGET gauge:cpu1.rrd:cpu:- gauge:cpu2.rrd:cpu:- gauge:cpu3.rrd:cpu:- gauge:cpu4.rrd:cpu:-
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
- Diggit2001
- Cacti User
- Posts: 195
- Joined: Tue May 03, 2005 4:29 pm
- Location: MD, US
-
- Cacti User
- Posts: 63
- Joined: Thu Feb 15, 2007 12:08 pm
I'm having a similar problem with 0.941 (but I'm not using Cacti - just stand-alone Weathermap with Cricket):
NODE Router6
LABEL {node:this:name} {node:this:ds1}
OVERLIBGRAPH https://server/statistics/cricket/mini- ... 200;rand=2
TARGET gauge:/data/cricket-data/routers/Router6.gw.psu.edu.rrd:ds0:ds1
POSITION 80 39
My label on the weathermap colors correctly based on the CPU utilization, but labels it "Router6 [Unknown]" so I know it is picking up the right DS (ds1), but not displaying it numerically correct??
NODE Router6
LABEL {node:this:name} {node:this:ds1}
OVERLIBGRAPH https://server/statistics/cricket/mini- ... 200;rand=2
TARGET gauge:/data/cricket-data/routers/Router6.gw.psu.edu.rrd:ds0:ds1
POSITION 80 39
My label on the weathermap colors correctly based on the CPU utilization, but labels it "Router6 [Unknown]" so I know it is picking up the right DS (ds1), but not displaying it numerically correct??
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
That's because it's {node:this:bandwidth_in} - there's a partial list of these variable names in the advanced section of the manual.runlikeanantelope wrote:I'm having a similar problem with 0.941 (but I'm not using Cacti - just stand-alone Weathermap with Cricket):
NODE Router6
LABEL {node:this:name} {node:this:ds1}
OVERLIBGRAPH https://server/statistics/cricket/mini- ... 200;rand=2
TARGET gauge:/data/cricket-data/routers/Router6.gw.psu.edu.rrd:ds0:ds1
POSITION 80 39
My label on the weathermap colors correctly based on the CPU utilization, but labels it "Router6 [Unknown]" so I know it is picking up the right DS (ds1), but not displaying it numerically correct??
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
-
- Cacti User
- Posts: 63
- Joined: Thu Feb 15, 2007 12:08 pm
OK - I've got it now. Thanks.
NODE Router6
LABEL {node:this:name} {node:this:bandwidth_in}%
OVERLIBGRAPH https://server/statistics/cricket/mini- ... 200;rand=2
TARGET gauge:/data/cricket-data/routers/computer2.gw.psu.edu.rrd:ds0:-
POSITION 399 212
NODE Router6
LABEL {node:this:name} {node:this:bandwidth_in}%
OVERLIBGRAPH https://server/statistics/cricket/mini- ... 200;rand=2
TARGET gauge:/data/cricket-data/routers/computer2.gw.psu.edu.rrd:ds0:-
POSITION 399 212
-
- Cacti User
- Posts: 63
- Joined: Thu Feb 15, 2007 12:08 pm
Who is online
Users browsing this forum: No registered users and 1 guest