Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Mon Aug 21, 2017 7:03 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 78 posts ]  Go to page 1, 2, 3, 4, 5, 6  Next
Author Message
 Post subject: weathermap to show int status instead of traffic utilization
PostPosted: Wed Nov 22, 2006 4:52 am 
Offline
Cacti User

Joined: Sat Jul 09, 2005 3:13 pm
Posts: 142
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


Top
 Profile  
 
 Post subject: Re: weathermap to show int status instead of traffic utiliza
PostPosted: Wed Nov 22, 2006 1:19 pm 
Offline
Cacti Guru User
User avatar

Joined: Thu Sep 16, 2004 5:53 am
Posts: 5118
Location: United Kingdom
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:
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:
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.98 is out! & QuickTree 0.2. Superlinks is over there now.
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!)


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 23, 2006 10:37 am 
Offline
Cacti User

Joined: Sat Jul 09, 2005 3:13 pm
Posts: 142
thanks for the reply. i'll try what you suggested and let you know what happens


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 23, 2006 10:39 am 
Offline
Cacti Guru User
User avatar

Joined: Thu Sep 16, 2004 5:53 am
Posts: 5118
Location: United Kingdom
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.98 is out! & QuickTree 0.2. Superlinks is over there now.
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!)


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 23, 2006 10:52 am 
Offline
Cacti User

Joined: Sat Jul 09, 2005 3:13 pm
Posts: 142
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:
File comment: weathermap sample link status
weathermap sample link status.JPG
weathermap sample link status.JPG [ 32.35 KiB | Viewed 11025 times ]
Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 23, 2006 11:24 am 
Offline
Cacti Guru User
User avatar

Joined: Thu Sep 16, 2004 5:53 am
Posts: 5118
Location: United Kingdom
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.98 is out! & QuickTree 0.2. Superlinks is over there now.
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!)


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 23, 2006 11:52 am 
Offline
Cacti User

Joined: Sat Jul 09, 2005 3:13 pm
Posts: 142
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


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 23, 2006 12:08 pm 
Offline
Cacti Guru User
User avatar

Joined: Thu Sep 16, 2004 5:53 am
Posts: 5118
Location: United Kingdom
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.98 is out! & QuickTree 0.2. Superlinks is over there now.
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!)


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 23, 2006 12:32 pm 
Offline
Cacti User

Joined: Sat Jul 09, 2005 3:13 pm
Posts: 142
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


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 23, 2006 1:03 pm 
Offline
Cacti Guru User
User avatar

Joined: Thu Sep 16, 2004 5:53 am
Posts: 5118
Location: United Kingdom
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.98 is out! & QuickTree 0.2. Superlinks is over there now.
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!)


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 23, 2006 1:32 pm 
Offline
Cacti User

Joined: Sat Jul 09, 2005 3:13 pm
Posts: 142
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.

Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 23, 2006 1:33 pm 
Offline
Cacti Guru User
User avatar

Joined: Thu Sep 16, 2004 5:53 am
Posts: 5118
Location: United Kingdom
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.98 is out! & QuickTree 0.2. Superlinks is over there now.
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!)


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 23, 2006 1:44 pm 
Offline
Cacti User

Joined: Sat Jul 09, 2005 3:13 pm
Posts: 142
sample target

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

thanks


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 23, 2006 2:33 pm 
Offline
Cacti Guru User
User avatar

Joined: Thu Sep 16, 2004 5:53 am
Posts: 5118
Location: United Kingdom
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:
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:
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.98 is out! & QuickTree 0.2. Superlinks is over there now.
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!)


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 24, 2006 11:52 am 
Offline
Cacti User

Joined: Sat Jul 09, 2005 3:13 pm
Posts: 142
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 78 posts ]  Go to page 1, 2, 3, 4, 5, 6  Next

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 2 guests


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