43 lines
1.2 KiB
Nix
43 lines
1.2 KiB
Nix
{
|
|
services.telegraf.extraConfig.inputs = {
|
|
http_response = [
|
|
{
|
|
urls = [ "https://lemmy.nix-community.org/" ];
|
|
response_string_match = "Lemmy for Nix";
|
|
tags.host = "web01.nix-community.org";
|
|
tags.org = "nix-community";
|
|
}
|
|
{
|
|
urls = [ "https://nur-update.nix-community.org/" ];
|
|
response_string_match = "NUR update endpoint";
|
|
tags.host = "build03.nix-community.org";
|
|
tags.org = "nix-community";
|
|
}
|
|
];
|
|
net_response =
|
|
let
|
|
hosts = [
|
|
"build01.nix-community.org"
|
|
"build02.nix-community.org"
|
|
"build03.nix-community.org"
|
|
"build04.nix-community.org"
|
|
"darwin01.nix-community.org"
|
|
"darwin02.nix-community.org"
|
|
"darwin03.nix-community.org"
|
|
"web01.nix-community.org"
|
|
#"web02.nix-community.org"
|
|
];
|
|
in
|
|
map
|
|
(host: {
|
|
protocol = "tcp";
|
|
address = "${host}:22";
|
|
send = "SSH-2.0-Telegraf";
|
|
expect = "SSH-2.0";
|
|
tags.host = host;
|
|
tags.org = "nix-community";
|
|
timeout = "10s";
|
|
})
|
|
hosts;
|
|
};
|
|
}
|