Compare commits

...

6 Commits

4 changed files with 94 additions and 55 deletions

0
a Normal file
View File

20
blackbox/blackbox.yaml Normal file
View File

@@ -0,0 +1,20 @@
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

View File

@@ -1,54 +1,51 @@
common_targets: &common common_targets: &common
targets: - name: r2.gr7.kkarolis.lt
- name: r2.gr7.kkarolis.lt address: 192.168.20.1
address: 192.168.20.1 module: icmp_ttl5
module: icmp_ttl5 labels:
labels: - dst_location: gr7
- dst_location: gr7 - name: Karolio-LHost.gr7.kkarolis.lt
- name: Karolio-LHost.gr7.kkarolis.lt address: Karolio-LHost.gr7.kkarolis.lt
address: Karolio-LHost.gr7.kkarolis.lt module: icmp_ttl5
module: icmp_ttl5 labels:
labels: - dst_location: gr7
- dst_location: gr7 - name: jetkvm.gr7.kkarolis.lt
- name: jetkvm.gr7.kkarolis.lt address: jetkvm-62f0ba3492363ee9.gr7.kkarolis.lt
address: jetkvm-62f0ba3492363ee9.gr7.kkarolis.lt module: icmp_ttl5
module: icmp_ttl5 labels:
labels: - dst_location: gr7
- dst_location: gr7 - name: unifi.gr7.kkarolis.lt
- name: unifi.gr7.kkarolis.lt address: unifi.gr7.kkarolis.lt
address: unifi.gr7.kkarolis.lt module: icmp_ttl5
module: icmp_ttl5 labels:
labels: - dst_location: gr7
- dst_location: gr7 - name: cftun.gr7.kkarolis.lt
- name: cftun.gr7.kkarolis.lt address: cftun.gr7.kkarolis.lt
address: cftun.gr7.kkarolis.lt module: icmp_ttl5
module: icmp_ttl5 labels:
labels: - dst_location: gr7
- dst_location: gr7 - name: r86s.gr7.kkarolis.lt
- name: r86s.gr7.kkarolis.lt address: r86s.gr7.kkarolis.lt
address: r86s.gr7.kkarolis.lt module: icmp_ttl5
module: icmp_ttl5 labels:
labels: - dst_location: gr7
- dst_location: gr7 - name: r1.kv40.kkarolis.lt
- name: r1.kv40.kkarolis.lt address: r1.kv40.kkarolis.lt
address: r1.kv40.kkarolis.lt module: icmp_ttl5
module: icmp_ttl5 labels:
labels: - dst_location: kv40
- dst_location: kv40 - name: r2.kv40.kkarolis.lt
- name: r2.kv40.kkarolis.lt address: r2.kv40.kkarolis.lt
address: r2.kv40.kkarolis.lt module: icmp_ttl5
module: icmp_ttl5 labels:
labels: - dst_location: kv40
- dst_location: kv40
NAMU-PC: NAMU-PC:
labels: labels:
- location: kv40 - location: kv40
targets: [] targets: *common
<<: *common
r86s: r86s:
labels: labels:
- location: gr7 - location: gr7
targets: [] targets: *common
<<: *common

View File

@@ -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]
} }
} }