steamos-prometheus/README.md

39 lines
1.9 KiB
Markdown
Raw Permalink Normal View History

2022-10-23 12:17:39 +00:00
# steamos prometheus
Heavily inspired by [Xe's guide to getting tailscale running](https://tailscale.com/blog/steam-deck/), this script installs prometheus' `node_exporter` onto a Steam Deck in a way that _should_ survive system updates.
## Usage
Make sure you have `sudo` access when in desktop mode by [setting a password for your `deck` user](https://gitlab.com/popsulfr/steam-deck-tricks#easy-ssh-access-to-the-steam-deck).
Copy `./install.sh` onto your Deck, either over SSH or by copying it from a browser, then run `sudo bash ./install.sh`.
If this is the first time you've installed a system extension, run `sudo systemd-sysext merge`.
If you've already done something like the Tailscale install mentioned above, just `sudo systemd-sysext refresh`.
To make sure that system extensions are loaded after reboot, run
```sh
sudo systemctl enable systemd-sysext
sudo systemctl start systemd-sysext
```
Then you should be able to just
```sh
sudo systemctl enable prometheus-node-exporter
sudo systemctl start prometheus-node-exporter
```
Installing a collector for the metrics now available on `:9100` is left as an exercise for the reader, but I figure if you're devoted to tracking system metrics enough to try and install prometheus on your Steam Deck you've probably already got a setup for that.
2023-01-06 03:10:36 +00:00
## Future Incompatabilities
2023-01-06 03:11:09 +00:00
If and when SteamOS is "rebased" onto a newer version of Arch (that is, the `VERSION_ID` in `/etc/os-release` is incremented), you'll need to update the `VERSION_ID` in `/var/lib/extensions/prometheus-node-exporter/usr/lib/extension-release.d/extension-release.prometheus-node-exporter` to match, then re-merge the extensions via `sudo systemd-sysext refresh`.
2023-01-06 03:10:36 +00:00
2022-10-23 12:17:39 +00:00
## References
* <https://tailscale.com/blog/steam-deck/>
* <https://blogs.igalia.com/berto/2022/09/13/adding-software-to-the-steam-deck-with-systemd-sysext/>
2022-10-23 17:53:01 +00:00
* <https://forum.tailscale.com/t/steam-deck-support/2583/7>