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?
Port Monitor
Moderators: Developers, Moderators
Re: Port Monitor
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).
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 (158.51 KiB) Viewed 6430 times
Re: Port Monitor
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.
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 (68.47 KiB) Viewed 5210 times
Who is online
Users browsing this forum: No registered users and 0 guests