mirror of
https://codeberg.org/icewind/prometheus-mdns-rs.git
synced 2026-06-03 09:54:21 +02:00
fmt
This commit is contained in:
parent
081df0beae
commit
5753229f6a
5 changed files with 40 additions and 37 deletions
|
|
@ -1,6 +1,7 @@
|
|||
# mDNS service discovery for Prometheus
|
||||
|
||||
Discovers mDNS/ZeroConf/Bonjour service announcements under \_prometheus-http.\_tcp for ad-hoc discovery of devices on LAN networks.
|
||||
Discovers mDNS/ZeroConf/Bonjour service announcements under
|
||||
\_prometheus-http.\_tcp for ad-hoc discovery of devices on LAN networks.
|
||||
|
||||
## Usage
|
||||
|
||||
|
|
@ -38,4 +39,6 @@ MDNS.addServiceTxt("prometheus-http", "tcp", "name", prometheus_name);
|
|||
|
||||
## Credits
|
||||
|
||||
Wholly inspired by [prometheus-mdns-sd](https://github.com/msiebuhr/prometheus-mdns-sd) by Morten Siebuhr
|
||||
Wholly inspired by
|
||||
[prometheus-mdns-sd](https://github.com/msiebuhr/prometheus-mdns-sd) by Morten
|
||||
Siebuhr
|
||||
|
|
|
|||
13
flake.nix
13
flake.nix
|
|
@ -10,13 +10,14 @@
|
|||
inputs.flakelight.follows = "flakelight";
|
||||
};
|
||||
};
|
||||
outputs = { mill-scale, ... }: mill-scale ./. {
|
||||
outputs = {mill-scale, ...}:
|
||||
mill-scale ./. {
|
||||
nixosModules = {outputs, ...}: {
|
||||
default =
|
||||
{ pkgs
|
||||
, config
|
||||
, lib
|
||||
, ...
|
||||
default = {
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
imports = [./nix/module.nix];
|
||||
config = lib.mkIf config.services.prometheus-mdns-sd.enable {
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
{ config
|
||||
, lib
|
||||
, pkgs
|
||||
, ...
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.services.prometheus-mdns-sd;
|
||||
in
|
||||
{
|
||||
in {
|
||||
options.services.prometheus-mdns-sd = {
|
||||
enable = mkEnableOption "WiFi prometheus exporter";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
{ stdenv
|
||||
, rustPlatform
|
||||
, lib
|
||||
,
|
||||
}:
|
||||
let
|
||||
{
|
||||
stdenv,
|
||||
rustPlatform,
|
||||
lib,
|
||||
}: let
|
||||
inherit (lib.sources) sourceByRegex;
|
||||
inherit (builtins) fromTOML readFile;
|
||||
src = sourceByRegex ../. ["Cargo.*" "(src)(/.*)?"];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue