Monitor your balenaCloud devices with Prometheus directly via the file service discovery (sd) mechanism.
This project will deploy a full Prometheus instance to a device, along with a sidecar for balenaCloud device discovery. By default the device discovery will include all devices owned by the user who deploys this project.
Deploy directly to balenaCloud to run a Prometheus instance with a sidecar sd daemon. The sd sidecar writes to a shared volume that Prometheus reads from directly.
- Create an account on balenaCloud
- Provision a device
- Deploy this project to the application containing the device
- Generate an API key to use in this project
- Set the API_KEY value in balenaCloud
- Access the Prometheus instance via public URL port 80
- Note that if you are using public URLs, you will need to do that manually (the daemon does not modify that property on the devices)
Pass in an API_KEY value via balenaCloud or in the environment
All other runtime configuration is done via environment variables:
SD_FILE_PATH: PATH (required) File path to write devices to
REFRESH_RATE: NUMBER Refresh interval (ms) (default: 5000)
USE_PUBLIC_URLS: BOOLEAN Enable scraping via public URL
WRITE_EMPTY: BOOLEAN Enable writing file without any devices (disable failsafe)
Exported labels include:
device_name: string,
uuid: string,
device_type: string,
commit: string,
os_version: string,
os_variant: string,
supervisor_version: string
At this point, only one sidecar per device is supported. A meta-exporter is in the works, stay tuned!