Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Mon Mar 27, 2017 11:18 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: change node color to control temperature
PostPosted: Tue Jan 31, 2017 6:16 am 
Offline

Joined: Thu Jan 12, 2017 3:58 am
Posts: 3
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.

Top
 Profile  
 
 Post subject: Re: change node color to control temperature
PostPosted: Fri Feb 03, 2017 4:20 am 
Offline

Joined: Thu Jan 12, 2017 3:58 am
Posts: 3
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:
# 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 164 times ]
Top
 Profile  
 
 Post subject: Re: change node color to control temperature
PostPosted: Fri Feb 03, 2017 4:56 am 
Offline

Joined: Thu Jan 12, 2017 3:58 am
Posts: 3
Now my problem is target, dont show temperature correctly

Code:
# 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 158 times ]
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


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