View traffic & error stats

Support questions about the Network Weather Map plugin

Moderators: Developers, Moderators

mduling
Posts: 39
Joined: Tue Mar 01, 2005 1:49 pm

View traffic & error stats

Post by mduling »

I'm just learning php weathermap and loving it! But I have a practical question. Does anyone put interface error stats on their weathermaps, and if so what would be the best way to display traffic and error stats for network links other than creating a separate map for error stats?
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

I've been thinking about that lately too.

I was thinking perhaps that some kind of flag in INBWFORMAT could hide a value if it was 0. The GrangeNet weathermap does that. Or maybe did. It seems a bit dead.

So you'd get "56Mb" normally, and "56Mb - 1.2 err/sec" if there were errors. We'd need some way to specify that other data source too, which doesn't exist right now.

One of the others (I think it was the old Abilene/Internet2 map) shows errors as a black bar running alongside the link. It looked pretty ugly, and not too obvious though. You can do a variation of that with my weathermap by using two links between the same nodes, one with a smaller width than the other. That looks kind of OK, actually. Like a racing stripe. It also gets you a second TARGET, to use for the stripe.
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!)
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

I was just building a new latency map at work today, and had a quick experiment with error signalling. Here's what I came up with. This uses two overlaid links, of different WIDTH. The 'inside' one is latency in this case, but would normally be traffic. The 'outside' one has no outline, and a different SCALE that makes it white most of the time, but red of non-zero error counts. In the picture below, the 'errors' link exists on both sides of the arrow, but only one side has errors, so only that side is visible.

Code: Select all

# special scale for highlighting link errors
SCALE errors 0 0 255 255 255
SCALE errors 0 100 255 0 0

LINK link1_err
        NODES node1 node2
        BWLABEL none
        WIDTH 8
        OUTLINECOLOR none
        USESCALE errors
        TARGET rtr1_link1_errors:err_in:err_out
        ARROWSTYLE 3 2

LINK link1
        TARGET gauge:rtr1_voipmos_5807.rrd:-:rtt
        NODES node1 node2
        WIDTH 4
I would also deliberately NOT put an overlibgraph on the errors arrow, so that the user doesn't get a surprising popup graph as they go to hover over the normal traffic arrow, since the surrounding 'errors' arrow would be invisible most of the time.

0.96 has Z-ordering, so you can guarantee that the first link will be drawn under the second one, but in practice this works OK at the moment.
Attachments
link-highlighting.gif
link-highlighting.gif (7.46 KiB) Viewed 13298 times
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!)
runlikeanantelope
Cacti User
Posts: 63
Joined: Thu Feb 15, 2007 12:08 pm

Post by runlikeanantelope »

I like the idea here and want to test it out. I show InOctets/OutOctets on the inside arrow, and I would want the outside arrow to turn red if InErrors/Outerrors are not equal to zero.

Is there anyway to only show the outside arrow when the datasource is not equal to ZERO??

In my attached picture, only the link between routers HN and WB are using this code:


LINK HN_WB_err
NODES HN WB
BWLABEL none
WIDTH 6
OUTLINECOLOR none
USESCALE errors
TARGET /data/cricket-data/router-interfaces/hn.router.com/serial2_0_0.rrd:ds6:ds7
ARROWSTYLE 3 2


LINK HN-WB
WIDTH 2
ININFOURL https://server/statistics/cricket/graph ... w=HCOctets
OUTINFOURL https://server/statistics/cricket/graph ... w=HCOctets
INOVERLIBGRAPH https://server/statistics/cricket/mini- ... 00;rand=80
OUTOVERLIBGRAPH https://stats.tns.its.psu.edu/statistic ... 00;rand=80
TARGET /data/cricket-data/router-interfaces/hn.router.com/serial2_0_0.rrd:ds0:ds1
NODES HN WB
BANDWIDTH 45M[/img]
Attachments
error.jpg
error.jpg (10.57 KiB) Viewed 12375 times
runlikeanantelope
Cacti User
Posts: 63
Joined: Thu Feb 15, 2007 12:08 pm

Post by runlikeanantelope »

I caught an error so at least I know I'm pulling the correct data :D
Attachments
error2.jpg
error2.jpg (11.23 KiB) Viewed 12372 times
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

Hmm, well you say OUTLINECOLOR none to hide the outline of the outside link, so you shouldn't really see that outline... :-?

In 0.96 you can also use ZORDER to make sure the error arrow appears under the other one. Also in 0.96, there is a 'none' option for SCALEs so you can have a nice background - at the moment you would need to have a single-colour background, and use that colour for the '0 0' line in your errors SCALE.

I was going to try and make a script that did this automatically. For each link, see if it can figure out the cacti DS, then the snmp index, then look to see if there's an errors DS for the same index, and create an errors outline if there is. I think it could be fairly easy.

Edit: Not that you'd care, since you are a cricket user :-) Looks like the same thing is do-able there though, if it's just the DS names that change.
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!)
runlikeanantelope
Cacti User
Posts: 63
Joined: Thu Feb 15, 2007 12:08 pm

Post by runlikeanantelope »

Should have mentioned I'm running v0.95a
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

runlikeanantelope wrote:Should have mentioned I'm running v0.95a
Then I'd suggest upgrading to 95b, because there were a bunch of bugfixes, including: " FIXED - 'none' colours on LINKs were broken by typo."

0.96 is the next release, although there has been an early test version around for a while, and another test version soon.
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!)
runlikeanantelope
Cacti User
Posts: 63
Joined: Thu Feb 15, 2007 12:08 pm

Post by runlikeanantelope »

I upgraded to v0.95b and it works now.

Question: In the above example, I was hoping to show InErrors/OutErrors on both point-to-point interfaces. In the current example, my Target is the Router HN, so the InErrors are shown correctly in the direction towards HN. I don't have any OutErrors, so no arrows shows...which is correct.

However, if I look at the actual WB router interface, I also see InErrors, but no OutErrors.

My thought was: I would want to show this as a Red Arrow behind the arrow towards WB, but then if I had OutErrors on both interfaces, they would override each other. Do I create a second LINK with the Nodes reversed and the Target of the WB router, or just accept the warning on the one-side as enough of an alarm to start investigating?

LINK WB-HN-ERR
OUTLINECOLOR none
NODES WB HN
BWLABEL none
WIDTH 6
USESCALE errors
TARGET /data/cricket-data/router-interfaces/HN/serial2_0_0.rrd:ds6:ds7

LINK-HN-WB-ERR
OUTLINECOLOR none
NODES HN WB
BWLABEL none
WIDTH 6
USESCALE errors
TARGET /data/cricket-data/router-interfaces/WB/serial2_0_0.rrd:ds6:ds7
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

You can have more than one target...

Code: Select all

TARGET /data/cricket-data/router-interfaces/HN/serial2_0_0.rrd:ds6:ds7 /data/cricket-data/router-interfaces/WB/serial2_0_0.rrd:ds7:ds6
would do what you want - one link 'from' HN to WB, but with the total error rate from both the WB and HN interfaces. Note that the second target has the ds names flipped, because the in is really the out of the other (if you see what I mean).
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!)
runlikeanantelope
Cacti User
Posts: 63
Joined: Thu Feb 15, 2007 12:08 pm

Post by runlikeanantelope »

Howie wrote:

Code: Select all

TARGET /data/cricket-data/router-interfaces/HN/serial2_0_0.rrd:ds6:ds7 /data/cricket-data/router-interfaces/WB/serial2_0_0.rrd:ds7:ds6
would do what you want - one link 'from' HN to WB, but with the total error rate from both the WB and HN interfaces. Note that the second target has the ds names flipped, because the in is really the out of the other (if you see what I mean).
I might need clarification of what I'm seeing here:

The InErrors displays ds6 + ds6 and the OutErrors displays ds7+ds7?

Or the InErrors displays Source1:ds6 + Source2:ds7 and the OutErrors displays Source2:ds6 + Source1:ds7?

Does it add the matching Data Sources or the location of the values? (Because I have instances where some interfaces collect more DataSources than others)
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

runlikeanantelope wrote: The InErrors displays ds6 + ds6 and the OutErrors displays ds7+ds7?

Or the InErrors displays Source1:ds6 + Source2:ds7 and the OutErrors displays Source2:ds6 + Source1:ds7?
That second one. The link is from A to B, so "in" means "into A" and "out" means "out of A", so to get the correct total, you need to flip them over for the interface that isn't on A.
runlikeanantelope wrote: Does it add the matching Data Sources or the location of the values? (Because I have instances where some interfaces collect more DataSources than others)
It matches the DS names. I don't know how cricket picks the names, but as long as you can be sure that inErrors is always ds6, then you're set.
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!)
munichrich
Posts: 5
Joined: Wed May 06, 2009 3:16 am
Location: Munich

Can you help out a newbie on this one..

Post by munichrich »

Hi Guys,

Ive made a number of weathermaps with traffic data in them and they work fine but Id really like to add an "alert mode" as well... To show a line down etc...

So I read through the previous posts here but to be honest I still dont understand how you´d poll the data so as to show up as an error here...

Any chance someone could talk this newbie through it??

Cheers... :)

( Oh and if this is a case of RTFM .. please feel free to tell me.. I´ve read it but maybe Im just too thick to get it...) :oops:

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

Post by Howie »

First step is to get error data - Cacti will do that part for you:

Go to the router in Cacti's devices, then Create Graphs, then pick the Interface - Errors/Discards template, and select the right interfaces.

Now you have some rrd files with error counts in them. :-)

If you want e-mail alerts, then use those new DS with the Thold plugin to get that. In Weathermap, you can make the 'second link' like those above. I'll make a fully working example and post it, now that 0.96 is available. Especially since a lot of that discussion above is actually specific to Cricket, not Cacti :oops:
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!)
munichrich
Posts: 5
Joined: Wed May 06, 2009 3:16 am
Location: Munich

Thanks Howie..

Post by munichrich »

Cheers Howie,

As ever your on the ball!! :)

I think I get the errors issue now, will start graphing those straight away... An example (when you get a chance) would be brilliant though..

I´ve also been following some of your other threads and now have the Host up /Down etc working well...

This Is a Brilliant Plugin and my Bosses are really pleased with the results .. So Cheers guy and please keep up the great work!!

Rich
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests