Linux

check_network.py

Description:

This is my first script to check the network traffic for linux.

Minimum required python 2.4

Current Version

1

Last Release Date

2013-03-01

Compatible With

  • Nagios 3.x

License

GPL


Nagios CSP

Meet The New Nagios Core Services Platform

Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.

Monitoring Made Magically Better

  • Nagios Core on Overdrive
  • Powerful Monitoring Dashboards
  • Time-Saving Configuration Wizards
  • Open Source Powered Monitoring On Steroids
  • And So Much More!
Project Files
Project Photos
Project Notes
This plugin check the traffic in and out for linux. Minimum required python 2.4 example: ./check_network.py eth0 NETWORK USAGE Taffic_in:4.82Mbits/s traffic_out:734.62Kbits/s | traffic_in=5050011.2Bits/s traffic_out=752252.8Bits/s
Reviews (2) Add a Review
Working but giving separate bandwidth graphs
by nishith, September 30, 2017
This plugins worked well but generating separate bandwidth graphs of Linux "eth0" interface. Below is my configuration.

####Nagios Server####
define service{
use generic-service
host_name mail.example.local
service_description eth0 Network
check_command check_nrpe!eth0_network
check_interval 1
}

####NRPE Client####
vim /usr/local/nagios/etc/nrpe.cfg

command[eth0_network]=/usr/local/nagios/libexec/check_network.py eth0
#############################

-Nishith N.Vyas
Helpful? Yes  No 
using ifconfig - not such good idea
by Admin_UCOP, September 30, 2013
Most plugins are used in enterprise environments where nagios user does not have root or sudo privileges. ifconfig cannot be run in such environments which makes the plugin unusable.

You can do almost the same code, but get the byte and packet readings from /sys/class/net/eth0/statistics. Using this method you will not need the subprocess library. Make it more simple and usable.
Helpful? Yes  No 
Add a Review

You must be logged in to submit a review.

Thank you for your review!

Your review has been submitted and is pending approval.

Recommend

To:


From:


Thank you for your recommendation!

Your recommendation has been sent.

Project Stats
Rating
3 (3)
Favorites
0
Views
47,231