Link Status Information

Support questions about the Network Weather Map plugin

Moderators: Developers, Moderators

eshmam
Posts: 10
Joined: Sun Feb 15, 2015 1:32 pm

Link Status Information

Post by eshmam »

I able to generate host status (red, yellow, green) & link utilization status in bits through below configuration.

Code: Select all

# Automatically generated by php-weathermap v0.97c
WIDTH 1024
HTMLSTYLE overlib
TITLE Test Network
HTMLOUTPUTFILE output/Test.html
IMAGEOUTPUTFILE output/Test.png

KEYPOS DEFAULT 880 91 Traffic Load
KEYTEXTCOLOR 0 0 0
KEYOUTLINECOLOR 0 0 0
KEYBGCOLOR 255 255 255
BGCOLOR 255 255 255
TITLECOLOR 0 0 0
TIMECOLOR 0 0 0
SCALE DEFAULT 0    0    192 192 192  
SCALE DEFAULT 0    1    255 255 255  
SCALE DEFAULT 1    10   140   0 255  
SCALE DEFAULT 10   25    32  32 255  
SCALE DEFAULT 25   40     0 192 255  
SCALE DEFAULT 40   55     0 240   0  
SCALE DEFAULT 55   70   240 240   0  
SCALE DEFAULT 70   85   255 192   0  
SCALE DEFAULT 85   100  255   0   0  

SCALE updown 0    0      0 255   0  
SCALE updown 0    30   255 255   0  
SCALE updown 30   100  255   0   0  

SET key_hidezero_DEFAULT 1

# End of global section


# TEMPLATE-only NODEs:
NODE DEFAULT
	LABELFONT 4
	MAXVALUE 100


# TEMPLATE-only LINKs:
LINK DEFAULT
	WIDTH 3
	BWLABEL bits
	BANDWIDTH 1000M


# regular NODEs:

NODE 148
	LABEL SW-1
	LABELOFFSET S
	INFOURL http://Server-IP/device/device=148/
	OVERLIBGRAPH http://Server-IP/graph.php?height=100&width=512&device=148&type=device_bits&legend=no
	ICON images/modem.jpg
 	TARGET fping:NODE-IP
	USESCALE updown out percent
	POSITION 514 531

NODE 154
	LABEL SW-2
	LABELOFFSET E
	INFOURL http://Server-IP/device/device=154/
	OVERLIBGRAPH http://Server-IP/graph.php?height=100&width=512&device=154&type=device_bits&legend=no
	ICON images/workgroupswitch.jpg
 	TARGET fping:NODE-IP
	USESCALE updown out percent
	POSITION 522 310


# regular LINKs:

LINK 154-148
	INFOURL http://Server-IP/graphs/type=port_bits/id=8081/
	OVERLIBGRAPH http://Server-IP/graph.php?height=100&width=512&id=8081&type=port_bits&legend=no
	TARGET ./TARGET-IP/port-id8081.rrd:INOCTETS:OUTOCTETS
	NODES 154 148

# That's All Folks!
Can anybody guide me how to get link status information (up/down) either through link color (red/green) or through link label color.

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

Re: Link Status Information

Post by Howie »

Instead of traffic? You are already colouring the links for traffic.

The basic idea though is that you need a data source that tells weathermap the link state. All it ever does is turn numbers into colours.

So the two main options are:

1) Have cacti graph ifOperStatus for your interfaces - you'd need to get additional Cacti templates for this, and it would be averaged, the same as other rrd graphs. Then just use those new rrd files as TARGETs for your links.

2) Use SNMP in Weathermap directly to check the current state. This means that the weathermap config needs to have all your snmp credentials in it, and the IP for every host. TARGET would be snmp:........

Neither one is really great.
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!)
eshmam
Posts: 10
Joined: Sun Feb 15, 2015 1:32 pm

Re: Link Status Information

Post by eshmam »

Can you please elaborate the option 2 with an example. I am fairly new in weathermap.

Traffic based color coding is very useful. But for me more important is to get link status (up/down) from weathermap. If that could be achieved with traffic color coding that would be great. Can it be done through link label by keeping link traffic colors as it is ?

Another, not related question, but hopefully I can get answer on this thread. Currently I'm placing nodes through web editor. Can it be calculated the position values for numbers of devices so I can place the devices without help of web editor. Would appreciate any reference/example.
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Link Status Information

Post by Howie »

Part 2 first:

You don't need the editor for anything. An easy way to stack up nodes in a row is to position them relative to each other:

Code: Select all

NODE a1
  POSITION 100 100

# this node is 100 pixels to the right of a2
NODE a2
  POSITION a1 100 0
Now if you change the position of a1, the others (there can be many, each relative the the previous, or the first one) will follow it.


Part 1:

You can't change the colour of the bandwidth label according to value, only node background colour or link fill colour.

SNMP would look something like:

Code: Select all


SCALE ifstatus 0 1.5 255 0 0
SCALE ifstatus 1.5 2.5 0 255 0

LINK a-b
  NODES a b
  BANDWIDTH 100
  USESCALE ifstatus
  TARGET snmp:public:192.168.0.1:.1.3.6.1.2.1.2.2.1.8.88:- snmp:public:192.168.0.22:-:.1.3.6.1.2.1.2.2.1.8.44

So that is two separate targets on one line, with a space between. One is to get the interface status on one switch, and the other for the other end. So they have different IPs and can have different communities (instead of public). the OID ends in the interface number (44 or 88 here) which you should be able to see in Cacti in the data sources list. Also note that in the first one, it ends :- and in the second one, there's a :- in the middle, this is what makes the first value go to the 'in' side of the link, and the second value go to the 'out' side of the link.

The BANDWIDTH 100 makes it so that when weathermap calculates the percentage bandwidth, it'll be the same as the actual value (0,1,2,3,4,5) for numbers below 100. The ifstatus scale has entries for up and down, but there are often other states of ifOperStatus depending on your vendor. See SNMP docs for that - e.g. https://cric.grenoble.cnrs.fr/Administr ... .1.2.2.1.8
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!)
eshmam
Posts: 10
Joined: Sun Feb 15, 2015 1:32 pm

Re: Link Status Information

Post by eshmam »

I able to create accordingly but need some help probably on scale configuration.

My devices are cisco (2=down, 1=up)

following snmpwalk result

Code: Select all

# snmpwalk -v 2c -c public  172.21.160.206  1.3.6.1.2.1.2.2.1.8.108
IF-MIB::ifOperStatus.108 = INTEGER: up(1)
# snmpwalk -v 2c -c public  172.21.188.41 .1.3.6.1.2.1.2.2.1.8.88
IF-MIB::ifOperStatus.88 = INTEGER: up(1)
and below is the configuration

Code: Select all

SCALE ifstatus 0    1.5  255   0   0
SCALE ifstatus 1.5  2.5    0 255   0

LINK 152-141_copy
        WIDTH 4
        NODES 152 141_copy
        BANDWIDTH 100
        USESCALE ifstatus
        TARGET snmp:public:172.21.188.41:.1.3.6.1.2.1.2.2.1.8.88:- snmp:public:172.21.160.206:-:.1.3.6.1.2.1.2.2.1.8.108
But the link always show red. My goal is up=green, down=red. how to achieve this ?
Attachments
weathermap-link.png
weathermap-link.png (13.64 KiB) Viewed 7158 times
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Link Status Information

Post by Howie »

SCALE ifstatus 1.5 2.5 255 0 0
SCALE ifstatus 0.5 1.5 0 255 0

The scale was backwards, now 2 is red and 1 is green.
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!)
eshmam
Posts: 10
Joined: Sun Feb 15, 2015 1:32 pm

Re: Link Status Information

Post by eshmam »

Thanks a lot Howie. You are a lifesaver !
Mednes
Posts: 9
Joined: Thu Oct 01, 2020 3:32 am

Re: Link Status Information

Post by Mednes »

Hi ! I have a cacti version 0.8.8f.
weathermap 0.97c.

I would like to do in the same page 2 links, 1 link with BWLABEL Bits and 1 link BWLABEL Percentage.
is it possible ?
thnx
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Link Status Information

Post by Howie »

Yes it is. You can set BWLABEL for a single link, or for the DEFAULT link.
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!)
Mednes
Posts: 9
Joined: Thu Oct 01, 2020 3:32 am

Re: Link Status Information

Post by Mednes »

thank you. :D

and for inbound and outbound is what we can do just the max value ?. because by default it is the value current.
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Link Status Information

Post by Howie »

Look at INBWFORMAT and OUTBWFORMAT in the manual. You can also use this in either the DEFAULT or a specific link.
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!)
Mednes
Posts: 9
Joined: Thu Oct 01, 2020 3:32 am

Re: Link Status Information

Post by Mednes »

can you show me an example ? :roll:
Mednes
Posts: 9
Joined: Thu Oct 01, 2020 3:32 am

Re: Link Status Information

Post by Mednes »

I tried but it doesn't work . please give me an example


# regular LINKs:
LINK node09073-node05295
INFOURL /cacti/graph.php?rra_id=all&local_graph_id=58
OVERLIBGRAPH /cacti/graph_image.php?local_graph_id=58&rra_id=0&graph_nolegend=true&graph_height=100&graph_width=300
COMMENTPOS 60 30
TARGET /srv/eyesofnetwork/cacti-0.8.8f/rra/ca1-lgt_traffic_in_61.rrd
NODES node09073 node05295
VIA 715 367
VIA 715 260
VIA 715 154
BANDWIDTH 10G
BWLABEL pourcentage

LINK node00231-node03126
INFOURL /cacti/graph.php?rra_id=all&local_graph_id=58
OVERLIBGRAPH /cacti/graph_image.php?local_graph_id=58&rra_id=0&graph_nolegend=true&graph_height=100&graph_width=300
TARGET /srv/eyesofnetwork/cacti-0.8.8f/rra/ca1-lgt_traffic_in_61.rrd
NODES node00231 node03126
BANDWIDTH 10G
BWLABEL bits
INBWFORMAT max
OUTBWFORMAT max
Attachments
123.PNG
123.PNG (11.88 KiB) Viewed 6974 times
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Link Status Information

Post by Howie »

The example IN THE MANUAL is what you want...

https://network-weathermap.com/manual/0 ... INBWFORMAT
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!)
Mednes
Posts: 9
Joined: Thu Oct 01, 2020 3:32 am

Re: Link Status Information

Post by Mednes »

We need to change the current inbound and outbound value (default) to max
Attachments
1234.PNG
1234.PNG (88.37 KiB) Viewed 6973 times
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests