Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add Prometheus exporter metrics parser and IoTDB monitor #505

Merged
merged 23 commits into from
Dec 20, 2022

Conversation

Ceilzcx
Copy link
Contributor

@Ceilzcx Ceilzcx commented Dec 19, 2022

add Prometheus exporter metrics parser and IoTDB monitor

@Ceilzcx Ceilzcx changed the title Feature#exporter add Prometheus exporter metrics parser and IoTDB monitor Dec 19, 2022
@Ceilzcx Ceilzcx self-assigned this Dec 19, 2022
@Ceilzcx Ceilzcx linked an issue Dec 19, 2022 that may be closed by this pull request
Copy link
Contributor

@tomsun28 tomsun28 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great!

@tomsun28 tomsun28 merged commit b1806f0 into dev Dec 20, 2022
@tomsun28 tomsun28 deleted the feature#exporter branch December 20, 2022 06:47
@jvhuaxia
Copy link

我想问下有怎么使用这个解析器的文档吗

@jvhuaxia
Copy link

或者demo配制

@hertzbeat
Copy link
Contributor

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


I would like to ask is there any documentation on how to use this parser?

@hertzbeat
Copy link
Contributor

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Or demo preparation

@jvhuaxia
Copy link

go_gc_duration_seconds{quantile="0"} 1.9375e-05
go_gc_duration_seconds{quantile="0.25"} 2.9193e-05
go_gc_duration_seconds{quantile="0.5"} 7.6545e-05
go_gc_duration_seconds{quantile="0.75"} 0.000219552
go_gc_duration_seconds{quantile="1"} 0.013086794
go_gc_duration_seconds_sum 0.046681065
go_gc_duration_seconds_count 78

类似于这样的数据 我要怎么写yml

@hertzbeat
Copy link
Contributor

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


go_gc_duration_seconds{quantile="0"} 1.9375e-05
go_gc_duration_seconds{quantile="0.25"} 2.9193e-05
go_gc_duration_seconds{quantile="0.5"} 7.6545e-05
go_gc_duration_seconds{quantile="0.75"} 0.000219552
go_gc_duration_seconds{quantile="1"} 0.013086794
go_gc_duration_seconds_sum 0.046681065
go_gc_duration_seconds_count 78

How do I write yml for data similar to this

@Ceilzcx
Copy link
Contributor Author

Ceilzcx commented Jan 18, 2023

go_gc_duration_seconds{quantile="0"} 1.9375e-05 go_gc_duration_seconds{quantile="0.25"} 2.9193e-05 go_gc_duration_seconds{quantile="0.5"} 7.6545e-05 go_gc_duration_seconds{quantile="0.75"} 0.000219552 go_gc_duration_seconds{quantile="1"} 0.013086794 go_gc_duration_seconds_sum 0.046681065 go_gc_duration_seconds_count 78

类似于这样的数据 我要怎么写yml

您好,这个暂时没法用yml写。应该是summary类型的数据吧,summary和Histogram这两个类型都没做yml的解析。目前只做了exporter的解析,参考类:com.usthe.collector.collect.http.promethus.exporter.ExporterParser。如果您有思路的话,可以修改一下代码,并提交pr,原本没做的原因是想不到好的办法进行展示这类数据,参考方法:com.usthe.collector.collect.http.HttpCollectImpl#parseResponseByPrometheusExporter

@jvhuaxia
Copy link

知道了 谢谢你的解答

@hertzbeat
Copy link
Contributor

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Got it, thank you for your answer

@jvhuaxia
Copy link

app-iotdb.yml 我看到这里用了prometheus这个类型解析返回值,
请问可不可以看下这个解析的数据是什么样子

@hertzbeat
Copy link
Contributor

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


app-iotdb.yml I see that the type of prometheus is used here to parse the return value,
Could you please see what the parsed data looks like?

@Ceilzcx
Copy link
Contributor Author

Ceilzcx commented Jan 19, 2023

app-iotdb.yml 我看到这里用了prometheus这个类型解析返回值, 请问可不可以看下这个解析的数据是什么样子

你说的解析数据是什么?exporter接口的数据还是com.usthe.collector.collect.http.promethus.exporter.MetricFamily这个实体类。你想看的话,我还是建议你自己下一个IoTDB看一下exporter的接口,然后debug一下代码
数据格式和如何配置Prometheus exporter接口可以参考:https://iotdb.apache.org/zh/UserGuide/Master/Monitor-Alert/Metric-Tool.html
有其他需要了解的话你可以直接加我微信(15669032560),这个我不一定有时间看到

tomsun28 pushed a commit that referenced this pull request Jan 16, 2024
…505)

* prometheus exporter metrics parser

* prometheus exporter metrics parser

* prometheus exporter metrics parser

* prometheus exporter metrics parser

* optimize ExporterParser.java

* optimize ExporterParser.java

* optimize ExporterParser.java

* handle INF parser

* 添加iotdb的exporter方式监听

* [manager] iotdb monitor add cluster_node_status metric

* [manager] fix actuator mail health check error when startup

* [manager] use prometheus instead of prometheus_exporter

* [manager] add iotdb monitoring metrics

* [collector] add metric type - info, update parser

* [collector] update

* ExporterParser change to singleton mode

* add ExporterParser currentMetricFamily

* 格式化优化代码, 使用map管理ExporterParser防止无限制创建对象, 使用锁机制反正多线程读写冲突

* 修改注解格式

* 格式化注解

* 修改注解格式

* 解决魔法数问题
tomsun28 pushed a commit that referenced this pull request Mar 9, 2024
…505)

* prometheus exporter metrics parser

* prometheus exporter metrics parser

* prometheus exporter metrics parser

* prometheus exporter metrics parser

* optimize ExporterParser.java

* optimize ExporterParser.java

* optimize ExporterParser.java

* handle INF parser

* 添加iotdb的exporter方式监听

* [manager] iotdb monitor add cluster_node_status metric

* [manager] fix actuator mail health check error when startup

* [manager] use prometheus instead of prometheus_exporter

* [manager] add iotdb monitoring metrics

* [collector] add metric type - info, update parser

* [collector] update

* ExporterParser change to singleton mode

* add ExporterParser currentMetricFamily

* 格式化优化代码, 使用map管理ExporterParser防止无限制创建对象, 使用锁机制反正多线程读写冲突

* 修改注解格式

* 格式化注解

* 修改注解格式

* 解决魔法数问题
tomsun28 pushed a commit that referenced this pull request Mar 9, 2024
…505)

* prometheus exporter metrics parser

* prometheus exporter metrics parser

* prometheus exporter metrics parser

* prometheus exporter metrics parser

* optimize ExporterParser.java

* optimize ExporterParser.java

* optimize ExporterParser.java

* handle INF parser

* 添加iotdb的exporter方式监听

* [manager] iotdb monitor add cluster_node_status metric

* [manager] fix actuator mail health check error when startup

* [manager] use prometheus instead of prometheus_exporter

* [manager] add iotdb monitoring metrics

* [collector] add metric type - info, update parser

* [collector] update

* ExporterParser change to singleton mode

* add ExporterParser currentMetricFamily

* 格式化优化代码, 使用map管理ExporterParser防止无限制创建对象, 使用锁机制反正多线程读写冲突

* 修改注解格式

* 格式化注解

* 修改注解格式

* 解决魔法数问题
tomsun28 pushed a commit that referenced this pull request Mar 10, 2024
…505)

  prometheus exporter metrics parser

  prometheus exporter metrics parser

  prometheus exporter metrics parser

  prometheus exporter metrics parser

  optimize ExporterParser.java

  optimize ExporterParser.java

  optimize ExporterParser.java

  handle INF parser

  添加iotdb的exporter方式监听

  [manager] iotdb monitor add cluster_node_status metric

  [manager] fix actuator mail health check error when startup

  [manager] use prometheus instead of prometheus_exporter

  [manager] add iotdb monitoring metrics

  [collector] add metric type - info, update parser

  [collector] update

  ExporterParser change to singleton mode

  add ExporterParser currentMetricFamily

  格式 优 代码, 使用map管理ExporterParser防止无限制创建对象, 使用锁机制反正多线程读写冲突

  修改注解格式

  格式 注解

  修改注解格式

  解决魔法数问题
tomsun28 pushed a commit that referenced this pull request Mar 10, 2024
…505)

  prometheus exporter metrics parser

  prometheus exporter metrics parser

  prometheus exporter metrics parser

  prometheus exporter metrics parser

  optimize ExporterParser.java

  optimize ExporterParser.java

  optimize ExporterParser.java

  handle INF parser

  添加iotdb的exporter方式监听

  [manager] iotdb monitor add cluster_node_status metric

  [manager] fix actuator mail health check error when startup

  [manager] use prometheus instead of prometheus_exporter

  [manager] add iotdb monitoring metrics

  [collector] add metric type - info, update parser

  [collector] update

  ExporterParser change to singleton mode

  add ExporterParser currentMetricFamily

  格式 优 代码, 使用map管理ExporterParser防止无限制创建对象, 使用锁机制反正多线程读写冲突

  修改注解格式

  格式 注解

  修改注解格式

  解决魔法数问题
tomsun28 pushed a commit that referenced this pull request Mar 11, 2024
…505)

  prometheus exporter metrics parser

  prometheus exporter metrics parser

  prometheus exporter metrics parser

  prometheus exporter metrics parser

  optimize ExporterParser.java

  optimize ExporterParser.java

  optimize ExporterParser.java

  handle INF parser

  添加iotdb的exporter方式监听

  [manager] iotdb monitor add cluster_node_status metric

  [manager] fix actuator mail health check error when startup

  [manager] use prometheus instead of prometheus_exporter

  [manager] add iotdb monitoring metrics

  [collector] add metric type - info, update parser

  [collector] update

  ExporterParser change to singleton mode

  add ExporterParser currentMetricFamily

  格式 优 代码, 使用map管理ExporterParser防止无限制创建对象, 使用锁机制反正多线程读写冲突

  修改注解格式

  格式 注解

  修改注解格式

  解决魔法数问题
tomsun28 pushed a commit that referenced this pull request Mar 11, 2024
…505)

  prometheus exporter metrics parser

  prometheus exporter metrics parser

  prometheus exporter metrics parser

  prometheus exporter metrics parser

  optimize ExporterParser.java

  optimize ExporterParser.java

  optimize ExporterParser.java

  handle INF parser

  添加iotdb的exporter方式监听

  [manager] iotdb monitor add cluster_node_status metric

  [manager] fix actuator mail health check error when startup

  [manager] use prometheus instead of prometheus_exporter

  [manager] add iotdb monitoring metrics

  [collector] add metric type - info, update parser

  [collector] update

  ExporterParser change to singleton mode

  add ExporterParser currentMetricFamily

  格式 优 代码, 使用map管理ExporterParser防止无限制创建对象, 使用锁机制反正多线程读写冲突

  修改注解格式

  格式 注解

  修改注解格式

  解决魔法数问题
tomsun28 pushed a commit that referenced this pull request Mar 11, 2024
…505)

  prometheus exporter metrics parser

  prometheus exporter metrics parser

  prometheus exporter metrics parser

  prometheus exporter metrics parser

  optimize ExporterParser.java

  optimize ExporterParser.java

  optimize ExporterParser.java

  handle INF parser

  添加iotdb的exporter方式监听

  [manager] iotdb monitor add cluster_node_status metric

  [manager] fix actuator mail health check error when startup

  [manager] use prometheus instead of prometheus_exporter

  [manager] add iotdb monitoring metrics

  [collector] add metric type - info, update parser

  [collector] update

  ExporterParser change to singleton mode

  add ExporterParser currentMetricFamily

  格式 优 代码, 使用map管理ExporterParser防止无限制创建对象, 使用锁机制反正多线程读写冲突

  修改注解格式

  格式 注解

  修改注解格式

  解决魔法数问题
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Task] add Prometheus exporter feature
4 participants