Coder Social home page Coder Social logo

check_nping's Introduction

#check_nping Nagios plugin Check with nping if HOST is alive routing through a router MAC.

Usage: -check_nping [-h] -H -M [-w ] [-c ] [-C ]

##Mandatory arguments

-M <mac>        the mac address of the gateway
-H <IP or URI>  the host to check

##Optional arguments

  -h, --help      show this help message and exit
  -w <msec>       the WARNING time (Default: 3000ms)
  -c <msec>       the CRITICAL time (Default: 5000ms)
  -C <times>      Ping count (Default: 5)

###Nagios plugin setup

  1. Place check_nping file in libexec folder (or other plugins folder)

  2. Create the command in Nagios:

    #$ARG1$ Host to ping #$ARG2$ MAC address of the gateway to check #$ARG3$ Ping count #$ARG4$ Warning value in ms #$ARG5$ Critical value in ms

    define command{ command_name check_nping command_line $USER1$/check_nping -H $ARG1$ -M $ARG2$ -C $ARG3$ -w $ARG4$ -c $ARG5$}

  3. Use the command:

    define service{ use generic-service host_name ROUTER-90-1 service_description Ping to Google check_command check_nping!www.foo.com!ff:ff:ff:ff:ff:ff!4!3000!5000}

##Take a look to this This script uses nping (from nmap package)

Install it with (in ubuntu)

# sudo apt-get install nmap

or install following the https://nmap.org/download.html instructions

Inportant: nping uses pcap libraries to capture packets. ICMP mode used in the script requires permisions that can be given using this:

# sudo setcap cap_net_admin,cap_net_raw+eip /usr/bin/nping

To check if nping have the permisions try:

# sudo getcap /usr/bin/nping

check_nping's People

Contributors

msuarezecca avatar

Watchers

 avatar

Forkers

ciaran-byrne

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.