mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 15:03:28 +00:00
nixos/prometheus-nats-exporter: new module
This commit is contained in:
parent
6347cd23dc
commit
2e10f813fe
@ -163,6 +163,8 @@ The pre-existing [services.ankisyncd](#opt-services.ankisyncd.enable) has been m
|
||||
|
||||
- [Uni-Sync](https://github.com/EightB1ts/uni-sync), a synchronization tool for Lian Li Uni Controllers. Available as [hardware.uni-sync](#opt-hardware.uni-sync.enable)
|
||||
|
||||
- [prometheus-nats-exporter](https://github.com/nats-io/prometheus-nats-exporter), a Prometheus exporter for NATS. Available as [services.prometheus.exporters.nats](#opt-services.prometheus.exporters.nats.enable).
|
||||
|
||||
## Backward Incompatibilities {#sec-release-24.05-incompatibilities}
|
||||
|
||||
<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->
|
||||
|
@ -55,6 +55,7 @@ let
|
||||
"modemmanager"
|
||||
"mongodb"
|
||||
"mysqld"
|
||||
"nats"
|
||||
"nextcloud"
|
||||
"nginx"
|
||||
"nginxlog"
|
||||
|
@ -0,0 +1,34 @@
|
||||
{ config, lib, pkgs, options, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
|
||||
cfg = config.services.prometheus.exporters.nats;
|
||||
|
||||
in
|
||||
{
|
||||
port = 7777;
|
||||
|
||||
extraOpts = {
|
||||
url = mkOption {
|
||||
type = types.str;
|
||||
default = "http://127.0.0.1:8222";
|
||||
description = ''
|
||||
NATS monitor endpoint to query.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
serviceOpts = {
|
||||
serviceConfig = {
|
||||
ExecStart = ''
|
||||
${pkgs.prometheus-nats-exporter}/bin/prometheus-nats-exporter \
|
||||
-addr ${cfg.listenAddress} \
|
||||
-port ${toString cfg.port} \
|
||||
${concatStringsSep " \\\n " cfg.extraFlags} \
|
||||
${cfg.url}
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user