You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 27, 2024. It is now read-only.
@@ -114,6 +114,10 @@ The following options can be defined globally: update_every, autodetection_retry
114
114
| url | Server URL. || yes |
115
115
| status_accepted | HTTP accepted response statuses. Anything else will result in 'bad status' in the status chart. |[200]| no |
116
116
| response_match | If the status code is accepted, the content of the response will be matched against this regular expression. || no |
117
+
| headers_match | This option defines a set of rules that check for specific key-value pairs in the HTTP headers of the response. |[]| no |
118
+
| headers_match.exclude | This option determines whether the rule should check for the presence of the specified key-value pair or the absence of it. | no | no |
119
+
| headers_match.key | The exact name of the HTTP header to check for. || yes |
120
+
| headers_match.value | The [pattern](https://github.com/netdata/go.d.plugin/tree/master/pkg/matcher#supported-format) to match against the value of the specified header. || no |
117
121
| cookie_file | Path to cookie file. See [cookie file format](https://everything.curl.dev/http/cookies/fileformat). || no |
118
122
| timeout | HTTP request timeout. | 1 | no |
119
123
| username | Username for basic HTTP authentication. || no |
@@ -148,7 +152,7 @@ jobs:
148
152
```
149
153
</details>
150
154
151
-
##### With status_accepted
155
+
##### With `status_accepted`
152
156
153
157
A basic example configuration with non-default status_accepted.
154
158
@@ -165,6 +169,53 @@ jobs:
165
169
```
166
170
</details>
167
171
172
+
##### With `header_match`
173
+
174
+
Example configurations with `header_match`. See the value [pattern](https://github.com/netdata/go.d.plugin/tree/master/pkg/matcher#supported-format) syntax.
175
+
176
+
<details><summary>Config</summary>
177
+
178
+
```yaml
179
+
jobs:
180
+
# The "X-Robots-Tag" header must be present in the HTTP response header,
181
+
# but the value of the header does not matter.
182
+
# This config checks for the presence of the header regardless of its value.
183
+
- name: local
184
+
url: http://127.0.0.1:8080
185
+
header_match:
186
+
- key: X-Robots-Tag
187
+
188
+
# The "X-Robots-Tag" header must be present in the HTTP response header
189
+
# only if its value is equal to "noindex, nofollow".
190
+
# This config checks both the presence of the header and its value.
191
+
- name: local
192
+
url: http://127.0.0.1:8080
193
+
header_match:
194
+
- key: X-Robots-Tag
195
+
value: '= noindex,nofollow'
196
+
197
+
# The "X-Robots-Tag" header must not be present in the HTTP response header
198
+
# but the value of the header does not matter.
199
+
# This config checks for the presence of the header regardless of its value.
200
+
- name: local
201
+
url: http://127.0.0.1:8080
202
+
header_match:
203
+
- key: X-Robots-Tag
204
+
exclude: yes
205
+
206
+
# The "X-Robots-Tag" header must not be present in the HTTP response header
207
+
# only if its value is equal to "noindex, nofollow".
208
+
# This config checks both the presence of the header and its value.
0 commit comments