modules/monitoring: add sing-box monitoring
This commit is contained in:
parent
e4fd9e8b23
commit
dacd22b7d2
6 changed files with 69 additions and 0 deletions
|
@ -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";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue