weathermap to show int status instead of traffic utilization

Support questions about the Network Weather Map plugin

Moderators: Developers, Moderators

flipflap
Cacti User
Posts: 142
Joined: Sat Jul 09, 2005 3:13 pm

weathermap to show int status instead of traffic utilization

Post by flipflap »

hi, is there a way for weathermap to show interface status instead of traffic utilization. i am already monitoring interface status on cacti and was wondering if it could handle the values returned the interface status OID and show this on the map. values returned are 1 for up and 2 for down. i tried using the rrd generated by the interface status on "target" but nothing shows up on weathermap. thanks
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: weathermap to show int status instead of traffic utiliza

Post by Howie »

flipflap wrote:hi, is there a way for weathermap to show interface status instead of traffic utilization. i am already monitoring interface status on cacti and was wondering if it could handle the values returned the interface status OID and show this on the map. values returned are 1 for up and 2 for down. i tried using the rrd generated by the interface status on "target" but nothing shows up on weathermap. thanks
Weathermap uses the BANDWIDTH keyword to calculate percentage usage, then decides on a colour based on that. You can trick it into doing what you want though:

Code: Select all

SCALE 0 70  0 255 0
SCALE 70 100   255 0 0

LINK xyz
   NODES blah blab
   BANDWIDTH 2
Define a BANDWIDTH so that '1' evaluates to 50% and '2' is 100%, then change the colours using SCALE, so that 100% is red, and 50% is green. Job done :-)

You probably want to use a different rrd for the other side of the arrow though - the other direction becomes the status of the interface on the other device - so you would also do:

Code: Select all

LINK xyz
   TARGET  device1.rrd:interfacestate:- device2.rrd:-:interfacestate
or whatever the rrd DS is called in your rrds. This takes the 'in' value from one rrd, and the 'out' from the other.
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!)
flipflap
Cacti User
Posts: 142
Joined: Sat Jul 09, 2005 3:13 pm

Post by flipflap »

thanks for the reply. i'll try what you suggested and let you know what happens
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

flipflap wrote:thanks for the reply. i'll try what you suggested and let you know what happens
Cool. Thinking about it, you might need to use BANDWIDTH 16, as I think weathermap will x8 your rrd data to turn it from bits to bytes.
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!)
flipflap
Cacti User
Posts: 142
Joined: Sat Jul 09, 2005 3:13 pm

Post by flipflap »

SWEET MOTHER OF GOD!!!! it works!!!! thanks for the suggestion!!!
now the other problem i have is the links says 0. is there a way for weathemap show 1 or 2 on the link. also can i change the legend to show green as up and red as down. thanks.

legend currently shows green for 0 - 70 and red for 70 - 100
Attachments
weathermap sample link status
weathermap sample link status
weathermap sample link status.JPG (32.35 KiB) Viewed 14307 times
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

flipflap wrote:SWEET MOTHER OF GOD!!!! it works!!!! thanks for the suggestion!!!
now the other problem i have is the links says 0. is there a way for weathemap show 1 or 2 on the link. also can i change the legend to show green as up and red as down. thanks.

legend currently shows green for 0 - 70 and red for 70 - 100
Sadly, you can't do either of those. The best you can do is hide the legend (KEYPOS -1 -1), hide the label on the link (BWLABEL none), and hope that people are clueful enough to understand that red is bad, and green is good (and that they aren't red/green colourblind).

Nothing to stop you making an image of your own legend, and adding one more NODE with that image as it's ICON. Or making a BACKGROUND with that legend already in it.

For once, I won't be saying that 0.9 will help, either - I don't think it will.

Nice to see it working though :D
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!)
flipflap
Cacti User
Posts: 142
Joined: Sat Jul 09, 2005 3:13 pm

Post by flipflap »

hey i made a node then added a link that is down but it did not show as red. how can i check what value is being checked by weathermap to generate the color? i see on the graph that the value is 2 but the color is still green. i already changed the BANDWIDTH to 16 i originally set it to 2
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

flipflap wrote:hey i made a node then added a link that is down but it did not show as red. how can i check what value is being checked by weathermap to generate the color? i see on the graph that the value is 2 but the color is still green. i already changed the BANDWIDTH to 16 i originally set it to 2
If you turn on DEBUG mode in cacti, you can see Weathermap reading it's datasources in the cacti.log. Look for lines like: ReadFromRRD: Returning (1,2)
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!)
flipflap
Cacti User
Posts: 142
Joined: Sat Jul 09, 2005 3:13 pm

Post by flipflap »

11/24/2006 01:28:49 AM - WEATHERMAP: Poller[0] ReadData: Setting 0,0
11/24/2006 01:28:49 AM - WEATHERMAP: Poller[0] ReadFromRRD: Returning (0,0)
11/24/2006 01:28:49 AM - WEATHERMAP: Poller[0] ReadFromRRD: Our line is 1164302700: 2.0000000000e+00
11/24/2006 01:28:49 AM - WEATHERMAP: Poller[0] --1164302400: 2.0000000000e+00
)
( int_status
11/24/2006 01:28:49 AM - WEATHERMAP: Poller[0] ReadFromRRD: Found a good line: 1164302700: 2.0000000000e+00
11/24/2006 01:28:49 AM - WEATHERMAP: Poller[0] --1164302700: 2.0000000000e+00
11/24/2006 01:28:49 AM - WEATHERMAP: Poller[0] ReadFromRRD: 1: This isn't a number: [nan]
11/24/2006 01:28:49 AM - WEATHERMAP: Poller[0] --1164303000: nan
11/24/2006 01:28:49 AM - WEATHERMAP: Poller[0] --
11/24/2006 01:28:49 AM - WEATHERMAP: Poller[0] >
11/24/2006 01:28:49 AM - WEATHERMAP: Poller[0] > 1164303000: nan
11/24/2006 01:28:49 AM - WEATHERMAP: Poller[0] > 1164302700: 2.0000000000e+00
11/24/2006 01:28:49 AM - WEATHERMAP: Poller[0] > 1164302400: 2.0000000000e+00

what does this mean? thanks
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

flipflap wrote:11/24/2006 01:28:49 AM - WEATHERMAP: Poller[0] ReadData: Setting 0,0
11/24/2006 01:28:49 AM - WEATHERMAP: Poller[0] ReadFromRRD: Returning (0,0)
11/24/2006 01:28:49 AM - WEATHERMAP: Poller[0] ReadFromRRD: Our line is 1164302700: 2.0000000000e+00
11/24/2006 01:28:49 AM - WEATHERMAP: Poller[0] --1164302400: 2.0000000000e+00
)
( int_status
11/24/2006 01:28:49 AM - WEATHERMAP: Poller[0] ReadFromRRD: Found a good line: 1164302700: 2.0000000000e+00
11/24/2006 01:28:49 AM - WEATHERMAP: Poller[0] --1164302700: 2.0000000000e+00
11/24/2006 01:28:49 AM - WEATHERMAP: Poller[0] ReadFromRRD: 1: This isn't a number: [nan]
11/24/2006 01:28:49 AM - WEATHERMAP: Poller[0] --1164303000: nan
11/24/2006 01:28:49 AM - WEATHERMAP: Poller[0] --
11/24/2006 01:28:49 AM - WEATHERMAP: Poller[0] >
11/24/2006 01:28:49 AM - WEATHERMAP: Poller[0] > 1164303000: nan
11/24/2006 01:28:49 AM - WEATHERMAP: Poller[0] > 1164302700: 2.0000000000e+00
11/24/2006 01:28:49 AM - WEATHERMAP: Poller[0] > 1164302400: 2.0000000000e+00

what does this mean? thanks
Your rrd only has one DS in it... what are you using as a TARGET line?
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!)
flipflap
Cacti User
Posts: 142
Joined: Sat Jul 09, 2005 3:13 pm

Post by flipflap »

the value returned by this --> http://forums.cacti.net/viewtopic.php?t=17722

it's ifOperStatus, either 1 or 2

sample of target

.../cacti/rra/xxx_int_status_524.rrd
Last edited by flipflap on Thu Nov 23, 2006 1:33 pm, edited 1 time in total.
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

flipflap wrote:the value returned by this --> http://forums.cacti.net/viewtopic.php?t=17722

it's ifOperStatus, either 1 or 2
OK, but what are you using as a TARGET line in the weathermap config?
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!)
flipflap
Cacti User
Posts: 142
Joined: Sat Jul 09, 2005 3:13 pm

Post by flipflap »

sample target

TARGET C:/Apache/Apache2/htdocs/cacti/rra/xxx_int_status_519.rrd

thanks
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

flipflap wrote:sample target

TARGET C:/Apache/Apache2/htdocs/cacti/rra/xxx_int_status_519.rrd

thanks
OK. The default DS names that weathermap looks for are "traffic_in" and "traffic_out", which are the names used in cacti's standard interface stats data template.

To get this working, you'll need to specify a different DS name:

Code: Select all

TARGET C:/Apache/Apache2/htdocs/cacti/rra/xxx_int_status_519.rrd:int_status:-
That will read the int_status as the 'in' value, and leave the 'out' value as 0. As I mentioned before, you probably have another router at the other end, which has the interface status for the other side of this link. To use that, you would use:

Code: Select all

TARGET C:/Apache/Apache2/htdocs/cacti/rra/xxx_int_status_519.rrd:int_status:- C:/Apache/Apache2/htdocs/cacti/rra/xxx_int_status_2339.rrd:-:int_status
So that the 'out' value for the link is taken from that other rrd.

That said, if you are using point-to-point leased lines rather than Frame/ATM/MPLS, then when one end of the link goes down, you can assume the other end is down too :-)

In 0.9, I've already added a better error message to tell you that your DS name is not available in the RRD file, so this is more obvious.
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!)
flipflap
Cacti User
Posts: 142
Joined: Sat Jul 09, 2005 3:13 pm

Post by flipflap »

TARGET C:/Apache/Apache2/htdocs/cacti/rra/xxx_int_status_528.rrd:int_status:-C:/Apache/Apache2/htdocs/cacti/rra/xxx_int_status_528.rrd:-:int_status

is this the correct syntax? thanks
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests