modules/monitoring: add sing-box monitoring

This commit is contained in:
xinyangli 2024-12-10 12:04:54 +08:00
parent e4fd9e8b23
commit dacd22b7d2
Signed by: xin
SSH key fingerprint: SHA256:UU5pRTl7NiLFJbWJZa+snLylZSXIz5rgHmwjzv8v4oE
6 changed files with 69 additions and 0 deletions

View file

@ -28,6 +28,36 @@ in
)
);
mkV2rayScrapes = targets: [
{
job_name = "v2ray-exporter";
scheme = "http";
static_configs = map (
{
address,
port ? 9516,
}:
{
targets = [ "${address}${mkPort port}" ];
}
) targets;
}
{
job_name = "singbox_stat";
scheme = "http";
metrics_path = "/scrape";
static_configs = map (
{
address,
port ? 9516,
}:
{
targets = [ "${address}${mkPort port}" ];
}
) targets;
}
];
mkCaddyScrapes = targets: [
{
job_name = "caddy";