change colour node

Support questions about the Network Weather Map plugin

Moderators: Developers, Moderators

Post Reply
tant
Posts: 2
Joined: Mon Sep 17, 2012 6:24 am

change colour node

Post by tant »

Hello experts.
I have a question about setting Cacti. I was that all the nodes on the map changes color depending on the state of the interface switch. Nod was green if the state interfeya up, node red if interface status down. Help me please.
User avatar
classen
Cacti User
Posts: 116
Joined: Thu Nov 12, 2009 3:07 pm

Re: change colour node

Post by classen »

You need to make a new SCALE

Code: Select all

SCALE IFSTATUS 0 1.5 0 255 0 Up 
SCALE IFSTATUS 1.5 2.5 255 0 0 Down
Then a node that uses that scale and has a suitable TARGET which is monitoring ifStatus. On my switch it is ifOperStatus.

Code: Select all

NODE port1
USESCALE IFSTATUS
ICON 14 14 round
TARGET /path/to/your/rrd
tant
Posts: 2
Joined: Mon Sep 17, 2012 6:24 am

Re: change colour node

Post by tant »

I did as you wrote, but I have rather a NODE that is to change the color, white circle. Field ICON should look like: ICON 14 14 round?

Below is a property NODE:

NODE Test
LABEL Test
ICON 14 14 round
TARGET /usr/share/cacti/rra/test_me_traffic_in_1273.rrd
USESCALE IFSTATUS in
POSITION 183 109
any ideas? sorry for my english.
HuaweiVSCisco
Posts: 29
Joined: Mon Jun 16, 2014 8:58 am

Re: change colour node

Post by HuaweiVSCisco »

tant wrote:I did as you wrote, but I have rather a NODE that is to change the color, white circle. Field ICON should look like: ICON 14 14 round?

Below is a property NODE:

NODE Test
LABEL Test
ICON 14 14 round
TARGET /usr/share/cacti/rra/test_me_traffic_in_1273.rrd
USESCALE IFSTATUS in
POSITION 183 109
any ideas? sorry for my english.

Bumping this gentlemen's post would like to know if what he asks is true...specifically the
part
TARGET /usr/share/cacti/rra/test_me_traffic_in_1273.rrd
USESCALE IFSTATUS in

for me the "usescale ifstatus in" became "usescale ifstatus inpercent"


my config is similar

NODE Mikrotik
LABEL Mikrotik
LABELOFFSET N
LABELFONT 3
LABELOUTLINECOLOR none
LABELBGCOLOR none
INFOURL /cacti/graph.php?rra_id=all&local_graph_id=40
OVERLIBGRAPH /cacti/graph_image.php?rra_id=0&graph_nolegend=true&graph_height=100&graph_width=300&local_graph_id=40
ICON 100 100 images/Router.png
TARGET /var/lib/cacti/rra/mikrotik_traffic_in_12.rrd:avg:avg
USESCALE IFSTATUS in percent
POSITION 760 270
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: change colour node

Post by Howie »

It looks like you are taking the traffic counters (traffic_in) instead of the interface status. You need to have a Cacti graph that shows interface status. This is not on any of the standard Cacti graphs.
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!)
HuaweiVSCisco
Posts: 29
Joined: Mon Jun 16, 2014 8:58 am

Re: change colour node

Post by HuaweiVSCisco »

Howie wrote:It looks like you are taking the traffic counters (traffic_in) instead of the interface status. You need to have a Cacti graph that shows interface status. This is not on any of the standard Cacti graphs.
ah ok thanks i found another thread where you commented about using up.jpg, down.jpg...I will refer to that thread thanks Howie
clay584
Posts: 1
Joined: Thu Jul 10, 2014 9:50 am

Re: change colour node

Post by clay584 »

Please help me with this. I am trying to get a green dot if a device is active, yellow dot if it is in standby. Cacti is already graphing the oid. the integer 9 means the device is active, the integer 10 means the device is in standby.

Here is what I have so far.

Code: Select all

SCALE HASTATUS 9 9 0 255 0 
SCALE HASTATUS 10 10 255 255 0

Code: Select all

NODE SGJAC1ASA5550A-status
	USESCALE HASTATUS
	ICON 14 14 round
	TARGET gauge:/usr/share/cacti/rra/sgjac1asa5550a_snmp_oid_1378.rrd:snmp_oid
	POSITION 1200 100

Code: Select all

Data Source Debug
/usr/bin/rrdtool create \
/usr/share/cacti/rra/sgjac1asa5550a_snmp_oid_1378.rrd \
--step 300  \
DS:snmp_oid:GAUGE:600:0:10 \
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:MAX:0.5:1:600 \
RRA:MAX:0.5:6:700 \
RRA:MAX:0.5:24:775 \
RRA:MAX:0.5:288:797 \
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: change colour node

Post by Howie »

And what does or doesn't happen?? You didn't describe your problem

That looks roughly right. I would change the scale to 8.5-9.5 and 9.5-10.5, because rrdtool sometimes rounds things off when the value changes.
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!)
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests