Availability of the interface - displayed in a NODE ?

Support questions about the Network Weather Map plugin

Moderators: Moderators, Developers

Post Reply
Author
Message
White Horse
Cacti User
Posts: 54
Joined: Tue Dec 22, 2009 1:54 am

Availability of the interface - displayed in a NODE ?

#1 Post by White Horse » Sat Feb 20, 2010 11:38 am

I was google-ing and searched forum but with no luck .

Is there a way to calculate interface availability and display that in on node in weathermap based on week or month.

The reason I need it is because my connection towards router never goes down because of redundancy, but I need some way to detect outages on link.

Did anyone had experience with this and is it possible in this version of weathermap?


Thank you for you inputs :)

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

#2 Post by Howie » Sat Feb 20, 2010 12:01 pm

When you say 'calculate availability' do you mean as a percentage, or just the current state. The current state can be done using the SNMP DS plugin. You could use Cacti rrd files too, if you already graph ifOperStatus.

Here's part of my config for doing this...

Code: Select all


SET community public

SCALE updown 0 0 255 255 0
SCALE updown 2 2 255 0 0
SCALE updown 1 1 0 255 0
SCALE updown 3 3 192 192 192
SCALE updown 4 4 0 0 192
SCALE updown 6 6 0 0 192

NODE DEFAULT
        LABELOFFSET E
        LABELOUTLINECOLOR none
        LABELBGCOLOR none
        LABELFONTCOLOR 255 255 255
        LABELFONT 80

NODE port
        USESCALE updown in
        ZORDER 300
        LABELFONT 24
        LABELFONTCOLOR contrast
        OVERLIBWIDTH 403
        OVERLIBHEIGHT 165
        TARGET snmp:{map:community}:{node:this:ip}:.1.3.6.1.2.1.2.2.1.8.{node:this:interface}:-
        INFOURL /cacti/graph.php?action=view&rra_id=all&local_graph_id={node:this:graph_id}
        OVERLIBGRAPH /cacti/graph_image.php?rra_id=0&graph_height=100&graph_widt
h=300&graph_nolegend=true&local_graph_id={node:this:graph_id}

NODE switch1a
        LABEL 1A
        LABELOFFSET E
        POSITION 320 120
        ICON 600 400 images/C3560.png
        ZORDER 200

NODE switch1a_p01
        TEMPLATE port
        SET interface 10101
        SET ip 10.225.6.10
        SET ifname GigabitEthernet0/1
        SET host_id 154
        SET graph_id 2165
        SET data_id 2465
        POSITION switch1a -94 -5
        LABEL 01

NODE switch1a_p02
        TEMPLATE port
        SET interface 10102
        SET ip 10.225.6.10
        SET ifname GigabitEthernet0/2
        SET host_id 154
        SET graph_id 2166
        SET data_id 2466
        POSITION switch1a -94 12
        LABEL 02

Cisco 3750s use strange interface indexes (starting at 10100 for the first port), but the basic idea is the same for anything. This will poll the SNMP status directly from the switch.

You could do the same with rrd files though - it's just taking a value and colouring a node.

I actually use a perl script to generate all the ports - it's pretty boring to do this for a lot of switches :-)
Attachments
port-status.png
port-status.png (11.92 KiB) Viewed 4980 times
Weathermap 0.98 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: 5330
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

#3 Post by Howie » Sat Feb 20, 2010 12:04 pm

Just saw the 'week or month' part - so the answer becomes: If you can get a graph that gives you that number, weathermap can display it too. If you don't have that information, then Weathermap will not give you psychic powers.
Weathermap 0.98 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!)

White Horse
Cacti User
Posts: 54
Joined: Tue Dec 22, 2009 1:54 am

#4 Post by White Horse » Sat Feb 20, 2010 6:11 pm

Tx Howie for quick answer.

Yea I know that weathermap just displays gathered data. I think that my question is more for cacti main forum, but if dsstat can drag info about link average on some period of time from rrd file than some script can pull info from the same file about when bandwidth was 0 (= down) and calculate that by defined pool time for a wanted period of time - and you get a link availability?

I dont know how cacti works in detail and I m not familiar with PHP so maybe my question is ridiculous but I m just wandering if it can be done, and where to look; script, plugin etc.

White Horse
Cacti User
Posts: 54
Joined: Tue Dec 22, 2009 1:54 am

#5 Post by White Horse » Wed Feb 24, 2010 12:38 pm

Didn't wanna make a new topic so I asking here because its involves nodes.

How to have fixed/same size of label no matter how number is long, for example;

| 285.25M |
| 512M|
| 285.25M |

but I need them to be lined up like this:

| 285.25M |
| 512M___ |
| 285.25M |

Search the manual but didn't find anything? Is it possible in this version of WM?

Tx in advace and best regards!

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

#6 Post by Howie » Wed Feb 24, 2010 2:10 pm

White Horse wrote:Didn't wanna make a new topic so I asking here because its involves nodes.

How to have fixed/same size of label no matter how number is long, for example;

| 285.25M |
| 512M|
| 285.25M |

but I need them to be lined up like this:

| 285.25M |
| 512M___ |
| 285.25M |

Search the manual but didn't find anything? Is it possible in this version of WM?

Tx in advace and best regards!
Actually, it isn't possible. You can make all the boxes the same size, using a bodge, but the text is always centred in the box.
Weathermap 0.98 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!)

White Horse
Cacti User
Posts: 54
Joined: Tue Dec 22, 2009 1:54 am

#7 Post by White Horse » Wed Feb 24, 2010 5:42 pm

Sure, same size boxes with centerd text would be fine too, what is command for same size label sizes, did you documented that because I have trouble finding it? bodge?

Regards!

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

#8 Post by Howie » Wed Feb 24, 2010 6:25 pm

The size of the node box is fitted to the text inside it, so the node normally would change size. However, you can get weathermap to produce an icon for the node that looks just like the box.

NODE blah
POSITION 30 40
LABELOFFSET C
LABELOUTLINECOLOR none
ICON 40 20 box
AICONOUTLINECOLOR 0 0 0
AICONFILLCOLOR copy
LABEL My text

So that hides the normal outline of the label, then centres the label over the icon. The icon is a box-shaped 'artificial icon' (there's no image file) which is 40 by 20 pixels. The icon has a black outline, and it's fill colour is the same the the fill on the label, so you can use it with scales and targets if you like.

Make sense?

(still trying to think of another way to describe 'bodge'... a non-standard way to do it, I guess)
Weathermap 0.98 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!)

White Horse
Cacti User
Posts: 54
Joined: Tue Dec 22, 2009 1:54 am

#9 Post by White Horse » Thu Feb 25, 2010 2:59 am

Ty Howi, that will be fine, that will solve my problem of label shrinking when text say's 1G from 955.00M.

Regards

GermanSniper
Posts: 42
Joined: Fri Aug 28, 2009 1:43 am
Location: Germany

#10 Post by GermanSniper » Fri Feb 26, 2010 6:10 am

What is the purpose of this variables?

host_id
data_id

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

#11 Post by Howie » Fri Feb 26, 2010 6:50 am

GermanSniper wrote:What is the purpose of this variables?

host_id
data_id
They are put in by the script that generates the map layout. They are not used currently.
Weathermap 0.98 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!)

stvlange
Posts: 7
Joined: Tue Sep 20, 2011 11:58 am

Re: Availability of the interface - displayed in a NODE ?

#12 Post by stvlange » Wed Sep 21, 2011 8:45 am

Does CISCO give a reply to:
TARGET snmp:{map:community}:{node:this:ip}:.1.3.6.1.2.1.2.2.1.8.{node:this:interface}:-

To indicate disabled? I got your example to work with our 6509 great, was just curious if there was a way to display:
active = green
inactive = black
disabled = red

Thanks for the feedback!

Post Reply