You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/10/11 08:23:57 UTC
[GitHub] [apisix] nic-6443 opened a new issue #5194: docs: Optimize the sample configuration of prometheus job
nic-6443 opened a new issue #5194:
URL: https://github.com/apache/apisix/issues/5194
### Improved or typo fixed.
Now the sample configuration of prometheus job is as follows:
```yaml
scrape_configs:
- job_name: "apisix"
metrics_path: "/apisix/prometheus/metrics"
static_configs:
- targets: ["127.0.0.1:9091"]
```
Such a configuration will inherit the `scrape_interval` in the global configuration of prometheus.
At the same time, the minimum time window of the `rate` function in the grafana dashboard provided is 30s.
`sum(rate(apisix_bandwidth{instance=~"$instance"}[30s])) by (type)`
Based on the above two points, if the `scrape_interval` in the user's prometheus global configuration is greater than 15s, the `rate` function may not calculate the result at some point in time, causing the dashboard to be unavailable.
### Solution
Specify `scrape_interval` in the sample configuration
```yaml
scrape_configs:
- job_name: "apisix"
scrape_interval: 15s
metrics_path: "/apisix/prometheus/metrics"
static_configs:
- targets: ["127.0.0.1:9091"]
```
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] nic-6443 commented on issue #5194: docs: Optimize the sample configuration of prometheus job
Posted by GitBox <gi...@apache.org>.
nic-6443 commented on issue #5194:
URL: https://github.com/apache/apisix/issues/5194#issuecomment-939852129
> The example of the documentation (including the grafana dashboard), is only an example. It doesn't mean you should do it like that. We can accept the PR, however, we should mention that the configuration is just an example.
Ok, add some comments after the `scrape_interval` configuration to illustrate the relationship with the rate function. Do you think it is ok?
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] spacewander closed issue #5194: docs: Optimize the sample configuration of prometheus job
Posted by GitBox <gi...@apache.org>.
spacewander closed issue #5194:
URL: https://github.com/apache/apisix/issues/5194
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] spacewander commented on issue #5194: docs: Optimize the sample configuration of prometheus job
Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #5194:
URL: https://github.com/apache/apisix/issues/5194#issuecomment-939826773
The example of the documentation (including the grafana dashboard), is only an example. It doesn't mean you should do it like that. We can accept the PR, however, we should mention that the configuration is just an example.
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org