Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Fri Apr 28, 2017 1:29 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 12 posts ] 
Author Message
 Post subject: ZORDER LABELBG + {node:this:inscaletag}
PostPosted: Tue Nov 08, 2016 1:18 pm 
Offline
Cacti User

Joined: Mon May 31, 2010 9:26 am
Posts: 124
Is it possible to have only one NODE for this kind of setup ?. I want to have a node wich graph an .PNG base of interface status(up or down), but also i want to have a LABELBGCOLOR. I tried to play with ZORDER, but didnt manage to(the BGCOLOR overwrites the PNG. I know I can make this happen with 2 NODES like below.

NODE P1
TEMPLATE PORTS
ICON images/ra_{node:this:inscaletag}.png
TARGET gauge:/var/www/html/cacti/rra/ro-ar01a-ra_int_status_3858.rrd:int_status:-
USESCALE ifstatus in
POSITION STATUS 0 23

NODE P1_B
POSITION STATUS 0 23
ZORDER 100
LABELFONT 102
LABELOUTLINECOLOR none
LABELBGCOLOR 255 178 102
ICON 93 24 box


Top
 Profile  
 
 Post subject: Re: ZORDER LABELBG + {node:this:inscaletag}
PostPosted: Tue Nov 08, 2016 2:14 pm 
Offline
Cacti Guru User
User avatar

Joined: Thu Sep 16, 2004 5:53 am
Posts: 5091
Location: United Kingdom
That's an interesting question!

You could have a scale like this (for whatever the two values are):
Code:
SCALE updown 0 1 255 178 102 down
SCALE updown 1 2 255 178 102 up


So the colour is set by the scale, but the colour is the same for both values...

A USESCALE will always override the manually set colour.

[woo! this is my 5000th post on the Cacti forums...]

_________________
Weathermap 0.98 is out! & QuickTree 0.2. Superlinks is over there now.
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!)


Top
 Profile  
 
 Post subject: Re: ZORDER LABELBG + {node:this:inscaletag}
PostPosted: Tue Nov 08, 2016 3:42 pm 
Offline
Cacti User

Joined: Mon May 31, 2010 9:26 am
Posts: 124
What I want is to have a NODE ICON 110 24 box ( filled with a color) and on top of that...the ICON inscaletag wich is a PNG with an green OK for up and a red X for down :).


Top
 Profile  
 
 Post subject: Re: ZORDER LABELBG + {node:this:inscaletag}
PostPosted: Tue Nov 08, 2016 4:21 pm 
Offline
Cacti Guru User
User avatar

Joined: Thu Sep 16, 2004 5:53 am
Posts: 5091
Location: United Kingdom
Oh, that's two icons, so you will need two nodes. Sorry!

How about making a 110x24 box in your paint software, and pasting on the icon? Two copies, one for up, one for down?

Like the attached?


Attachments:
up.png
up.png [ 775 Bytes | Viewed 490 times ]
down.png
down.png [ 693 Bytes | Viewed 490 times ]

_________________
Weathermap 0.98 is out! & QuickTree 0.2. Superlinks is over there now.
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!)
Top
 Profile  
 
 Post subject: Re: ZORDER LABELBG + {node:this:inscaletag}
PostPosted: Tue Nov 08, 2016 4:31 pm 
Offline
Cacti User

Joined: Mon May 31, 2010 9:26 am
Posts: 124
I can do that, will do that, was wondering if I can make it with one node. Maybe I'll get tired of that BG color, and want another :), I'll have to make another edit in paint software, upload the png again, etc.

PS : I thought of making one big box for all 32 ports, like 110 768(24*32) and BG color that, but it wont look like I want(each 110 24 box nicely separately from another, the up and down line from each port, will be missing).


Top
 Profile  
 
 Post subject: Re: ZORDER LABELBG + {node:this:inscaletag}
PostPosted: Tue Nov 08, 2016 4:41 pm 
Offline
Cacti Guru User
User avatar

Joined: Thu Sep 16, 2004 5:53 am
Posts: 5091
Location: United Kingdom
Not with two icons, no.

For the box aicon in particular, it would be useful to be able to force the size of the label box, I guess, so you don't need to use an icon. Then there would be one icon and one label that you can colour as usual.

_________________
Weathermap 0.98 is out! & QuickTree 0.2. Superlinks is over there now.
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!)


Top
 Profile  
 
 Post subject: Re: ZORDER LABELBG + {node:this:inscaletag}
PostPosted: Tue Nov 08, 2016 4:44 pm 
Offline
Cacti User

Joined: Wed Jul 20, 2016 8:00 pm
Posts: 60
Atreides wrote:
I can do that, will do that, was wondering if I can make it with one node. Maybe I'll get tired of that BG color, and want another :), I'll have to make another edit in paint software, upload the png again, etc.

PS : I thought of making one big box for all 32 ports, like 110 768(24*32) and BG color that, but it wont look like I want(each 110 24 box nicely separately from another, the up and down line from each port, will be missing).


I don't quite understand what's the final outcome you're aiming but wouldn't be better with relative positions and templates?

_________________
Cacti - 0.8.8h
Poller Type - CMD
Weathermap 0.98a
Server Info - Linux 3.10.0 - Centos 6
Web Server - Apache/2.4.6 PHP 5.4.16
MySQL - 5.5 ;RRDTool - 1.4.8 ;SNMP - 5.7.2


Top
 Profile  
 
 Post subject: Re: ZORDER LABELBG + {node:this:inscaletag}
PostPosted: Tue Nov 08, 2016 4:55 pm 
Offline
Cacti User

Joined: Mon May 31, 2010 9:26 am
Posts: 124
This is what I want to accomplish. Since there are 2 icons(ICON 93 24 box for the background color and the ICON added from inscaletag), I thought I can make it happen with just one NODE.
Maybe a future feature? to be able to put 2 icons on a node with different zorder ?.


Attachments:
interface status.png
interface status.png [ 36.49 KiB | Viewed 481 times ]
Top
 Profile  
 
 Post subject: Re: ZORDER LABELBG + {node:this:inscaletag}
PostPosted: Tue Nov 08, 2016 5:03 pm 
Offline
Cacti User

Joined: Wed Jul 20, 2016 8:00 pm
Posts: 60
Yep, I'm with you. Would be useful for me too.

Don't know what's easiest, maybe just making USESCALE not overriding the colors and also grid maker feature for the web editor.

_________________
Cacti - 0.8.8h
Poller Type - CMD
Weathermap 0.98a
Server Info - Linux 3.10.0 - Centos 6
Web Server - Apache/2.4.6 PHP 5.4.16
MySQL - 5.5 ;RRDTool - 1.4.8 ;SNMP - 5.7.2


Top
 Profile  
 
 Post subject: Re: ZORDER LABELBG + {node:this:inscaletag}
PostPosted: Tue Nov 08, 2016 5:08 pm 
Offline
Cacti User

Joined: Mon May 31, 2010 9:26 am
Posts: 124
Howie, is there a way to ignore the warnings for negative values? I have a few and set nowarnclip 1 works only for positive values.

PUCHO : Managed to get the result with 2 nodes using same POSITION.

NODE P2
TEMPLATE PORTS
ICON images/ra_{node:this:inscaletag}.png
TARGET gauge:/var/www/html/cacti/rra/ro-ar01a-ra_int_status_3859.rrd:int_status:-
USESCALE ifstatus in
POSITION P1 0 23

NODE P2_B
TEMPLATE PORT_B
POSITION P1 0 23

Second NODE is just for filling the background with that yellow'ish color.


Top
 Profile  
 
 Post subject: Re: ZORDER LABELBG + {node:this:inscaletag}
PostPosted: Wed Nov 09, 2016 5:38 am 
Offline
Cacti Guru User
User avatar

Joined: Thu Sep 16, 2004 5:53 am
Posts: 5091
Location: United Kingdom
For the warnings, there are two ways:

1) If the warning has WMWARNxx in it, you can add "SET nowarn_WMWARNxx 1" to the map config file (or in the Cacti UI for a group of maps/globally if you like)

2) Using an absolute scale should also stop any complaints about clipping or negative values.

_________________
Weathermap 0.98 is out! & QuickTree 0.2. Superlinks is over there now.
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!)


Top
 Profile  
 
 Post subject: Re: ZORDER LABELBG + {node:this:inscaletag}
PostPosted: Wed Nov 09, 2016 5:48 am 
Offline
Cacti Guru User
User avatar

Joined: Thu Sep 16, 2004 5:53 am
Posts: 5091
Location: United Kingdom
Having USESCALE not update the BGCOLOR... this is a little bit unusual, because in theory that's all that USESCALE does :-) I definitely can see the point though. I'm just trying to think of the best way to configure it that isn't confusing to someone who doesn't care about it.

USESCALE somescale in nocolor

USESCALE somescale in keyonly

NODE sdfsdf
SET ignore_scalecolor 1

something else?

A grid wizard in the editor is something I've been thinking about for a while. I usually write a little perl script or use excel to generate the config, but I can see that not everyone could, and this would be quicker.

_________________
Weathermap 0.98 is out! & QuickTree 0.2. Superlinks is over there now.
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!)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group