Jmeter(四十九)jmeter+influxdb+Granfna集成win部署

其实很多时候,群众是很好说话的,因为他们所需要的并非特权,而是公平

--当年明月《明朝那些事儿》

由于是win本地部署,jmeter部署看前面文章即可,本篇主要记录influxdb+granfna

一、influxdb

1、influxdb官网下载win的安装包

2、解压至本地

3、修改配置文件,下载下来的配置文件为:influxdb.conf;一般win都推荐influxdb.config使用config后缀的配置,其实两种配置文件都试了试,都可用

4、修改配置文件内容,路径改成自己本地路径

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>

可以看到基本上都是对配置的打开,graphite部分和http部分涉及自定义配置

5、启动influxdb,指定配置文件

命令:influxd -config influxdb.config

6、启动成功

二、Granfna

1、官网下载win安装包

2、配置influxdb库信息(注意:库有设置密码就填入密码,未设置密码便不用填写,直接连接即可)

3、导入jmeter模板(模板很多,百度一下,或者官网查找)

三、jmeter配置

1、添加后置监听器进行配置

后端监听器实现选择:org.apache.jmeter.visualizers.backend.influxdb.InfluxdbBackendListenerClient

参数配置:

<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 :* 其余默认即可</pre>

配置完成。

[图片上传失败...(image-1b44dc-1678761108982)]

©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 194,390评论 5 459
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 81,821评论 2 371
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 141,632评论 0 319
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 52,170评论 1 263
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 61,033评论 4 355
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 46,098评论 1 272
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 36,511评论 3 381
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 35,204评论 0 253
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 39,479评论 1 290
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 34,572评论 2 309
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 36,341评论 1 326
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 32,213评论 3 312
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 37,576评论 3 298
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 28,893评论 0 17
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 30,171评论 1 250
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 41,486评论 2 341
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 40,676评论 2 335

推荐阅读更多精彩内容