template module prometheus; package mqtt2prometheus
This commit is contained in:
parent
7038f3a5cf
commit
c30492cfde
2 changed files with 35 additions and 0 deletions
23
hosts/hackens-org/prometheus/default.nix
Normal file
23
hosts/hackens-org/prometheus/default.nix
Normal file
|
@ -0,0 +1,23 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
{
|
||||
networking.firewall.allowedTCPPorts = [ 9090 # prometheus ];
|
||||
|
||||
services = {
|
||||
prometheus = {
|
||||
enable = true;
|
||||
scrapeConfigs = [
|
||||
{
|
||||
job_name = "node";
|
||||
scrape_interval = "10s";
|
||||
static_configs = [
|
||||
{
|
||||
targets = [
|
||||
"localhost:9100"
|
||||
];
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
12
hosts/hackens-org/prometheus/mqtt2prometheus.nix
Normal file
12
hosts/hackens-org/prometheus/mqtt2prometheus.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
{ pkgs, ... }:
|
||||
pkgs.buildGoModule {
|
||||
pname = "mqtt2prometheus";
|
||||
version = "0.1.6";
|
||||
src = pkgs.fetchFromGithub {
|
||||
owner = "hikhvar";
|
||||
repo = "mqtt2prometheus";
|
||||
rev = "v${version}";
|
||||
sha256 = "0dz5mrwm231g45i8rbmvaza8bm6cr4jg5vc87h41vnm7xsx815g7";
|
||||
};
|
||||
vendorSha256 = "";
|
||||
}
|
Loading…
Reference in a new issue