wuwenrufeng opened a new issue #5964:
URL: https://github.com/apache/skywalking/issues/5964
Please answer these questions before submitting your issue.
- Why do you submit this issue?
- Question or discussion
___
### Question
- What do you want to know?
why prometheus fetcher cannot save metrics of the same name for different
services
- What happened?
I added two files in the $CLASSPATH/fetcher-prom-rules, first service
name is a_server,second service name is b_server, and they have same metirc
name(instance_count), but i only get first metrics.
- t1.yaml
```yaml
fetcherInterval: PT30S
fetcherTimeout: PT10S
metricsPath: /metrics
staticConfig:
# targets will be labeled as "instance"
targets:
- url: http://172.31.1.116:5000/metrics
sslCaFilePath:
labels:
service: a_server
defaultMetricLevel: instance(['service'], ['instance'])
metricsRules:
- name: instance_count
exp: latest count.tagEqual('name', 'beijing')
```
- t2.yaml
```yaml
fetcherInterval: PT30S
fetcherTimeout: PT10S
metricsPath: /metrics
staticConfig:
# targets will be labeled as "instance"
targets:
- url: http://172.31.1.116:5000/metrics
sslCaFilePath:
labels:
service: b_server
defaultMetricLevel: instance(['service'], ['instance'])
metricsRules:
- name: instance_count
exp: latest count.tagEqual('name', 'tianjin')
```
- es backend:

- sw UI



___
### Requirement or improvement
- Please describe your requirements or improvement suggestions.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]