You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2020/12/07 09:11:47 UTC
[GitHub] [skywalking] wuwenrufeng opened a new issue #5964: why prometheus fetcher cannot save metrics of the same name for different services
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:
![Snipaste_2020-12-07_17-05-12](https://user-images.githubusercontent.com/45844514/101331129-7eef2980-38ae-11eb-9d44-03d7c965b411.png)
- sw UI
![cSnipaste_2020-12-07_17-09-13](https://user-images.githubusercontent.com/45844514/101331467-ff158f00-38ae-11eb-9ceb-b24592d1d0a3.png)
![aSnipaste_2020-12-07_17-08-14](https://user-images.githubusercontent.com/45844514/101331478-03da4300-38af-11eb-9bdc-ef8023356440.png)
![bSnipaste_2020-12-07_17-08-31](https://user-images.githubusercontent.com/45844514/101331540-1d7b8a80-38af-11eb-9ea2-ca00e7f17918.png)
___
### 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:
users@infra.apache.org
[GitHub] [skywalking] hanahmily commented on issue #5964: why prometheus fetcher cannot save metrics of the same name for different services
Posted by GitBox <gi...@apache.org>.
hanahmily commented on issue #5964:
URL: https://github.com/apache/skywalking/issues/5964#issuecomment-739931241
@wuwenrufeng That's because you didn't **ENABLE** the second rule at https://github.com/apache/skywalking/blob/master/oap-server/server-bootstrap/src/main/resources/application.yml#L272
Even though you enable it, OAP must fail to boot due to metric name confliction like @wu-sheng 's comment, and we have the canonical solution right now -- set https://github.com/apache/skywalking/blob/b5367aa6b1390b3bc7a6549fb80eb97e49db1fae/oap-server/server-bootstrap/src/main/resources/fetcher-prom-rules/self.yaml#L42 to distinct them. And from what you show, you must run the version below 8.3.0. Pls, upgrade your OAP version to use `metricPrefix`.
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [skywalking] hanahmily closed issue #5964: why prometheus fetcher cannot save metrics of the same name for different services
Posted by GitBox <gi...@apache.org>.
hanahmily closed issue #5964:
URL: https://github.com/apache/skywalking/issues/5964
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [skywalking] wu-sheng commented on issue #5964: why prometheus fetcher cannot save metrics of the same name for different services
Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #5964:
URL: https://github.com/apache/skywalking/issues/5964#issuecomment-739786402
Yes, because they are conflicting for now. @hanahmily Do we have any chance to support this?
----------------------------------------------------------------
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:
users@infra.apache.org