Hi All,
Ive found an example how to display up down status on a weathermap.
I've seen that, if down you can display a dirrent icon that when it up, ...
I'm wondering if this can be done in some kind of scale.
like when the value is 0 get a red smily
when it is between 1 and 50 give a green smily
when it is between 50 and 75 a yellow smily
when it is between 75 and 100 a red one again
(this is an example, i cant to do this with other ranges and more pics)
Thanks,
kyRoo
Icon Scale
Moderators: Developers, Moderators
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
Re: Icon Scale
You can do this two ways, depending on which version of weathermap you have.KyRoo wrote:Hi All,
Ive found an example how to display up down status on a weathermap.
I've seen that, if down you can display a dirrent icon that when it up, ...
I'm wondering if this can be done in some kind of scale.
like when the value is 0 get a red smily
when it is between 1 and 50 give a green smily
when it is between 50 and 75 a yellow smily
when it is between 75 and 100 a red one again
(this is an example, i cant to do this with other ranges and more pics)
Thanks,
kyRoo
In 0.91+, you can use 'inscalekey' to find which line in a scale the item hit.
Code: Select all
SCALE goodbad 0 0 255 0 0
SCALE goodbad 0 50 0 255 0
SCALE goodbad 50 75 255 255 0
(the colours here don't actually matter - if you don't want the label to change colour, set all the colours to white)
Then you can use
Code: Select all
NODE blah
USESCALE goodbad
ICON images/status_{node:this:inscalekey}.png
In 0.95+, it's a bit nicer. There's a thing called a scale tag.
Code: Select all
SCALE goodbad 0 0 255 0 0 images/redicon.png
SCALE goodbad 0 50 0 255 0 images/greenicon.png
SCALE goodbad 50 75 255 255 0 images/yellowicon.png
NODE blah
USESCALE goodbad
ICON {node:this:inscaletag}
Hope that lot makes a bit of sense. It's a few steps, but especially in 0.95 it's fairly painless.
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!)
Well still some troubles
My configuration is the following:
But when the map is being generate I have this error in my Cacti log file:
My configuration is the following:
Code: Select all
SCALE goodbad 0 33 255 0 0 images/chip_ok.png
SCALE goodbad 33 66 0 255 0 images/chip_warning.png
SCALE goodbad 66 100 255 255 0 images/chip_critical.png
...
# Node definitions:
NODE MYHOST
USESCALE goodbad
ICON {node:this:inscalekey}
INFOURL /cacti/graph.php?rra_id=all&local_graph_id=2001
OVERLIBGRAPH /cacti/graph_image.php?...local_graph_id=2001
TARGET gauge:/cacti/rra/myhost_5min_cpu_2591.rrd:5min_cpu:-
POSITION 298 257
Code: Select all
11/04/2008 03:06:02 PM - WEATHERMAP: Poller[0] [Map 17] Sandbox: ICON 0_33 does not exist, or is not readable. Check path and permissions.
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
Replying to two different threads for the same problem is one of them...Jem wrote:Well still some troubles
Sorry, that should be inscaletag, not inscalekey.Jem wrote: My configuration is the following:But when the map is being generate I have this error in my Cacti log file:Code: Select all
SCALE goodbad 0 33 255 0 0 images/chip_ok.png SCALE goodbad 33 66 0 255 0 images/chip_warning.png SCALE goodbad 66 100 255 255 0 images/chip_critical.png ... # Node definitions: NODE MYHOST USESCALE goodbad ICON {node:this:inscalekey} INFOURL /cacti/graph.php?rra_id=all&local_graph_id=2001 OVERLIBGRAPH /cacti/graph_image.php?...local_graph_id=2001 TARGET gauge:/cacti/rra/myhost_5min_cpu_2591.rrd:5min_cpu:- POSITION 298 257
Code: Select all
11/04/2008 03:06:02 PM - WEATHERMAP: Poller[0] [Map 17] Sandbox: ICON 0_33 does not exist, or is not readable. Check path and permissions.
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!)
Who is online
Users browsing this forum: No registered users and 0 guests