-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Search before asking
- I had searched in the issues and found no similar issues.
What happened
在我使用master分之使用LocalTest进行测试时报错。
What you expected to happen
解决方法:
修改PrometheusReport类内容
修改前:private static final String SCOPE_PREFIX = "org/apache/flink" + SCOPE_SEPARATOR;
修改后:private static final String SCOPE_PREFIX = "flink" + SCOPE_SEPARATOR;
修改后就可以正常运行啦。
不知道这个显而易见的错误是不是因为我使用的监控版本导致的。
我不确定修改SCOPE_PREFIX参数内容会不会影响其它功能正常使用。
How to reproduce
1.在chunjun-local-test模块pom中加
<dependency>
<groupId>com.dtstack.chunjun</groupId>
<artifactId>chunjun-metrics-prometheus</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.dtstack.chunjun</groupId>
<artifactId>chunjun-connector-oracle</artifactId>
<version>${project.version}</version>
</dependency>
- oracle同步到oracle json 脚本
{
"job": {
"content": [
{
"reader": {
"parameter": {
"username": "yh_dmp",
"password": "yh_dmp_yh",
"connection": [{
"jdbcUrl": ["jdbc:oracle:thin:@//xxxxxxxxxx"],
"table": ["TB_STUDENT"],
"schema": "xxxxx"
}],
"increColumn": "ID",
"startLocation": "0",
"polling": false,
"pollingInterval": 3000,
"column": [{
"name": "ID",
"type": "decimal"
},{
"name": "NAME",
"type": "string"
}]
},
"name": "oraclereader"
},
"writer": {
"name": "oraclewriter",
"parameter": {
"mode": "update",
"allReplace": true,
"username": "yh_dmp",
"password": "yh_dmp_yh",
"connection": [
{
"jdbcUrl": "jdbc:oracle:thin:@//xxxxxxx",
"table": ["TB_STUDENT_1"],
"schema": "xxxxxx"
}
],
"uniqueKey": ["ID"],
"column": [{
"name": "ID",
"type": "decimal"
},{
"name": "NAME",
"type": "string"
}]
}
}
}
],
"setting": {
"speed": {
"channel": 1,
"bytes": 0
},
"errorLimit": {
"record": 1
},
"restore": {
"maxRowNumForCheckpoint": 0,
"isRestore": true,
"restoreColumnName": "ID",
"restoreColumnIndex": 0
},
"log" : {
"isLogger": false,
"level" : "debug",
"path" : "",
"pattern":""
},
"metricPluginConf" : {
"pluginName": ""
}
}
}
}
- flink-conf.yaml 配置加参数
metrics.reporter.promgateway.factory.class: org.apache.flink.metrics.prometheus.PrometheusPushGatewayReporterFactory
metrics.reporter.promgateway.hostUrl: http://xxxxxx:9091
metrics.reporter.promgateway.jobName: myJob
metrics.reporter.promgateway.randomJobNameSuffix: true
metrics.reporter.promgateway.deleteOnShutdown: false
#metrics.reporter.promgateway.groupingKey: k1=v1;k2=v2
metrics.reporter.promgateway.interval: 60 SECONDS
Anything else
监控安装版本:
prometheus-2.38.0.linux-arm64.tar.gz
pushgateway-1.6.0.linux-arm64.tar.gz
Version
master
Are you willing to submit PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working

