Monitoring Network Bandwidth

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
youssef chtourou
Posts: 2
Joined: Wed Mar 15, 2017 1:11 pm

Monitoring Network Bandwidth

Post by youssef chtourou »

Good Afternoon ladies and gentlemen :D :D

I'am a Beginner in Administration of Nagios XI :cry: :cry: :cry:

i'ask , it is possible to monitoring a network bandwith. In fact , View each user connected in The network , what is doing , what his pourcentage in network bandwidth , ... ;)

Thank YOU very munch :D
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Monitoring Network Bandwidth

Post by tmcdonald »

That's a bit granular for XI, but Nagios Network Analyzer might be more help. The problem is that at the network layer there is really no concept of a "user" so you need to do packet inspection. NNA is not currently able to do packet inspection, but you can look at traffic source and destination IP and port.
Former Nagios employee
youssef chtourou
Posts: 2
Joined: Wed Mar 15, 2017 1:11 pm

Re: Monitoring Network Bandwidth

Post by youssef chtourou »

Thank You very munch , Sir :D :D

Tell me , it is possible to look at traffic source and destination IP and port with Nagios ? If Yes , HOW ? :oops: :oops:

Thank you and Sorry for any disturbance :idea: :idea:
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Monitoring Network Bandwidth

Post by mcapra »

As tmcdonald pointed out, Nagios Network Analyzer was designed more for that purpose.

Take a look over this overview video and see if that's something that would work for you:
https://www.youtube.com/watch?v=uk7tbV5VQwc
Former Nagios employee
https://www.mcapra.com/
rhonorio
Posts: 56
Joined: Thu Feb 23, 2017 12:38 pm

Re: Monitoring Network Bandwidth

Post by rhonorio »

What if I just want to know the traffic through the interfaces of a Cisco Router (model WS-C3650-24TS) that I've already added as a host? It shows 0Mbps for all the interfaces.
Do I need to do anything else apart from adding the router as a host?

Thanks in advance!
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Monitoring Network Bandwidth

Post by rkennedy »

Did you run through a wizard to set it up?

The other option is using the snmpwalk wizard, and specifying the OID that maps to how much traffic has gone through x int.
Former Nagios Employee
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Monitoring Network Bandwidth

Post by dwhitfield »

If @rkennedy's suggestion doesn't prove fruitful for you, can you PM me your Profile? You can download it by going to Admin > System Config > System Profile and click the Download Profile button towards the top. If for whatever reason you *cannot* download the profile, please put the output of View System Info (5.3.4+, Show Profile if older) in the thread (that will at least get us some info).

After you PM the profile, please update this thread. Updating this thread is the only way for it to show back up on our dashboard.
rhonorio
Posts: 56
Joined: Thu Feb 23, 2017 12:38 pm

Re: Monitoring Network Bandwidth

Post by rhonorio »

Please find attached my profile.
I did use the Wizard to add the host but it didn't work. I tried the snmpwalk wizard, but I'm not sure what OID I should use. I'll research about that and let you know.
You do not have the required permissions to view the files attached to this post.
rhonorio
Posts: 56
Joined: Thu Feb 23, 2017 12:38 pm

Re: Monitoring Network Bandwidth

Post by rhonorio »

I used the OID 1.3.6.1.2.1.31.1.1.1.6 (which is ifHCInOctets) and it shows me a list of ALL the interfaces...kind of tedious to add them one by one, but it's ok anyways. That would work but only if I can add a multiplier for every interface (as this OID gives me octets, not the bytes). Can I do that?
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Monitoring Network Bandwidth

Post by dwhitfield »

You'll need to write your own plugin. I think the following will be helpful. It doesn't do what you want it to do, but it should give you clues.

Code: Select all

#!/bin/bash
inbound_temp="$(/usr/local/nagios/libexec/check_snmp $4 -C public -o 1.3.6.1.2.1.2.2.1.10.15)"
#inbound_temp="SNMP OK - 3788642629 | iso.3.6.1.2.1.2.2.1.10.15=3788642629c"
outbound_temp="$(/usr/local/nagios/libexec/check_snmp $4 -C public -o 1.3.6.1.2.1.2.2.1.16.15)"
#outbound_temp="SNMP OK - 4243923118 | iso.3.6.1.2.1.2.2.1.16.15=4243923118c"
inbound=`echo $inbound_temp|grep -oP '(?<=\-)(.*?)(?=\|)'`
outbound=`echo $outbound_temp |grep -oP '(?<=\-)(.*?)(?=\|)'`
### Perform Logic here
inbound_per=$(echo $inbound  $1|awk '{ print $1/$2*100 }')
inbound_per=`printf %.0f $inbound_per`
outbound_per=$(echo $outbound  $1|awk '{ print $1/$2*100 }')
outbound_per=`printf %.0f $outbound_per`
total=$(( $inbound_per + $outbound_per ))

#echo "Inbound Percent = $inbound_per"
#echo "Outbound Percent = $outbound_per"
#echo "Total Percent = $total"

perfdata="| 'total'=$total%;$2;$3;0;100 'inbound'=$inbound_per%;;;0;100 'outbound'=$outbound_per%;;;0;100"

if [ "$total" -ge "$3" ];then
        echo "CRITICAL - Total traffic above threshold - $total $perfdata"
        exit 2
elif [ "$total" -ge "$2" ];then
        echo "WARNING - Total traffic above threshold - $total $perfdata"
        exit 1
else
        echo "OK - Traffic at good percentage $perfdata"
        exit 0
fi
You can find the context for this script at https://support.nagios.com/forum/viewto ... 16&t=33722 (it is specifically about Cisco routers, so I hope it is *very* helpful, but I don't have anything to test against here)
Locked