On 2020-05-11 10:47, li yun wrote:
My instances are all public IP addresses. I hope that the instance returned when querying data is a hidden or disguised instance. Is there any way to do it? For example, the following return: {"status": "success", "data": {"resultType": "matrix", "result": [{"metric": {"server": "beijing", "direction": "price", " exchange ":" beijing "," instance ":" 127.0.0.1:20942","job":"20942 "}I hope to become: {"status": "success", "data": {"resultType": "matrix", "result": [{"metric": {"server": "beijing", "direction": "price", " exchange ":" beijing "," instance ":" hidden "," job ":" 20942 "}
You can adjust your metrics during scraping using relabling rules, however you do still need some unique instance type label to allow it to work (so you couldn't just drop the instance label).
Depending on the service discovery method you are using, you could use a hostname or tag instead of the IP address?
-- Stuart Clark -- You received this message because you are subscribed to the Google Groups "Prometheus Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/a9f97270d7421481b58ca66359a7f9de%40Jahingo.com.

