https://github.com/shift/geoclue-prometheus-exporter
Prometheus Exporter for Geoclue2 D-Bus daemon.
https://github.com/shift/geoclue-prometheus-exporter
Last synced: 2 months ago
JSON representation
Prometheus Exporter for Geoclue2 D-Bus daemon.
- Host: GitHub
- URL: https://github.com/shift/geoclue-prometheus-exporter
- Owner: shift
- Created: 2025-06-19T18:44:50.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2026-03-08T12:00:48.000Z (3 months ago)
- Last Synced: 2026-03-08T14:58:07.651Z (3 months ago)
- Language: Rust
- Size: 147 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# GeoClue2 Prometheus Exporter
A Prometheus metrics exporter for GeoClue2 geolocation data on Linux systems.
## Features
- Exports geolocation metrics (latitude, longitude, accuracy, altitude, etc.) as Prometheus metrics
- Configurable minimum accuracy level
- Configurable metrics endpoint
- Easily integrates with Grafana Alloy for laptop metrics
## Dependencies
This project uses:
- **anyhow 1.0.75**: For flexible error handling
- **chrono 0.4.31**: For date and time functionality
- **clap 4.4.6**: For command line argument parsing
- **futures-util 0.3.28**: For async/await utilities
- **metrics 0.22.0**: For metrics collection and processing
- **metrics-exporter-prometheus 0.13.0**: For exposing metrics in Prometheus format
- **metrics-process 2.4.0**: For collecting process metrics
- **tokio 1.36.0**: For asynchronous runtime
- **zbus 4.1.2**: For D-Bus communication with GeoClue2
## Installation
### Using Nix/NixOS
Add this flake to your NixOS configuration:
```nix
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
geoclue-prometheus-exporter = {
url = "github:shift/geoclue-prometheus-exporter";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, geoclue-prometheus-exporter, ... }: {
nixosConfigurations.myHost = nixpkgs.lib.nixosSystem {
# ...
modules = [
# ...
geoclue-prometheus-exporter.nixosModules.default
# Configure the service
({ ... }: {
services.geoclue-prometheus-exporter = {
enable = true;
bind = "127.0.0.1"; # Default
port = 9090; # Default
openFirewall = false; # Default
};
})
];
};
};
}