其實(shí)很多時(shí)候敞掘,群眾是很好說話的,因?yàn)樗麄兯枰牟⒎翘貦?quán),而是公平
--當(dāng)年明月《明朝那些事兒》
由于是win本地部署芒炼,jmeter部署看前面文章即可,本篇主要記錄influxdb+granfna
一术徊、influxdb
1本刽、influxdb官網(wǎng)下載win的安裝包
2、解壓至本地
3赠涮、修改配置文件子寓,下載下來的配置文件為:influxdb.conf;一般win都推薦influxdb.config使用config后綴的配置笋除,其實(shí)兩種配置文件都試了試斜友,都可用
4、修改配置文件內(nèi)容垃它,路徑改成自己本地路徑
meta部分:
<pre style="color: rgb(0, 0, 0); font-family: "Courier New"; font-size: 12px; margin: 5px 8px; padding: 5px;">[meta]
Where the metadata/raft database is stored
dir = "D:\usuallySoftwere\influxdb-1.7.7-1\meta" # Automatically create a default retention policy when creating a database.
retention-autocreate = true # If log messages are printed for the meta service
logging-enabled = true</pre>
data部分:
<pre style="color: rgb(0, 0, 0); font-family: "Courier New"; font-size: 12px; margin: 5px 8px; padding: 5px;">[data]
The directory where the TSM storage engine stores TSM files.
dir = "D:\usuallySoftwere\influxdb-1.7.7-1\data" # The directory where the TSM storage engine stores WAL files.
wal-dir = "D:\usuallySoftwere\influxdb-1.7.7-1\wal"</pre>
retention部分:
<pre style="color: rgb(0, 0, 0); font-family: "Courier New"; font-size: 12px; margin: 5px 8px; padding: 5px;">[retention]
Determines whether retention policy enforcement enabled.
enabled = true # The interval of time when retention policy enforcement checks run.
check-interval = "30m"</pre>
shard-precreation部分:
<pre style="color: rgb(0, 0, 0); font-family: "Courier New"; font-size: 12px; margin: 5px 8px; padding: 5px;">[shard-precreation]
Determines whether shard pre-creation service is enabled.
enabled = true # The interval of time when the check to pre-create new shards runs.
check-interval = "10m" # The default period ahead of the endtime of a shard group that its successor
group is created.
advance-period = "30m"</pre>
http部分:
<pre style="color: rgb(0, 0, 0); font-family: "Courier New"; font-size: 12px; margin: 5px 8px; padding: 5px;">[http]
Determines whether HTTP endpoint is enabled.
enabled = true # Determines whether the Flux query endpoint is enabled.
flux-enabled = false # Determines whether the Flux query logging is enabled.
flux-log-enabled = false # The bind address used by the HTTP service.
bind-address = ":8086" # Determines whether user authentication is enabled over HTTP/HTTPS.
auth-enabled = false # The default realm sent back when issuing a basic auth challenge.
realm = "InfluxDB" # Determines whether HTTP request logging is enabled.
log-enabled = true # Determines whether the HTTP write request logs should be suppressed when the log is enabled.
suppress-write-log = false # When HTTP request logging is enabled, this option specifies the path where # log entries should be written. If unspecified, the default is to write to stderr, which
intermingles HTTP logs with internal InfluxDB logging.
If influxd is unable to access the specified path, it will log an error and fall back to writing
the request log to stderr.
access-log-path = "" # Filters which requests should be logged. Each filter is of the pattern NNN, NNX, or NXX where N is # a number and X is a wildcard for any number. To filter all 5xx responses, use the string 5xx.
If multiple filters are used, then only one has to match. The default is to have no filters which
will cause every request to be printed.
access-log-status-filters = []
Determines whether detailed write logging is enabled.
write-tracing = false # Determines whether the pprof endpoint is enabled. This endpoint is used for # troubleshooting and monitoring.
pprof-enabled = true # Enables a pprof endpoint that binds to localhost:6060 immediately on startup.
This is only needed to debug startup issues.
debug-pprof-enabled = false # Determines whether HTTPS is enabled.
https-enabled = false # The SSL certificate to use when HTTPS is enabled.
https-certificate = "/etc/ssl/influxdb.pem" # Use a separate private key location.
https-private-key = "" # The JWT auth shared secret to validate requests using JSON web tokens.
shared-secret = "" # The default chunk size for result sets that should be chunked.
max-row-limit = 0 # The maximum number of HTTP connections that may be open at once. New connections that
would exceed this limit are dropped. Setting this value to 0 disables the limit.
max-connection-limit = 0 # Enable http service over unix domain socket
unix-socket-enabled = false # The path of the unix domain socket.
bind-socket = "/var/run/influxdb.sock" # The maximum size of a client request body, in bytes. Setting this value to 0 disables the limit.
max-body-size = 25000000 # The maximum number of writes processed concurrently.
Setting this to 0 disables the limit.
max-concurrent-write-limit = 0 # The maximum number of writes queued for processing.
Setting this to 0 disables the limit.
max-enqueued-write-limit = 0 # The maximum duration for a write to wait in the queue to be processed.
Setting this to 0 or setting max-concurrent-write-limit to 0 disables the limit.
enqueued-write-timeout = 0</pre>
graphite部分:
<pre style="color: rgb(0, 0, 0); font-family: "Courier New"; font-size: 12px; margin: 5px 8px; padding: 5px;">[[graphite]]
Determines whether the graphite endpoint is enabled.
enabled = true database = "jmeter" # retention-policy = "" bind-address = ":2003" protocol = "tcp" consistency-level = "one" # These next lines control how batching works. You should have this enabled
otherwise you could get dropped metrics or poor performance. Batching
will buffer points in memory if you have many coming in.
Flush if this many points get buffered
batch-size = 5000 # number of batches that may be pending in memory
batch-pending = 10 # Flush at least this often even if we haven't hit buffer limit
batch-timeout = "1s" # UDP Read buffer size, 0 means OS default. UDP listener will fail if set above OS max.
udp-read-buffer = 0 ### This string joins multiple matching 'measurement' values providing more control over the final measurement name.
separator = "." ### Default tags that will be added to all metrics. These can be overridden at the template level
or by tags extracted from metric
tags = ["region=us-east", "zone=1c"]
Each template line requires a template pattern. It can have an optional
filter before the template and separated by spaces. It can also have optional extra
tags following the template. Multiple tags should be separated by commas and no spaces
similar to the line protocol format. There can be only one default template.
templates = [
"*.app env.service.resource.measurement",
# Default template
"server.*",
]
[collectd]
Controls one or many listeners for collectd data.
</pre>
可以看到基本上都是對(duì)配置的打開鲜屏,graphite部分和http部分涉及自定義配置
5、啟動(dòng)influxdb国拇,指定配置文件
命令:influxd -config influxdb.config
6洛史、啟動(dòng)成功
二、Granfna
1贝奇、官網(wǎng)下載win安裝包
2虹菲、配置influxdb庫信息(注意:庫有設(shè)置密碼就填入密碼,未設(shè)置密碼便不用填寫掉瞳,直接連接即可)
3毕源、導(dǎo)入jmeter模板(模板很多,百度一下陕习,或者官網(wǎng)查找)
三霎褐、jmeter配置
1、添加后置監(jiān)聽器進(jìn)行配置
后端監(jiān)聽器實(shí)現(xiàn)選擇:org.apache.jmeter.visualizers.backend.influxdb.InfluxdbBackendListenerClient
參數(shù)配置:
<pre style="color: rgb(0, 0, 0); font-family: "Courier New"; font-size: 12px; margin: 5px 8px; padding: 5px;">influxdbUrl :http://localhost:8086/write?db=jmeter
application :jmeter
measurement :jmeter
summaryOnly : false samplersRegex :* 其余默認(rèn)即可</pre>
配置完成该镣。
[圖片上傳失敗...(image-1b44dc-1678761108982)]