?
Solved

Configure MRTG to get IPv4 usage statistics

Posted on 2011-02-19
3
Medium Priority
?
1,416 Views
Last Modified: 2012-05-11
Hello Experts.

I installed MTRG, but I need to configure it to collect statistics to be sent to RIPE, as shown in this example:

http://www.ripe.net/lir-services/resource-management/ipv4/ipv4-verification-sample-mrtg-graphs 

The statistics should show the following:

•the IP capacity for each area/pool of IPs
•the IP usage for each area/pool of IPs (min/avg/max on a daily/weekly/monthly basis)

I have some subnet of IP addresses and to build the statistics, it is assumed that an IP address is used when responding to ping (echo-replay).

I think we can use nmap, changing the script in this example:
http://crazyvlan.blogspot.com/2008/02/monitoring-ip-segment-usage-with-mrtg_29.html

you can help me to edit the script?

Thanks
0
Comment
Question by:usbano
  • 2
3 Comments
 
LVL 27

Accepted Solution

by:
Nopius earned 2000 total points
ID: 34942740
Hi.

> I have some subnet of IP addresses and to build the statistics, it is assumed that an IP address is used when responding to ping (echo-replay).

Is it assumed by you or by RIPE?
I would suggest another definition is "IP if it reponds to TCP/UDP requests on any port, or it responds to ping or it initiates connections on any TCP/UDP port".

Most firewalled Windows just never respond to ping.

Modified script, that shows exact IP count (not %) is below. It is also faster.

Regards,
Arty

nets="1.1.1.1-254 2.2.2.2/24"

nrup=`nmap -n --min-parallelism 150 --max-retries 1 --host-timeout 1501 -sP $nets 2>&- | grep "hosts up" | cut -d\( -f2 | cut -d" " -f1`

echo $nrup
echo 0

Open in new window

0
 

Author Comment

by:usbano
ID: 34972211
Hi,

the script works!! I' put the script in ping_scan.sh, ad get this with mrtg.cfg

Target[xyz]:  `/opt/mrtg/ping_scan.sh`
MaxBytes[xyz]: 2000
Unscaled[xyz]: dwmy
Options[xyz]: growright,gauge,noinfo,nopercent
ShortLegend[xyz]: IP USAGE
Title[xyz]: % IP usage
PageTop[xyz]: <h1>RIPE PUBLIC IP USAGE STATISTICS</h1>

In attachment a screenshoot of the statistics (daily).
Is possible to change "byte per seconds"  with "IP address" link this like:
http://www.ripe.net/lir-services/resource-management/ipv4/ipv4-verification-sample-mrtg-graphs 

Thanks

xyz-day.png
0
 

Author Comment

by:usbano
ID: 34974541
I'm resolved. The command is YLegend[xyz]: IP Address

Thanks
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to set-up an On Demand, IPSec, Site to SIte, VPN from a Draytek Vigor Router to a Cyberoam UTM Appliance. A concise guide to the settings required on both devices
This article will show you step-by-step instructions to build your own NTP CentOS server.  The network diagram shows the best practice to setup the NTP server farm for redundancy.  This article also serves as your NTP server documentation.
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Suggested Courses

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question