Skip to main content

A tool to ping multiple hosts at once and export results as Prometheus metrics.

Project description

aping

A tool to ping multiple hosts at once and export results as Prometheus metrics.

Relies on https://github.com/romana/multi-ping/ (see https://stackoverflow.com/a/45746002).

Installation

pip install aping-cli

Usage

To run the tool, type:

aping "google-dns-1=8.8.8.8" "google-dns-2=8.8.4.4"

Sample output:

Prometheus metrics server available at http://127.0.0.1:8000
google-dns-1 (8.8.8.8): 100.78ms, google-dns-2 (8.8.4.4): 100.78ms
google-dns-1 (8.8.8.8): 123.73ms, google-dns-2 (8.8.4.4): 122.97ms
google-dns-1 (8.8.8.8): 111.99ms, google-dns-2 (8.8.4.4): 112.96ms
google-dns-1 (8.8.8.8): 112.76ms, google-dns-2 (8.8.4.4): 113.86ms

In Linux/MacOS environments, ICMP packets can only be sent by processes with root privileges (this is a requirement of the multi-ping package, which aping uses). In those cases, the recommended invocation command would be:

sudo -E "$(which aping)" "google-dns-1=8.8.8.8" "google-dns-2=8.8.4.4"

Contributing

Local development

How to set up a local environment:

python -m venv venv

source ./venv/bin/activate

python -m pip install -U pip
pip install -e . -r requirements-dev.txt

pre-commit install

Resources

Grafana:

Prometheus:

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

aping_cli-0.2.0-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

Details for the file aping_cli-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: aping_cli-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 6.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.16

File hashes

Hashes for aping_cli-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 52cac42d863e182b12ae62f373b6c328addf24773bed14afd329ccaac16731c4
MD5 6cc10f00f0bf6d17b208ec7d8d78cfb5
BLAKE2b-256 002afb8ef985dc3bbac572f3c31444c2925cb91ec97dfcd79e7ab408eb3cc4e1

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