
APPID on the Account Info page.Configuration Item | Default Value | Data Type | Description | Suggestion |
metrics.reporter.promgateway.class | None | String | Name of the Java class for exporting metrics to Pushgateway | - |
metrics.reporter.promgateway.jobName | None | String | Push task name | Specify an easily understandable string |
metrics.reporter.promgateway.randomJobNameSuffix | true | Boolean | Whether to add a random string after the task name | Set it to `true`. If no random string is added, metrics of different Flink tasks will overwrite each other |
metrics.reporter.promgateway.groupingKey | None | String | Global label added to each metric in the format of `k1=v1;k2=v2` | Add the EMR instance ID to distinguish between the data of different instances, such as `instance_id=emr-xxx` |
metrics.reporter.promgateway.interval | None | Time | Time interval for pushing metrics, such as 30s | We recommend you set the value to about 1 minute |
metrics.reporter.promgateway.host | None | String | Pushgateway service address | It is the service address of the TMP instance in the console |
metrics.reporter.promgateway.port | -1 | Integer | Pushgateway service port | It is the port of the TMP instance in the console |
metrics.reporter.promgateway.needBasicAuth | false | Boolean | Whether the Pushgateway service requires authentication | Set it to `true`, as the Pushgateway of TMP requires authentication |
metrics.reporter.promgateway.user | None | String | Username for authentication | |
metrics.reporter.promgateway.password | None | String | Password for authentication | It is the access token of the TMP instance in the console |
metrics.reporter.promgateway.deleteOnShutdown | true | Boolean | Whether to delete the corresponding metrics on the Pushgateway after the Flink task is completed | Set it to `true` |
metrics.reporter.promgateway.class: org.apache.flink.metrics.prometheus.PrometheusPushGatewayReportermetrics.reporter.promgateway.jobName: climatePredictmetrics.reporter.promgateway.randomJobNameSuffix:truemetrics.reporter.promgateway.interval: 60 SECONDSmetrics.reporter.promgateway.groupingKey:instance_id=emr-xxxxmetrics.reporter.promgateway.host: 172.xx.xx.xxmetrics.reporter.promgateway.port: 9090metrics.reporter.promgateway.needBasicAuth: truemetrics.reporter.promgateway.user: appidmetrics.reporter.promgateway.password: token
cd /usr/local/service/flink/librm flink-metrics-prometheus*jar
cd /usr/local/service/flink/libwget https://rig-1258344699.cos.ap-guangzhou.myqcloud.com/flink/flink-metrics-prometheus_2.11-auth.jar -O flink-metrics-prometheus_2.11-auth.jar
flink run command on the master node to submit a new task and view the task log:grep metrics /usr/local/service/flink/log/flink-hadoop-client-*.log







Was this page helpful?
You can also Contact sales or Submit a Ticket for help.
Help us improve! Rate your documentation experience in 5 mins.
Feedback