Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Tue Apr 23, 2019 11:12 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Port Monitor
PostPosted: Fri Sep 09, 2016 1:43 am 
Offline

Joined: Mon Sep 30, 2013 12:24 am
Posts: 16
I wonder if there is a simple way to monitor port status (up/down)?
We are using Weathermap plugin, but it took a lot of time to add switches and ports on the map.

I just need some automatic tool, that would display status of selected equipment and status of its selected ports on one map or in one table.

For example:
Cisco 01 (green) - Port 01 (green) Port 02 (red)
Cisco 02 (green) - Port 07 (green)
Cisco 03 (red) - Port 10 (red)

Its really annoying to create weathermaps for 1000+ ports and manage changes cause everything in weathermap needs to be done by hands.


Maybe there is some other monitoring with such functionality besides Cacti?


Top
 Profile  
 
 Post subject: Re: Port Monitor
PostPosted: Thu Oct 20, 2016 2:22 pm 
Offline
Cacti User

Joined: Mon May 31, 2010 9:26 am
Posts: 139
There are ....TONS :) of guides regarding monitoring port status on this forums. I myself tried at least 4-5 ways, all worked in different ways and got the same result.
First : Graph your interface port/status (I think, last time I used this guide : https://kb.groundworkopensource.com/dis ... tus+checks)
In this first step I had to do a small change :

In : /var/www/html/cacti/lib/snmp.php

define("REGEXP_SNMP_TRIM", "/(hex|counter(32|64)|gauge|gauge(32|64)|float|ipaddress|string|integer):/i");

TO

define("REGEXP_SNMP_TRIM", "/(hex|counter(32|64)|gauge|gauge(32|64)|float|ipaddress|string|integer):|(up|down)\(|\)$/i");
Then add this graph interface status for every switch, every port.
Then in weathermap :
You need a scale

SCALE ifstatus 0 0.99 255 209 71 2
SCALE ifstatus 1 1 0 255 0 1
SCALE ifstatus 1.01 2 255 209 71 2

And this code for every port(you have to calculate position 'tho, few trials and errors here, but I think you can make some script, if you have thousands of switches and ports)

Here are 2 ports for one of my switch :

NODE P1
INFOURL /cacti/graph.php?rra_id=all&local_graph_id=3839
OVERLIBGRAPH /cacti/graph_image.php?local_graph_id=3839&rra_id=0&graph_nolegend=true&graph_height=100&graph_width=300
ICON images/fibre2_{node:this:inscaletag}.png
TARGET gauge:/var/www/html/cacti/rra/ra_int_status_3858.rrd:int_status:-
USESCALE ifstatus in
POSITION 290 503

NODE P2
INFOURL /cacti/graph.php?rra_id=all&local_graph_id=3840
OVERLIBGRAPH /cacti/graph_image.php?local_graph_id=3840rra_id=0&graph_nolegend=true&graph_height=100&graph_width=300
ICON images/fibre2_{node:this:inscaletag}.png
TARGET gauge:/var/www/html/cacti/rra/ra_int_status_3859.rrd:int_status:-
USESCALE ifstatus in
POSITION 290 533

You also need some png's and put them in images/, you'll have one png for every port status(up, down). When weathermap runs, it gets the value from cacti and will graph nicely a "fibre2_UP.png" with green color if the port is UP and "fibre2_DO.png" with red color if the port is down. Every change in port will be automatically modified in Weathermap also.

You should get something like this.

PS : Check the Weathermap thread, there's huge infos there and Howie always responds :). Izorka has some amazing maps(the best imo).


Attachments:
cisco weathermap ports.jpg
cisco weathermap ports.jpg [ 158.51 KiB | Viewed 2290 times ]
Top
 Profile  
 
 Post subject: Re: Port Monitor
PostPosted: Wed Dec 13, 2017 1:14 am 
Offline

Joined: Mon Sep 30, 2013 12:24 am
Posts: 16
Ok, I'll try this)

But I'm not really good at scripting, so it's a hand-made job anyway(
The problem is - we don't need all the ports from the switch. Usually it's 1-2 ports from 1 switch. So 1000 ports is about 1000 switches on the map.
It's a client service monitoring, but we don't need to monitor the client side (ping or something simple) - we need to monitor our side (port status and traffic on the map) - and it is frustrating.

I wonder if anyone ever encountered with something alike.
And the most needed feature - it should be automated - so I don't need to manage the map side - only cacti database (adding switches and ports and grouping them on tree).

I found a good picture example of what I intended to find - but it is some freelance program with no demo. Just a concept.


Attachments:
2167756.jpg
2167756.jpg [ 68.47 KiB | Viewed 1070 times ]
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 3 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