change node color to control temperature

Support questions about the Network Weather Map plugin

Moderators: Developers, Moderators

Post Reply
ashander
Posts: 3
Joined: Thu Jan 12, 2017 3:58 am

change node color to control temperature

Post by ashander »

Hi, I am a grantee who has been working with Cacti for a short time and wanted to ask about Wheathermap.

I recently had to create a Weathermap with several nodes, one that controls the temperature and another for the humidity of a device. I would like to know if you can configure the node to show the red color if you pass a specific temperature, to give an example. Is this possible?

Thanks in advance,

Ash
Last edited by ashander on Fri Feb 03, 2017 4:28 am, edited 1 time in total.
ashander
Posts: 3
Joined: Thu Jan 12, 2017 3:58 am

Re: change node color to control temperature

Post by ashander »

Can somebody help me? I need an example like this, to control the temperature and humidity of devices. One node for example.

I have this, am I doing it right?

IMPORTANT: The image is what I want to get, the code is what I have, there is not in the image

Code: Select all

# Automatically generated by php-weathermap v0.98


WIDTH 600
HTMLSTYLE overlib
KEYFONT 3
TITLEFONT 5
TITLE Tempeature and Humidity
TIMEPOS 1662 15 Created: %b %d %Y %H:%M:%S

KEYPOS DEFAULT 1695 966 
KEYSTYLE  DEFAULT horizontal 158
KEYTEXTCOLOR 0 0 0
KEYOUTLINECOLOR 0 0 0
KEYBGCOLOR 255 255 255
BGCOLOR 255 255 255
TITLECOLOR 0 0 0
TIMECOLOR 0 0 0


# green
SCALE temp 0 24  0 255 0
# yellow
SCALE temp 24 27 255 255 0
# red
SCALE temp 27 100 255 0 0


#SET key_hidepercent_DEFAULT 1
SET screenshot_mode 0

# End of global section


# TEMPLATE-only NODEs:
NODE DEFAULT
   LABELFONT 1
   MAXVALUE 100


# TEMPLATE-only LINKs:
LINK DEFAULT
   WIDTH 3
   BWFONT 1
   BANDWIDTH 1000M


# regular NODEs:
	NODE Temperature
	LABEL Temp
	INFOURL /cacti/graph.php?rra_id=all&local_graph_id=472
	OVERLIBGRAPH /cacti/graph_image.php?rra_id=0&graph_nolegend=true&graph_height=100&graph_width=300&local_graph_id=472
	ICON images/port_{node:this:inscaletag}.png
	TARGET /usr/share/cacti/rra/138/597.rrd
	USESCALE temp
	POSITION 110 275


# regular LINKs:


# That's All Folks!

My code should in the current state put the node in yellow, but it puts me in green, any idea why?
Attachments
pdc.jpg
pdc.jpg (66.36 KiB) Viewed 2305 times
ashander
Posts: 3
Joined: Thu Jan 12, 2017 3:58 am

Re: change node color to control temperature

Post by ashander »

Now my problem is target, dont show temperature correctly

Code: Select all

# regular NODEs:
	NODE Temp4
	LABEL Temp
	INFOURL /cacti/graph.php?rra_id=all&local_graph_id=472
	OVERLIBGRAPH /cacti/graph_image.php?rra_id=0&graph_nolegend=true&graph_height=100&graph_width=300&local_graph_id=472
	ICON images/port_{node:this:inscaletag}.png
	LABEL {node:this:bandwidth_in:%d} C
	TARGET gauge:/usr/share/cacti/rra/138/597.rrd:tempTemperature:-
	USESCALE temp
	POSITION 110 275
What am I doing wrong with the target?
Attachments
temp.png
temp.png (322 Bytes) Viewed 2299 times
duykid
Posts: 8
Joined: Thu Sep 21, 2017 8:58 pm

Re: change node color to control temperature

Post by duykid »

thanks alot!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest