/propmon

A Prometheus exporter that monitors Mysterium Network node service proposals

Primary LanguageGoMIT LicenseMIT

propmon

Release Go Report Card MIT license


propmon is a Prometheus metrics exporter designed to monitor service proposals within the Mysterium Network. Each node in the Mysterium Network advertises its services by transmitting service proposals to a message broker through nats. The discovery service captures these service proposals and compiles them into a list, which is then made accessible to Mysterium Network clients through a REST API.

Similar to the discovery service, propmon listens for incoming service proposals. It stores these proposals and generates metrics related to them, which are exposed on port 9500.

A service proposal includes:

  • Provider ID of the node
  • Service type
  • Approximate GEO-location of the node
  • Access policies for the service
  • Compatibility information
  • ...

Installation

Docker

docker run -p 9500:9500 sch8ill/propmon:latest

Build

Requires:

go >= 1.21
make

Build command:

make build

Usage

Prometheus config

Example prometheus.yml scrape config:

scrape_configs:
  - job_name: propmon
    scrape_interval: 15s
    static_configs:
      - targets: [ "localhost:9500" ]

Metrics

name description labels type
propmon_proposal_ping Service Proposal ping counter
propmon_proposal_registered Service Proposal registered counter
propmon_proposal_unregistered Service Proposal unregistered counter
propmon_proposal_expired Service Proposal expired counter
propmon_proposal_invalid Service Proposal invalid counter
propmon_proposal_count Service Proposal count service_type gauge
propmon_provider_count Provider count country, node_type gauge
propmon_nats_bytes_rx Number of bytes received by NATS listener subject counter

CLI flags

   --broker-address value        broker address to listen for proposals (default: "nats://broker.mysterium.network:4222")
   --proposal-lifetime value     lifetime of a proposal until it expires if not renewed (default: 3m10s)
   --expiration-job-delay value  delay between expiration job runs (default: 20s)
   --metrics-address value       address the prometheus metrics exporter listens on (default: ":9500")
   --help, -h                    show help

License

This package is licensed under the MIT License.