0.4.0 • Published 5 months ago

pinguem v0.4.0

Weekly downloads
-
License
-
Repository
-
Last release
5 months ago

Web interface based on Vue and the Prometheus exporter for async checking of the availability of the selected hosts or subnet using the node-ping library.

All fields for entering addresses are dynamic, and are stored on the side of the client (in the browser) after rebooting the server and the user system. For a survey of the entire subnet, use 0 in the 4 octet (example, 192.168.3.0), it is possible to simultaneously indicate a few subnet. It is recommended to launch in the Docker container, you can check 254, 508 and more hosts every second without delay. The ping stops at the time of closing the browser tab, while the results is stored on the server in memory until they are discharged through the interface or API.

Install

Docker

Download the image from Docker Hub and run the container:

docker run -d --name pinguem -p 8085:8085 -p 3005:3005 --restart=unless-stopped lifailon/pinguem:latest

Build

Clone the repository and install the dependencies:

git clone https://github.com/Lifailon/pinguem
cd pinguem
npm install

Start backend (port 3005) and frontend (port 8085):

npm start

Go to: http://localhost:8085

example

Dark mode:

example

You can get checking results at the current time using GET request via API:

curl -sS http://localhost:3005/result | jq .

{
  "192.168.3.101": {
    "host": "192.168.3.101",
    "time": 1,
    "status": "Available",
    "lastAvailable": "2025-02-10T21:33:35.530Z",
    "lastUnavailable": null,
    "successful": 100,
    "failed": 0
  },
  "google.com": {
    "host": "google.com",
    "time": 22,
    "status": "Available",
    "lastAvailable": "2025-02-10T21:33:35.524Z",
    "lastUnavailable": "2025-02-10T21:32:19.236Z",
    "successful": 90,
    "failed": 10
  },
  "8.8.8.8": {
    "host": "8.8.8.8",
    "time": 21,
    "status": "Available",
    "lastAvailable": "2025-02-10T21:33:35.527Z",
    "lastUnavailable": null,
    "successful": 100,
    "failed": 0
  },
  "github.com": {
    "host": "github.com",
    "time": 47,
    "status": "Available",
    "lastAvailable": "2025-02-10T21:33:35.521Z",
    "lastUnavailable": "2025-02-10T21:33:32.535Z",
    "successful": 97,
    "failed": 3
  },
  "192.168.3.102": {
    "host": "192.168.3.102",
    "time": "unknown",
    "status": "Unavailable",
    "lastAvailable": null,
    "lastUnavailable": "2025-02-10T21:33:35.534Z",
    "successful": 0,
    "failed": 100
  }
}

Ping Exporter

  • Metrics for prometheus:
curl -sS http://localhost:3005/metrics/<subnet>
  • Specify the target subnet to monitor in the prometheus.yml configuration:
scrape_configs:
  - job_name: ping-exporter
    scrape_interval: 10s
    scrape_timeout: 5s
    metrics_path: /metrics/192.168.3.0
    static_configs:
      - targets:
        - '192.168.3.100:3005'

grafana

Displays the number of active and inactive hosts in the subnet, all host addresses that change their status over the selected period of time, and graphs of the stability of active hosts.

0.4.0

5 months ago

0.3.0

5 months ago

0.2.0

5 months ago