Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


Idiot lights

 
Post new topic   Reply to topic    Cacti Forum Index -> Plugin: (Network Weather Map)
Author Message
colejv



Joined: 19 Mar 2008
Posts: 16

PostPosted: Sat Aug 23, 2008 7:44 pm    Post subject: Idiot lights Reply with quote

My latest thing has been creating idiot lights, these are small (10pxX10px) images I created with KIconEdit, the intent is that the light up red when room temperature rises above 90 Fahrenheit, power drops below 1VAC, wireless access point or ip based security system fails to respond to ping, I am also displaying current room temp along the usual host status and bandwidth usage. Overlib shows the APC graphs for room temp/input voltage, Bandwidth stats for the AP and ping latency for the security system.



I think this is all of the relative code (assuming you are using .96 if not insert the template code in each node )
Code:

#Scales

SCALE cactiupdown 0.5 1.5   255 0 0
SCALE cactiupdown 1.5 2.5   0 0 255
SCALE cactiupdown 2.5 3.5   0 255 0

SCALE cactitemp 0 0   255 255 255
SCALE cactitemp 0 90   0 255 0
SCALE cactitemp 90 100   255 0 0

SCALE cactipower 0 1  255 0 0
SCALE cactipower 0 250   0 255 0

# DEFAULT definitions:
NODE DEFAULT
        OVERLIBWIDTH 650
        OVERLIBHEIGHT 266
        TARGET cactihost:{node:this:cacti_id}
        USESCALE cactiupdown in

NODE wireless
        ICON /usr/local/share/cacti/plugins/weathermap/configs/wifi.png
        USEICONSCALE cactiupdown in

NODE lock
        ICON /usr/local/share/cacti/plugins/weathermap/configs/lock.png
        USEICONSCALE cactiupdown in

NODE temp
        ICON /usr/local/share/cacti/plugins/weathermap/configs/temp.png
        USEICONSCALE cactitemp in

NODE power
        ICON /usr/local/share/cacti/plugins/weathermap/configs/power.png
        USEICONSCALE cactipower in

NODE UPStemp
        LABEL {node:this:bandwidth_in:%8.0lf}F
        LABELOUTLINECOLOR none
        LABELBGCOLOR none
        USESCALE none in


#nodes

NODE somewherecomm
        LABEL somewhere Commons
        POSITION 1140 13
        SET cacti_id 54

NODE somewherecommUPS
        TEMPLATE temp
        INFOURL /cacti/graph.php?rra_id=all&local_graph_id=248
        OVERLIBGRAPH /cacti/graph_image.php?rra_id=0&graph_height=120&graph_width=650&local_graph_id=248
        TARGET gauge:/usr/local/share/cacti/rra/somewhere_com_ups_check_tempprobe_437.rrd:check_tempProbe:-
        POSITION somewherecommUPStemp 35 0

NODE somewherecommUPStemp
        TEMPLATE UPStemp
        INFOURL /cacti/graph.php?rra_id=all&local_graph_id=248
        OVERLIBGRAPH /cacti/graph_image.php?rra_id=0&graph_height=120&graph_width=650&local_graph_id=248
        TARGET gauge:/usr/local/share/cacti/rra/somewhere_com_ups_check_tempprobe_437.rrd:check_tempProbe:-
        POSITION somewherecomm -35 18


NODE somewherecommpower
        TEMPLATE power
        INFOURL /cacti/graph.php?rra_id=all&local_graph_id=248
        OVERLIBGRAPH /cacti/graph_image.php?rra_id=0&graph_height=120&graph_width=650&local_graph_id=248
        POSITION somewherecommUPS 10 0
        TARGET gauge:/usr/local/share/cacti/rra/somewhere_com_ups_voltin_qry_432.rrd:voltin_qry:-

NODE somewherecommwap
        TEMPLATE wireless
        INFOURL /cacti/graph.php?rra_id=all&local_graph_id=435
        OVERLIBGRAPH /cacti/graph_image.php?rra_id=0&graph_height=120&graph_width=650&local_graph_id=435
        POSITION  somewherecommpower 10 0
        SET cacti_id 240

NODE somewherecommlock
        TEMPLATE lock
        INFOURL /cacti/graph.php?rra_id=all&local_graph_id=381
        OVERLIBGRAPH /cacti/graph_image.php?rra_id=0&graph_height=120&graph_width=650&local_graph_id=381
        POSITION somewherecommwap 10 0
        SET cacti_id 202


I can post the png files if anyone is interested.



excerpt.PNG
 Description:
 Filesize:  1.52 KB
 Viewed:  1799 Time(s)

excerpt.PNG


Back to top
MU-IT
Cacti User


Joined: 06 Nov 2007
Posts: 55

PostPosted: Sat Aug 23, 2008 8:47 pm    Post subject: Reply with quote

that's pretty sweet. I can't wait to try it out.

I'm running weathermap in my office on a 25" LCD as a system monitor, the more info i can display, the better informed I am.
Back to top
Howie
Cacti Guru User


Joined: 16 Sep 2004
Posts: 2135
Location: United Kingdom

PostPosted: Sun Aug 24, 2008 6:11 am    Post subject: Reply with quote

Nice

This is the sort of thing that I want to make easier with the templates stuff. Some way to have the relative position refer to a 'last non-relative' node or similar would mean that you could lose all the position lines into the template too. (still thinking about that - I like to use relative positions for 'main' nodes, too, so it's not quite that simple. Maybe something to mark a node as 'major' or something?)

Even as it stands, you could use SET graph_id 235 and then move the INFOURL and OVERLIBGRAPH to the templates, too.

The current editor doesn't really deal well with this kind of 'cleverness' though, sadly.
Back to top
Dano



Joined: 09 Sep 2008
Posts: 3
Location: NC

PostPosted: Tue Sep 09, 2008 8:54 pm    Post subject: Reply with quote

I'd like the PNG files. I think I'll give this a try. Thanks for post.
Back to top
colejv



Joined: 19 Mar 2008
Posts: 16

PostPosted: Thu Sep 11, 2008 10:17 am    Post subject: Reply with quote

Here they are


temp.png
 Description:
 Filesize:  102 Bytes
 Viewed:  1421 Time(s)

temp.png



lock.png
 Description:
 Filesize:  102 Bytes
 Viewed:  1421 Time(s)

lock.png



wifi.png
 Description:
 Filesize:  140 Bytes
 Viewed:  1421 Time(s)

wifi.png



power.png
 Description:
 Filesize:  131 Bytes
 Viewed:  1421 Time(s)

power.png


Back to top
shanecentre



Joined: 02 Oct 2007
Posts: 1

PostPosted: Fri Oct 10, 2008 7:50 pm    Post subject: Re: Idiot lights Reply with quote

When I use your config with my APC UPS I get the temp back in Celsius instead of Fahrenheit, not unexspected because the data comes from the UPS in C.

Can you use math in the target or node label to convert from C to F?

Sorry if this is a basic question (I'm new to Weathermap) but I've looked though the lists here and the Weathermap site as well as to docs and the closest I've come is some information about scaling. But that doesn't seem to be what I'm looking for.
Back to top
Howie
Cacti Guru User


Joined: 16 Sep 2004
Posts: 2135
Location: United Kingdom

PostPosted: Sat Oct 11, 2008 1:08 am    Post subject: Reply with quote

Well, C= ((F - 32) รท 9) x 5

So you could do:

TARGET scale:0.55555555556:yourrrdfile.rrd - static:17.77777777778:17.77777777778

I've never tried that, but it *looks* like it would work It's early in the morning and I've had no sleep and no coffee though...


(17.77777777778 is 32 * 5 /9)
(0.5555555 is 5/9)
Back to top
colejv



Joined: 19 Mar 2008
Posts: 16

PostPosted: Thu Oct 16, 2008 5:16 pm    Post subject: Reply with quote

What you are seeing on my example is an external temp probe on a ap9619 that is actually read in Fahrenheit, the OID for it (1.3.6.1.4.1.318.1.1.10.2.3.2.1.4) reads either in Fahrenheit or Celsius depending on the settings under System->Preferences using the APC web interface. I have noticed the internal sensors ignore this setting,I considered creating a CDEF in cacti to handle this (that way the graphs would display Fahrenheit as well) but decided against it.

On my maps in the areas that I don't have the external sensors I have an additional scale/setup that displays them in Celsius so I know what I am looking at and no-one panics when they see Temps in the 90's.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Plugin: (Network Weather Map) All times are GMT - 5 Hours
Page 1 of 1

 



Powered by phpBB © 2001, 2005 phpBB Group