Skip to main content

A NetBox plugin for pinging and discovering IPs

Project description

NetBox Ping Plugin

Python NetBox License

A NetBox plugin for pinging and discovering IPs in your network.

Features

  • Ping IPs and subnets directly from NetBox
  • Auto-discover new IPs
  • Track IP status with custom fields and tags
  • Bulk scan operations
  • Dark mode compatible UI

Installation

pip install netbox-ping

Configuration

Add to your configuration.py:

PLUGINS = ['netbox_ping']

PLUGINS_CONFIG = {
    'netbox_ping': {
        'coming_soon': True
    }
}

Usage

  1. Install the plugin
  2. Navigate to Plugins > NetBox Ping
  3. Click "Create Required Fields & Tags"
  4. Start scanning your networks!

Requirements

  • NetBox 4.0 or later
  • Python 3.8 or later
  • ping command available on the system

Installation

Package Installation

  1. Install the package from your NetBox installation path:
    source /opt/netbox/venv/bin/activate
    cd /opt/netbox
    pip install git+https://github.com/DenDanskeMine/netbox-prefix-pinger.git
    

Enable the Plugin

  1. Add the plugin to PLUGINS in /opt/netbox/netbox/netbox/configuration.py:
    PLUGINS = [
        'netbox_ping',
    ]
    

Run Migrations

  1. Apply database migrations:
    cd /opt/netbox
    python3 manage.py migrate
    

Collect Static Files

  1. Collect static files:
    python3 manage.py collectstatic
    

Restart NetBox

  1. Restart the NetBox service:
    sudo systemctl restart netbox
    

Usage

  1. Navigate to the "Plugins" menu in NetBox
  2. Select "Network Tools" from the dropdown
  3. You'll see a list of all prefixes in your NetBox instance
  4. Two actions are available for each prefix:
    • Check Status: Checks all existing IPs in the prefix
    • Scan Subnet: Discovers and adds new active IPs

Status Indicators

  • 🟢 Online Tag: IP is responding to ping
  • 🔴 Offline Tag: IP is not responding
  • Custom Field "Up_Down": Boolean indicator of IP status

Configuration

No additional configuration is required. The plugin will automatically:

  • Create required custom fields
  • Create online/offline tags
  • Set up necessary permissions

Permissions

Users need the following permissions to use the plugin:

  • ipam.view_prefix
  • ipam.view_ipaddress

Development

To set up a development environment:

  1. Clone the repository:

    git clone https://github.com/yourusername/netbox-ping.git
    cd netbox-ping
    
  2. Create a virtual environment:

    python3 -m venv venv
    source venv/bin/activate
    
  3. Install development dependencies:

    pip install -e .
    

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support

If you have any questions or need help, please:

  1. Open an issue on GitHub
  2. Check existing issues for answers
  3. Contact the maintainer

Acknowledgments

  • Built for NetBox (https://github.com/netbox-community/netbox)
  • Inspired by the need for simple IP status tracking, this is my first plugin for NetBox.
  • I'm not a good python developer, so this is probably not the best way to do this.
  • The plugin netbox-interface-synchronization gave me a lot of inspiration, code wise, as the offical NetBox development repo had some issues, i couldn't get around.
  • The plugin netbox-interface-synchronization is a great plugin, and i recommend using it if you need to synchronize interfaces.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

netbox_ping-0.27.tar.gz (18.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

netbox_ping-0.27-py3-none-any.whl (23.0 kB view details)

Uploaded Python 3

File details

Details for the file netbox_ping-0.27.tar.gz.

File metadata

  • Download URL: netbox_ping-0.27.tar.gz
  • Upload date:
  • Size: 18.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for netbox_ping-0.27.tar.gz
Algorithm Hash digest
SHA256 d6ed10959fe2f913de1ae884cc8470343cae04e73c69447093a329c234f30fe6
MD5 db01550178d7198727f1fc62d8afb7dd
BLAKE2b-256 72c60f3733a30182f5554976da7cf9033af147da9b3804c084f941d67f4c553b

See more details on using hashes here.

File details

Details for the file netbox_ping-0.27-py3-none-any.whl.

File metadata

  • Download URL: netbox_ping-0.27-py3-none-any.whl
  • Upload date:
  • Size: 23.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for netbox_ping-0.27-py3-none-any.whl
Algorithm Hash digest
SHA256 f44c2bec8dddd5405df9bdc37f5d2f2fd3a2eab559a4de21fd8d8a4d1daaed2a
MD5 5170ec5aa9f70dbffff10ba7ea22a680
BLAKE2b-256 4e19346e39d72aa352dc9be2bb274cea6e41fb83d2777f320791f12b67c9c2aa

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page