Comments (10)
你把 telegraf.conf 发出来看看,看字面意思是 Telegraf 收集的时间超过 5s 了,先确认 Influx DB 正常启动了
from myperf4j.
你好,Influx DB 正常使用,telegraf.conf配置如下:
[global_tags]
dc = ""
[agent]
interval = "5s"
round_interval = true
metric_batch_size = 1000
metric_buffer_limit = 1000
flush_buffer_when_full = true
collection_jitter = "0s"
flush_interval = "1s"
flush_jitter = "0s"
debug = false
quiet = false
#logfile = "logs/telegraf.log"
logfile = ""
hostname = ""
[[outputs.influxdb]]
urls = ["http://127.0.0.1:8086"] # required
database = "MyPerf4J_Test" # required
precision = "s"
timeout = "5s"
retention_policy = ""
write_consistency = "any"
[[inputs.tail]]
files = ["D:/0/jiankong/MyPerf4J-ASM/logs/**.log"]
from_beginning = false
pipe = false
watch_method = "inotify"
data_format = "influx"
MyPerf4J-ASM 日志文件有5个,测试的日志不多应该不会超时。
class_metrics.log
gc_metrics.log
memory_metrics.log
method_metrics.log
thread_metrics.log
from myperf4j.
使用的Telegraf 版本是1.8.1,Influx DB版本是1.6.3
from myperf4j.
你好,建议如下:
- 把Telegraf 的log配置上,看看有没有详细的错误信息
- 确认 InfluxDB 的 8086 端口是否打开了
from myperf4j.
发现是telegraf.conf 配置的问题, [[inputs.tail]]中的files修改如下
files = ["D:/0/jiankong/MyPerf4J-ASM/logs/**.log"]
==>
files = ["D:/0/jiankong/MyPerf4J-ASM/logs/*.log"]
这样既可采集日志。
另发现个问题,不知道是不是bug。
method_metrics.log 文件每整点生成一次,生成后日志后继续写入日志,发现文件修改时间未修改,
这样用inputs.tail 无法进行日志采集
在InfluxDB 中执行
show measurements
没有method_metrics这张表,只有其他四张表:
from myperf4j.
看看 Telegraf 的日志是否有解析 LineProtocol 错误的信息。
MyPerf4J 会根据配置文件中的 LogRollingTimeUnit
来滚动日志文件,所有的日志文件都是一样的,理论上不应该出现 "文件修改时间未修改" 的情况。
方便把 MyPerf4JPropFile
的内容发出来么?
from myperf4j.
你好,发现也是telegraf.conf 配置的问题,[[inputs.tail]]的watch_method 参数做如下修改,日志采集就正常了。
## Method used to watch for file updates. Can be either "inotify" or "poll".
watch_method = "inotify"
==>
watch_method = "poll"
不过,不太理解这两个的区别。
日志文件文件修改时间未改变应该是正常的,修改为watch_method = "poll",日志的时间都是不变的,但日志采集正常
from myperf4j.
你好,我也不太清楚 poll 和 inotify 的区别,但是我在 macOS 和 Linux 上都是使用 inotify 日志采集都是正常的,并且日志正常滚动,日志文件的 modify time 也是定格在滚动的那一分钟。
from myperf4j.
您好,mac os 使用 watch_method = "poll" 才收集到日志。Telegraf 1.9.4
from myperf4j.
@javmain 你好,那就奇怪了,我在 macOS 和 Linux 上采用的是同一个配置,都没遇到问题,可能和软件的版本有关系吧
from myperf4j.
Related Issues (20)
- grafana没有数据,怎么排查influxdb是否写入成功? HOT 9
- Flaky test testMultiThread4HighRace and testMultiThread4LowRace HOT 1
- 请问 http.influxdb 可以支持 influxdb V2.0 的 token模式吗 HOT 2
- influxdb表中写入了数据,grafana页面使用MyPerf4J模板无法展示数据 HOT 5
- 已经整合了grafana、influxdb,MyPerf4J已经往influxdb表中写入了数据,grafana页面使用MyPerf4J模板无法展示数据 HOT 5
- 请问不同应用是否可复用同一配置文件,app_name如何设置 HOT 3
- 是否支持Promethus 以及对应配置模板 HOT 1
- 使用influxdb 2.x以上,怎么配置才能链接 HOT 3
- 应用启动报错 HOT 1
- tomcat8.5没有打出日志 HOT 8
- window环境下配置文件路径获取错误 HOT 1
- 关于ASM COMPUTE_FRAMES COMPUTE_MAXS的讨论 HOT 22
- File.renameTo及File.setReadOnly的问题 HOT 6
- 请问可否加入接口的耗时统计,统计系统每个接口性能测试中时间 HOT 8
- 你好,请问这个工具,可以跟踪到k8s容器里面的JVM的各种信息吗? HOT 1
- 希望支持一下jdk-17 HOT 3
- MyPer4j支持异步模型的jvm进程监控吗,例如webflux HOT 1
- 你好 请问SpringMVC的项目支持嘛 HOT 2
- 你好,请问可否把配置文件做成一个UI界面的操作,方便管理 HOT 3
- WIKI文档里面的http配置 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from myperf4j.