Replies: 3 comments 8 replies
-
Service are discovered on the basis of the "refresh_interval", which you seem to use the default value of 30s. |
Beta Was this translation helpful? Give feedback.
-
@roidelapluie I understand - please note Brian's comment in referenced ticket in which I was advised to use a relabel config to avoid the same service from being rediscovered all the time. |
Beta Was this translation helpful? Give feedback.
-
So, you do not seem to be using relabeling, but you are also having different filters for all the jobs. Prometheus indeed does not reuse the same servie discovery in this case. You could try:
|
Beta Was this translation helpful? Give feedback.
-
What did you do?
Setup Prometheus with Docker Swarm Service Discovery using both Swarm basic filters and the workaround/solution provided by Brian Brazil in issue #8073 to ensure that the targets aren't constantly re-discovered
What did you expect to see?
Services not being continuously rediscovered.
What did you see instead? Under which circumstances?
Services being continuously rediscovered, leading to an extremely high network load; snippet from the Caddy container (swarm api proxy):
The example here has a 'small' response, in reality we're dealing with responses as big as "size":2995782" on the same interval as above causing unnecessary network pressure.
Environment
Prometheus version:
2.32.0-rc0, same problem exist in previous versions.
Beta Was this translation helpful? Give feedback.
All reactions