-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathurl.conf.sample
More file actions
81 lines (72 loc) · 2.51 KB
/
url.conf.sample
File metadata and controls
81 lines (72 loc) · 2.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
[global_tags]
monitor_node = "China"
[agent]
interval = "10s"
round_interval = true
metric_batch_size = 1000
metric_buffer_limit = 10000
collection_jitter = "7s"
flush_interval = "10s"
flush_jitter = "5s"
precision = ""
debug = false
quiet = false
hostname = ""
omit_hostname = false
###############################################################################
# OUTPUT PLUGINS #
###############################################################################
[[outputs.influxdb]]
urls = ["http://localhost:8086"]
database = "telegraf"
retention_policy = "default"
write_consistency = "any"
timeout = "20s"
# username = "telegraf"
# password = "metricsmetricsmetricsmetrics"
## Set the user agent for HTTP POSTs (can be useful for log differentiation)
# user_agent = "telegraf"
## Set UDP payload size, defaults to InfluxDB UDP Client default (512 bytes)
# udp_payload = 512
## Optional SSL Config
# ssl_ca = "/etc/telegraf/ca.pem"
# ssl_cert = "/etc/telegraf/cert.pem"
# ssl_key = "/etc/telegraf/key.pem"
## Use SSL but skip chain & host verification
# insecure_skip_verify = false
###############################################################################
# INPUT PLUGINS #
###############################################################################
# HTTP/HTTPS request given an address a method and a timeout
[[inputs.url_monitor]]
## App Name
app = "monitor"
cmdbid = "1111"
interval = "5s"
## Server address (default http://localhost)
address = "http://www.qq.com/"
## Set response_timeout (default 5 seconds)
response_timeout = "15s"
## HTTP Request Method
method = "GET"
## Require String 正则表达式用单引号避免转义
require_str = ''
require_code = ''
failed_count = 3
failed_timeout = 5.0
## Whether to follow redirects from the server (defaults to false)
follow_redirects = true
## Optional HTTP Request Body
# body = '''
# {'fake':'data'}
# '''
## Optional SSL Config
# ssl_ca = "/etc/telegraf/ca.pem"
# ssl_cert = "/etc/telegraf/cert.pem"
# ssl_key = "/etc/telegraf/key.pem"
## Use SSL but skip chain & host verification
# insecure_skip_verify = false
## HTTP Request Headers (all values must be strings)
## 表格名下,直到下一个表格名或文件尾,均为当前表格的内容 所以Headers应该放在最后
# [inputs.url_monitor.headers]
# Host = "github.com"