summaryrefslogtreecommitdiffstats
path: root/src/go/collectors/go.d.plugin/modules/httpcheck/metrics.go
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-05 11:19:16 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-07-24 09:53:24 +0000
commitb5f8ee61a7f7e9bd291dd26b0585d03eb686c941 (patch)
treed4d31289c39fc00da064a825df13a0b98ce95b10 /src/go/collectors/go.d.plugin/modules/httpcheck/metrics.go
parentAdding upstream version 1.44.3. (diff)
downloadnetdata-upstream.tar.xz
netdata-upstream.zip
Adding upstream version 1.46.3.upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--src/go/collectors/go.d.plugin/modules/httpcheck/metrics.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/go/collectors/go.d.plugin/modules/httpcheck/metrics.go b/src/go/collectors/go.d.plugin/modules/httpcheck/metrics.go
new file mode 100644
index 000000000..676346fa0
--- /dev/null
+++ b/src/go/collectors/go.d.plugin/modules/httpcheck/metrics.go
@@ -0,0 +1,20 @@
+// SPDX-License-Identifier: GPL-3.0-or-later
+
+package httpcheck
+
+type metrics struct {
+ Status status `stm:""`
+ InState int `stm:"in_state"`
+ ResponseTime int `stm:"time"`
+ ResponseLength int `stm:"length"`
+}
+
+type status struct {
+ Success bool `stm:"success"` // No error on request, body reading and checking its content
+ Timeout bool `stm:"timeout"`
+ Redirect bool `stm:"redirect"`
+ BadContent bool `stm:"bad_content"`
+ BadStatusCode bool `stm:"bad_status"`
+ BadHeader bool `stm:"bad_header"`
+ NoConnection bool `stm:"no_connection"` // All other errors basically
+}