rename plugin http_response

This commit is contained in:
Ulric Qin 2022-05-14 16:26:52 +08:00
parent 888b6d149e
commit ece3f87065
8 changed files with 29 additions and 29 deletions

View File

@ -18,7 +18,7 @@ import (
_ "flashcat.cloud/categraf/inputs/disk"
_ "flashcat.cloud/categraf/inputs/diskio"
_ "flashcat.cloud/categraf/inputs/exec"
_ "flashcat.cloud/categraf/inputs/httpresponse"
_ "flashcat.cloud/categraf/inputs/http_response"
_ "flashcat.cloud/categraf/inputs/kernel"
_ "flashcat.cloud/categraf/inputs/kernelvmstat"
_ "flashcat.cloud/categraf/inputs/linuxsysctlfs"

View File

@ -1,11 +1,11 @@
# # collect interval
# interval = 15
# [[instances]]
# targets = [
# "http://localhost",
# "https://www.baidu.com"
# ]
[[instances]]
targets = [
"http://localhost",
"https://www.baidu.com"
]
# # append some labels for series
# labels = { region="cloud", product="n9e" }

View File

@ -5,7 +5,7 @@
"severity": 2,
"disabled": 0,
"prom_for_duration": 60,
"prom_ql": "httpresponse_result_code != 0",
"prom_ql": "http_response_result_code != 0",
"prom_eval_interval": 15,
"enable_stime": "00:00",
"enable_etime": "23:59",

View File

@ -0,0 +1,19 @@
[
{
"name": "HTTP探测",
"tags": "",
"configs": "",
"chart_groups": [
{
"name": "Default chart group",
"weight": 0,
"charts": [
{
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"max(http_response_result_code) by (target)\",\"legend\":\"UP?\"},{\"expr\":\"max(http_response_response_code) by (target)\",\"refId\":\"B\",\"legend\":\"status code\"},{\"expr\":\"max(http_response_response_time) by (target)\",\"refId\":\"C\",\"legend\":\"latency(s)\"},{\"expr\":\"max(http_response_cert_expire_timestamp) by (target) - time()\",\"refId\":\"D\",\"legend\":\"cert expire\"}],\"name\":\"URL Details\",\"custom\":{\"showHeader\":true,\"calc\":\"lastNotNull\",\"displayMode\":\"labelValuesToRows\",\"aggrDimension\":\"target\"},\"options\":{\"valueMappings\":[],\"standardOptions\":{}},\"overrides\":[{\"properties\":{\"valueMappings\":[{\"type\":\"special\",\"match\":{\"special\":0},\"result\":{\"text\":\"UP\",\"color\":\"#417505\"}},{\"type\":\"range\",\"match\":{\"special\":1,\"from\":1},\"result\":{\"text\":\"DOWN\",\"color\":\"#e90f0f\"}}],\"standardOptions\":{}},\"matcher\":{\"value\":\"A\"}},{\"type\":\"special\",\"matcher\":{\"value\":\"D\"},\"properties\":{\"standardOptions\":{\"util\":\"humantimeSeconds\"}}}],\"version\":\"2.0.0\",\"type\":\"table\",\"layout\":{\"h\":4,\"w\":24,\"x\":0,\"y\":0,\"i\":\"0\"}}",
"weight": 0
}
]
}
]
}
]

View File

@ -1,4 +1,4 @@
package httpresponse
package http_response
import (
"errors"
@ -24,7 +24,7 @@ import (
)
const (
inputName = "httpresponse"
inputName = "http_response"
Success uint64 = 0
ConnectionFailed uint64 = 1

View File

@ -1,4 +1,4 @@
package httpresponse
package http_response
import (
"crypto/tls"

View File

@ -1,19 +0,0 @@
[
{
"name": "HTTP探测",
"tags": "",
"configs": "",
"chart_groups": [
{
"name": "Default chart group",
"weight": 0,
"charts": [
{
"configs": "{\"targets\":[{\"refId\":\"A\",\"expr\":\"max(httpresponse_result_code) by (target)\",\"legend\":\"UP?\"},{\"expr\":\"max(httpresponse_response_code) by (target)\",\"refId\":\"B\",\"legend\":\"status code\"},{\"expr\":\"max(httpresponse_response_time) by (target)\",\"refId\":\"C\",\"legend\":\"latency(s)\"},{\"expr\":\"max(httpresponse_cert_expire_timestamp) by (target) - time()\",\"refId\":\"D\",\"legend\":\"cert expire\"}],\"name\":\"URL Details\",\"custom\":{\"showHeader\":true,\"calc\":\"lastNotNull\",\"displayMode\":\"labelValuesToRows\",\"aggrDimension\":\"target\"},\"options\":{\"valueMappings\":[],\"standardOptions\":{}},\"overrides\":[{\"properties\":{\"valueMappings\":[{\"type\":\"special\",\"match\":{\"special\":0},\"result\":{\"text\":\"UP\",\"color\":\"#417505\"}},{\"type\":\"range\",\"match\":{\"special\":1,\"from\":1},\"result\":{\"text\":\"DOWN\",\"color\":\"#e90f0f\"}}],\"standardOptions\":{}},\"matcher\":{\"value\":\"A\"}},{\"type\":\"special\",\"matcher\":{\"value\":\"D\"},\"properties\":{\"standardOptions\":{\"util\":\"humantimeSeconds\"}}}],\"version\":\"2.0.0\",\"type\":\"table\",\"layout\":{\"h\":4,\"w\":24,\"x\":0,\"y\":0,\"i\":\"0\"}}",
"weight": 0
}
]
}
]
}
]