Cleanup provided and example config.
authorBrian Brazil <brian.brazil@robustperception.io>
Mon, 7 Nov 2016 12:34:32 +0000 (12:34 +0000)
committerBrian Brazil <brian.brazil@robustperception.io>
Mon, 7 Nov 2016 12:35:36 +0000 (12:35 +0000)
Expand provided config, make sure all modules are usable.
Minimise example config so it's just enough to show all options.

Fixes #71

README.md
blackbox.yml

index 7ab99b60cb30459bb8302f0350f8f55deaf7704e..704fcdb451b8c86743e9f56f36191a18b1ed984e 100644 (file)
--- a/README.md
+++ b/README.md
@@ -27,7 +27,7 @@ will return metrics for a HTTP probe against google.com.
 A configuration showing all options is below:
 ```
 modules:
-  http_2xx:
+  http_2xx_example:
     prober: http
     timeout: 5s
     http:
@@ -40,50 +40,35 @@ modules:
       fail_if_ssl: false
       fail_if_not_ssl: false
       fail_if_matches_regexp:
-      - "Could not connect to database"
+        - "Could not connect to database"
       fail_if_not_matches_regexp:
-      - "Download the latest version here"
+        - "Download the latest version here"
       tls_config:
         insecure_skip_verify: false
       protocol: "tcp" # accepts "tcp/tcp4/tcp6", defaults to "tcp"
       preferred_ip_protocol: "ip4" # used for "tcp", defaults to "ip6"
-  tcp_connect:
+  tcp_connect_v4_example:
     prober: tcp
     timeout: 5s
     tcp:
-      protocol: "tcp"
-      preferred_ip_protocol: "ip4"
-  pop3s_banner:
-    prober: tcp
-    tcp:
-      query_response:
-      - expect: "^+OK"
-      tls: true
-      tls_config:
-        insecure_skip_verify: false
-  ssh_banner:
-    prober: tcp
-    timeout: 5s
-    tcp:
-      query_response:
-      - expect: "^SSH-2.0-"
-  irc_banner:
+      protocol: "tcp4"
+  irc_banner_example:
     prober: tcp
     timeout: 5s
     tcp:
       query_response:
-      - send: "NICK prober"
-      - send: "USER prober prober prober :prober"
-      - expect: "PING :([^ ]+)"
-        send: "PONG ${1}"
-      - expect: "^:[^ ]+ 001"
-  icmp:
+        - send: "NICK prober"
+        - send: "USER prober prober prober :prober"
+        - expect: "PING :([^ ]+)"
+          send: "PONG ${1}"
+        - expect: "^:[^ ]+ 001"
+  icmp_example:
     prober: icmp
     timeout: 5s
     icmp:
       protocol: "icmp"
       preferred_ip_protocol: "ip4"
-  dns_udp:
+  dns_udp_example:
     prober: dns
     timeout: 5s
     dns:
@@ -102,7 +87,7 @@ modules:
       validate_additional_rrs:
         fail_if_matches_regexp:
         - ".*127.0.0.1"
-  dns_tcp:
+  dns_tcp_example:
     prober: dns
     dns:
       protocol: "tcp" # accepts "tcp/tcp4/tcp6/udp/udp4/udp6", defaults to "udp"
index 317016db3665a659835d8fb4b2042d4e9c301278..54831c455c0062a0bf9ac9515e61eb77b2a2b520 100644 (file)
@@ -19,15 +19,22 @@ modules:
       tls: true
       tls_config:
         insecure_skip_verify: false
-  dns_tcp4_prometheus_a:
-    prober: dns
-    dns:
-      protocol: "tcp4"
-      query_name: "www.prometheus.io"
-      query_type: "A"
-      validate_answer_rrs:
-        fail_if_not_matches_regexp:
-        - "www.prometheus.io.\t300\tIN\tA\t127.0.0.1"
+  ssh_banner:
+    prober: tcp
+    timeout: 5s
+    tcp:
+      query_response:
+      - expect: "^SSH-2.0-"
+  irc_banner:
+    prober: tcp
+    timeout: 5s
+    tcp:
+      query_response:
+      - send: "NICK prober"
+      - send: "USER prober prober prober :prober"
+      - expect: "PING :([^ ]+)"
+        send: "PONG ${1}"
+      - expect: "^:[^ ]+ 001"
   icmp:
     prober: icmp
     timeout: 5s