GithubHelp home page GithubHelp logo

punkoivan / starlink-exporter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ewilken/starlink-exporter

0.0 0.0 0.0 231 KB

Prometheus exporter for the metrics exposed by the gRPC endpoint of the SpaceX Starlink user terminal

License: Apache License 2.0

Rust 98.78% Dockerfile 1.22%

starlink-exporter's Introduction

starlink-exporter

CI license: MIT/Apache-2.0

Prometheus exporter for the metrics exposed by the gRPC endpoint of the SpaceX Starlink user terminal.

Based on starlink-rs.

Labels

  • id: ID of the dish. Evaluated on program start and set to every metric.
  • hardware_version: Hardware version of the dish. Evaluated on program start and set to every metric.
  • software_version: Software version of the dish firmware. Subject to change at runtime. Re-evaluated on every scrape and set only to the starlink_dish_device_info metric.
  • country_code: Country code of the dish. Subject to change at runtime (sometimes nulled). Re-evaluated on every scrape and set only to the starlink_dish_device_info metric.

Metrics

Currently, the following metrics are exposed:

Name Type  Description
starlink_dish_device_info GaugeVec Device information. Exposing software_version and country_code as additional labels.
starlink_dish_uptime_s Counter Dish uptime in seconds.
starlink_dish_state Gauge Dish state. 0: Unknown, 1: Connected, 2: Searching, 3: Booting.
starlink_dish_alert_motors_stuck Gauge Alert: Motors stuck.
starlink_dish_alert_thermal_throttle Gauge Alert: Thermal throttle.
starlink_dish_alert_thermal_shutdown Gauge Alert: Thermal shutdown.
starlink_dish_alert_mast_not_near_vertical Gauge Alert: Mast not near vertical.
starlink_dish_alert_unexpected_location Gauge Alert: Unexpected location.
starlink_dish_alert_slow_ethernet_speeds Gauge Alert: Slow ethernet speeds.
starlink_dish_snr Gauge Signal-to-noise ratio.
starlink_dish_seconds_to_first_nonempty_slot Gauge Seconds to first non-empty slot.
starlink_dish_pop_ping_drop_rate Gauge Pop ping drop rate.
starlink_dish_downlink_throughput_bps Gauge Downlink throughput in Bps.
starlink_dish_uplink_throughput_bps Gauge Uplink throughput in Bps.
starlink_dish_pop_ping_latency_ms Gauge Pop ping latency in ms.
starlink_dish_obstruction_currently_obstructed Gauge Obstruction: Currently obstructed.
starlink_dish_obstruction_fraction_obstructed Gauge Obstruction: Obstructed fraction. Sum of obstructed fractions.
starlink_dish_obstruction_last_24h_obstructed_s Counter Obstruction: Obstructed seconds in the last 24 hours.
starlink_dish_obstruction_valid_s Counter Obstruction: Valid seconds.
starlink_dish_obstruction_wedge_fraction_obstructed GaugeVec Obstruction: Wedge fraction obstructed. Measure of obstruction in twelve 30 degree wedges around the dish.
starlink_dish_obstruction_wedge_abs_fraction_obstructed GaugeVec Obstruction: Wedge fraction obstruction average. Measure of average obstruction in twelve 30 degree wedges around the dish.

Usage

Configuration happens via the following env vars:

  • BIND_ADDRESS: Host and port to bind the HTTP server to. Defaults to 0.0.0.0:9184.
  • STARLINK_ADDRESS: Protocol, host and port of the Starlink dish. Defaults to http://192.168.100.1:9200.

Local

cargo run --release

Docker

docker build -t ghcr.io/ewilken/starlink-exporter .
docker run --net=host ghcr.io/ewilken/starlink-exporter

Kubernetes

apiVersion: apps/v1
kind: Deployment
metadata:
  name: starlink-exporter
  labels:
    k8s-app: starlink-exporter
spec:
  replicas: 1
  selector:
    matchLabels:
      k8s-app: starlink-exporter
  strategy:
    type: Recreate
  template:
    metadata:
      name: starlink-exporter
      labels:
        k8s-app: starlink-exporter
      annotations:
        prometheus.io/port: '9184'
        prometheus.io/scrape: 'true'
    spec:
      containers:
        - image: ghcr.io/ewilken/starlink-exporter:latest
          name: starlink-exporter
          ports:
            - containerPort: 9184
              protocol: TCP
          resources:
            requests:
              cpu: '0.001'
              memory: '10Mi'
            limits:
              cpu: '0.01'
              memory: '50Mi'
          env:
            - name: RUST_LOG
              value: starlink_exporter=info
            - name: BIND_ADDRESS
              value: '0.0.0.0:9184'
            - name: STARLINK_ADDRESS
              value: 'http://192.168.100.1:9200'
      hostNetwork: true
      dnsPolicy: ClusterFirstWithHostNet

Grafana

An example Grafana dashboard is included in the dashboard directory.

Example Dashboard

CI & Versioning

Images hosted on GHCR are built in CI from main tagged latest and with the short commit hash returned by $(git log -1 --format=%h), e.g. 1354d30.

License

starlink-exporter is licensed under either of

at your option.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.