Compare commits
2 Commits
2e8bc8bd00
...
1e8842444d
Author | SHA1 | Date | |
---|---|---|---|
1e8842444d | |||
6bd1abb504 |
27
blackbox/blackbox.yaml
Normal file
27
blackbox/blackbox.yaml
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
modules:
|
||||||
|
http_2xx:
|
||||||
|
prober: http
|
||||||
|
http:
|
||||||
|
preferred_ip_protocol: "ip4"
|
||||||
|
tcp_connect:
|
||||||
|
prober: tcp
|
||||||
|
ssh_banner:
|
||||||
|
prober: tcp
|
||||||
|
tcp:
|
||||||
|
query_response:
|
||||||
|
- expect: "^SSH-2.0-"
|
||||||
|
- send: "SSH-2.0-blackbox-ssh-check"
|
||||||
|
icmp:
|
||||||
|
prober: icmp
|
||||||
|
icmp_ttl5:
|
||||||
|
prober: icmp
|
||||||
|
timeout: 5s
|
||||||
|
icmp:
|
||||||
|
ttl: 5
|
||||||
|
http_3xx:
|
||||||
|
prober: http
|
||||||
|
http:
|
||||||
|
preferred_ip_protocol: "ip4"
|
||||||
|
enable_http3: true
|
||||||
|
enable_http2: false
|
||||||
|
valid_http_versions: ["HTTP/3.0"]
|
@@ -28,14 +28,8 @@ declare "fmt_repository_path" {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
declare "load_host_config" {
|
declare "load_config" {
|
||||||
argument "host" {
|
argument "config_file" {
|
||||||
optional = true
|
|
||||||
comment = "The host to load the configuration for"
|
|
||||||
default = sys.env("GCLOUD_FM_COLLECTOR_ID")
|
|
||||||
}
|
|
||||||
|
|
||||||
argument "config_file" {
|
|
||||||
optional = false
|
optional = false
|
||||||
comment = "The path to the configuration file"
|
comment = "The path to the configuration file"
|
||||||
}
|
}
|
||||||
@@ -58,6 +52,34 @@ declare "load_host_config" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export "config" {
|
export "config" {
|
||||||
value = encoding.from_yaml(remote.http.config_file.content)[argument.host.value]
|
value = remote.http.config_file.content
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
declare "load_host_config" {
|
||||||
|
argument "host" {
|
||||||
|
optional = true
|
||||||
|
comment = "The host to load the configuration for"
|
||||||
|
default = sys.env("GCLOUD_FM_COLLECTOR_ID")
|
||||||
|
}
|
||||||
|
|
||||||
|
argument "config_file" {
|
||||||
|
optional = false
|
||||||
|
comment = "The path to the configuration file"
|
||||||
|
}
|
||||||
|
|
||||||
|
argument "repository" {
|
||||||
|
optional = true
|
||||||
|
comment = "The repository to use for loading the configuration"
|
||||||
|
default = "https://git.kkarolis.lt/karolis/Alloy/"
|
||||||
|
}
|
||||||
|
|
||||||
|
load_config "remote" {
|
||||||
|
config_file = argument.config_file.value
|
||||||
|
repository = argument.repository.value
|
||||||
|
}
|
||||||
|
|
||||||
|
export "config" {
|
||||||
|
value = encoding.from_yaml(load_config.remote.config)[argument.host.value]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user