diff options
Diffstat (limited to 'src/go/plugin/go.d/modules/httpcheck/metrics.go')
-rw-r--r-- | src/go/plugin/go.d/modules/httpcheck/metrics.go | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/go/plugin/go.d/modules/httpcheck/metrics.go b/src/go/plugin/go.d/modules/httpcheck/metrics.go new file mode 100644 index 000000000..676346fa0 --- /dev/null +++ b/src/go/plugin/go.d/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 +} |