xpinger is an isolated network monitoring stack utilizing Python, InfluxDB, and Grafana to track device ping metrics (availability, latency, and packet loss) in parallel batches.
- Parallel Batch Pinging: Pings multiple devices concurrently (configured via
PING_PARALLEL) to quickly harvest metrics without creating a network bottleneck. - InfluxDB Integration: Metrics like latency, jitter, and packet loss are continuously pushed to InfluxDB.
- Grafana Monitoring: Ready-to-go Grafana setup. Add your dashboard templates in the
xpingerTemplates/directory to have them mounted automatically. - Automated Bootstrap: Secure startup handles InfluxDB tokens and credentials securely via
deploy.sh.
- Docker
- Docker Compose
The entire stack is fully pre-configured! To start monitoring your devices, simply follow these two steps:
-
Prepare
devices.csv: Copy the provided sample file to create your local copy:cp devices_sample.csv devices.csv
Open
devices.csvand define the targets you want to ping. Ensure you keep the CSV header completely intact (Group,Location,Hostname,IP). -
Run Deploy: From your terminal, run the deployment script:
bash deploy.sh
That's it! The script handles everything automatically:
- Configures your
.envfile with secure, auto-generated tokens. - Sets InfluxDB as the default data source for Grafana targeting the
xpingerorganization and bucket. - Automatically mounts and displays your UI dashboards from
xpingerTemplates. - Builds and starts all the containers.
- Immediately tails the live logs (
docker-compose logs -f) so you can watch your pings succeeding contextually. PressCtrl+Cto exit the logs (the containers will keep working in the background).
- Configures your
-
Customize your Environment / Change Ports: Open the newly generated
.envfile at the root of the project to change the defaults:GRAFANA_PORT— If you don't enter this during deploy, you can change it manually here. The deployment script prevents collisions by ensuring the port is actually free. Be sure to havess,netstat,nc, orlsofinstalled on your system!INFLUXDB_USERNAME/INFLUXDB_PASSWORD(Default:admin/admin12345)GRAFANA_USER/GRAFANA_PASSWORD(Default:admin/admin12345)
-
Updating or Deleting the Deployment: If you ever modify
devices.csv, customize your.envfile, or want to tear down the stack, simply re-run the script:bash deploy.sh
The script will detect your existing configuration and prompt you with:
- [u] Update deployment: Applies your changes and restarts the containers without wiping your data.
- [d] Delete deployment: Safely stops all containers, permanently deletes all InfluxDB/Grafana database volumes, and removes the
.envfile. (WARNING: This destroys all historical data).
-
Access the Web Interfaces:
- Grafana: Available at
http://localhost:3000(or the custom port you defined).
- Grafana: Available at
deploy.sh: Bootstrap script to prepare local environments and launch the stack.docker-compose.yml: Definesxpinger,influxdb, andgrafana.devices.csv: Your target list.xpinger.py: Core logic loop managing the continuous, parallel pings.xpingerTemplates/: Drop any preconfigured JSON Grafana dashboards here for mapping.