Giter VIP home page Giter VIP logo

starlink_exporter's Introduction

logo

Starlink Prometheus Exporter


A Starlink exporter for Prometheus. Not affiliated with or acting on behalf of Starlink(โ„ข)

goreleaser build License Release GitHub go.mod Go version os/arch os/arch os/arch Go Report Card

If you would like a pre-packaged system to monitor you Starlink system please check out https://github.com/danopstech/starlink. It includes this exporter, speedtest_exporter, blackbox_exporter, Grafana and Prometheus in one Docker Compose file.

Usage:

Flags

starlink_exporter is configured through the use of optional command line flags

$ ./starlink_exporter --help
Usage of starlink_exporter
  -address string
        IP address and port to reach dish (default "192.168.100.1:9200")
  -port string
        listening port to expose metrics on (default "9817")

Binaries

For pre-built binaries please take a look at the releases.

./starlink_exporter [flags]

Docker

Docker Images can be found at GitHub Container Registry & Dockerhub.

Example:

docker pull ghcr.io/danopstech/starlink_exporter:latest

docker run \
  -p 9817:9817 \
  ghcr.io/danopstech/starlink_exporter:latest [flags]

Setup Prometheus to scrape starlink_exporter

Configure Prometheus to scrape metrics from localhost:9817/metrics

...
scrape_configs
    - job_name: starlink
      scrape_interval: 3s
      scrape_timeout:  3s
      static_configs:
        - targets: ['localhost:9817']
...

Exported Metrics:

# HELP starlink_dish_alert_mast_not_near_vertical Status of mast position
# TYPE starlink_dish_alert_mast_not_near_vertical gauge
# HELP starlink_dish_alert_motors_stuck Status of motor stuck
# TYPE starlink_dish_alert_motors_stuck gauge
# HELP starlink_dish_alert_slow_eth_speeds Status of ethernet
# TYPE starlink_dish_alert_slow_eth_speeds gauge
# HELP starlink_dish_alert_thermal_shutdown Status of thermal shutdown
# TYPE starlink_dish_alert_thermal_shutdown gauge
# HELP starlink_dish_alert_thermal_throttle Status of thermal throttling
# TYPE starlink_dish_alert_thermal_throttle gauge
# HELP starlink_dish_alert_unexpected_location Status of location
# TYPE starlink_dish_alert_unexpected_location gauge
# HELP starlink_dish_backup_beam connected to backup beam
# TYPE starlink_dish_backup_beam gauge
# HELP starlink_dish_bore_sight_azimuth_deg azimuth in degrees
# TYPE starlink_dish_bore_sight_azimuth_deg gauge
# HELP starlink_dish_bore_sight_elevation_deg elevation in degrees
# TYPE starlink_dish_bore_sight_elevation_deg gauge
# HELP starlink_dish_cell_id Cell ID dish is located in
# TYPE starlink_dish_cell_id gauge
# HELP starlink_dish_currently_obstructed Status of view of the sky
# TYPE starlink_dish_currently_obstructed gauge
# HELP starlink_dish_downlink_throughput_bytes Amount of bandwidth in bytes per second download
# TYPE starlink_dish_downlink_throughput_bytes gauge
# HELP starlink_dish_first_nonempty_slot_seconds Seconds to next non empty slot
# TYPE starlink_dish_first_nonempty_slot_seconds gauge
# HELP starlink_dish_fraction_obstruction_ratio Percentage of obstruction
# TYPE starlink_dish_fraction_obstruction_ratio gauge
# HELP starlink_dish_info Running software versions and IDs of hardware
# TYPE starlink_dish_info gauge
# HELP starlink_dish_initial_gateway_id initial gateway id
# TYPE starlink_dish_initial_gateway_id gauge
# HELP starlink_dish_initial_satellite_id initial satellite id
# TYPE starlink_dish_initial_satellite_id gauge
# HELP starlink_dish_last_24h_obstructed_seconds Number of seconds view of sky has been obstructed in the last 24hours
# TYPE starlink_dish_last_24h_obstructed_seconds gauge
# HELP starlink_dish_pop_ping_drop_ratio Percent of pings dropped
# TYPE starlink_dish_pop_ping_drop_ratio gauge
# HELP starlink_dish_pop_ping_latency_seconds Latency of connection in seconds
# TYPE starlink_dish_pop_ping_latency_seconds gauge
# HELP starlink_dish_pop_rack_id pop rack id
# TYPE starlink_dish_pop_rack_id gauge
# HELP starlink_dish_prolonged_obstruction_duration_seconds Average in seconds of prolonged obstructions
# TYPE starlink_dish_prolonged_obstruction_duration_seconds gauge
# HELP starlink_dish_prolonged_obstruction_interval_seconds Average prolonged obstruction interval in seconds
# TYPE starlink_dish_prolonged_obstruction_interval_seconds gauge
# HELP starlink_dish_scrape_duration_seconds Time to scrape metrics from starlink dish
# TYPE starlink_dish_scrape_duration_seconds gauge
# HELP starlink_dish_snr Signal strength of the connection
# TYPE starlink_dish_snr gauge
# HELP starlink_dish_state The current dishState of the Dish (Unknown, Booting, Searching, Connected).
# TYPE starlink_dish_state gauge
# HELP starlink_dish_time_to_slot_end_seconds Seconds left on current slot
# TYPE starlink_dish_time_to_slot_end_seconds gauge
# HELP starlink_dish_up Was the last query of Starlink dish successful.
# TYPE starlink_dish_up gauge
# HELP starlink_dish_uplink_throughput_bytes Amount of bandwidth in bytes per second upload
# TYPE starlink_dish_uplink_throughput_bytes gauge
# HELP starlink_dish_uptime_seconds Dish running time
# TYPE starlink_dish_uptime_seconds gauge
# HELP starlink_dish_valid_seconds Unknown
# TYPE starlink_dish_valid_seconds gauge
# HELP starlink_dish_wedge_abs_fraction_obstruction_ratio Percentage of Absolute fraction per wedge section
# TYPE starlink_dish_wedge_abs_fraction_obstruction_ratio gauge
# HELP starlink_dish_wedge_fraction_obstruction_ratio Percentage of obstruction per wedge section
# TYPE starlink_dish_wedge_fraction_obstruction_ratio gauge

Example Grafana Dashboard:

https://grafana.com/grafana/dashboards/14337

starlink_exporter's People

Contributors

awlx avatar dependabot[bot] avatar dwillcocks avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

starlink_exporter's Issues

No port available to be assigned/configured when starlink_exporter is run:

When trying to run the starlink_exporter in Docker Desktop, it should allow me to supply the port 9817 (see screenshot)**

Goto Docker desktop select image to load/run, select run options (see screenshot)
Using version danopstech/starlink_exporter:v0.0.5

Screenshot 2024-04-03 at 3 33 34โ€ฏPM

Mac: Apple M3 Max
Sonoma 14.4.1
Docker Desktop 4.28.0 (139021)
The Prometheus image, Grafana image and the Blackbox image are all working correctly.
I have noticed that the Grafana app when accessed from localhost:3000 does not let me access the dashboards in the following location: /Users/**********/Documents/GitHub/starlink/config/grafana/provisioning/dashboards

Not sure if there is any activity on this app these days, but it looked like an interesting subject to persue.

Pre-built binary for Linux armv6

Hello, I'm running an ancient rasberry pi 2 which only supports the armv6 instruction set. I'm really excited about using your grafana dashboard and the exporter.

Could you do a build for Linux armv6, or else give me some pointers on setting up my go environment so I can build it myself?

Thanks!

May need update for fbed6cae

Describe the bug
Some field are reporting 0 or 1. They are uptime, cell ID, gateway ID, Satellite ID, The state is shown "Unknown" and the DishID variable doesn't populate. Some of the data is populating.

I just setup Prometheus and starlink_exporter today for the first time. Both docker containers.

image

Update metrics

How do you update which metrics are scraped? I'd like to track how often and how long the heater is running.

PermissionDenied since Dishy update to 9f4d05a4

Describe the bug
Since the latest Dishy update earlier this morning to 9f4d05a4-65b6-411b-ba6b-8dd91c64e02c.uterm.release the exporter is unable to collect data via gRPC.
Running in a standard Starlink setup without further parameters it successfully gets the dish ID

time="2021-06-24T22:15:59+02:00" level=info msg="dish id: ut01000000-00000000-00013135" source="main.go:28"

However, each time /metrics of the exporter is queried, it returns the following:

# HELP starlink_dish_up Was the last query of Starlink dish successful.
# TYPE starlink_dish_up gauge
starlink_dish_up 0

The console/log shows the following error:

time="2021-06-24T22:15:59+02:00" level=error msg="failed to collect context from dish: rpc error: code = PermissionDenied desc = " source="exporter.go:290"

It worked fine with the previous release a4908729-5051-4d3b-aacc-446ef9b26cdc.uterm.release.
Data is still available fine when accessing the web UI normally.
I didn't have time yet to look further into it, so sorry for the somewhat unqualified bug ticket.

To Reproduce
Steps to reproduce the behavior:

  1. Get a Dishy with the mentioned software version
  2. Run the exporter to collect data from given Dishy and fetch metrics
    If needed, I can provide a sample Wireshark pcapng dump of this.

Expected behavior
The extractor to collect/poll the required metrics.

Screenshots
Not applicable, see log excerpt above.

Additional context
Add any other context about the problem here.

  • OS: Windows Server 2019
  • Starlink Exporter Version v0.0.3

Regenerate protoc-gen-go pb.go files?

Is your feature request related to a problem? Please describe.
I'm looking to include Roaming as a statistic in the exporter. It is not presently being recorded in the .pb.go files and given those are generated files, I don't want to manually update them.

Describe the solution you'd like
Could you provide a quick set of instructions or a rough guide on how to source the proto files used to generate the spacex/api/device files?

gRPC error: context deadline exceeded?

Thanks for this project- looks great in the docs. But I'm having trouble getting the exporter to start.

FATA[0003] could not start exporter: error creating underlying gRPC connection to starlink dish: context deadline exceeded

The mobile app is working on the same network, and I've tried specifying the address manually. Any thoughts? Thx!

Raspberry Pi 4 Model B Rev 1.4
Raspbian GNU/Linux 11 (bullseye)
ARMv7 Processor rev 3 (v7l)

Binary: https://github.com/danopstech/starlink_exporter/releases/download/v0.0.5/starlink_exporter_v0.0.5_Linux_armv7.tar.gz

Throughput Unit

Describe the bug
starlink_dish_uplink_throughput_bytes and starlink_dish_downlink_throughput_bytes are calling API that returns unit in bits

Expected behavior
If we want to keep the same metric names, starlink_dish_uplink_throughput_bytes and starlink_dish_downlink_throughput_bytes, we probably should divide the return values from API by 8. Otherwise, we should consider renaming them to starlink_dish_uplink_throughput_bits and starlink_dish_downlink_throughput_bits

ARM64 Docker Image Build?

Is your feature request related to a problem? Please describe.

I tried running your pre-build Docker image on a Raspberry Pi... but it unfortunately didn't work.

Describe the solution you'd like

It would be really amazing if you could use the GitHub Actions BuildX action to build a cross-platform Docker image (see an example in action here: https://github.com/geerlingguy/docker-debian10-ansible/blob/master/.github/workflows/build.yml#L53

Describe alternatives you've considered

I could set up an X86 server instead, but that makes me sad. I could also build my own Docker image based on an ARM64 base image instead, but that means I have to basically maintain a forked image.

Additional context

I loved your post on Reddit, and have been trying to beef up my own in-home monitoring. I'd love to have a dashboard like yours set up so I can have some really good data available for my full Starlink review in a few weeks.

JSON Export Endpoint

Is your feature request related to a problem? Please describe.
I'd like to use this exporter data elsewhere, and parsing the prometheus lines is not as easy as JSON

Describe the solution you'd like
/metrics_json -> same data as JSON
Potential solution:
https://gist.github.com/ionutvilie/6ff915d19eaa3116b9b796463276c6dd

I can possibly do a PR, but since this is all docker-ized and integrated and such, It's not super straightforward.

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.