Hi,

On 10/13/20 12:22 PM, li yun wrote:
> For example, the following situation
> *isphone{name="user",exname~"13"}*
> This exname program will continuously collect a lot of monitoring
> indicators, but I want to know which indicators have been added in a
> certain period of time
> 在2020年10月13日星期二 UTC+8 下午6:19:15<li yun> 写道:
> 
>     Hello everyone, I have encountered some problems in the process of
>     using prometheus. There are many monitoring indicators. I used the
>     service discovery method. I need to know which indicators are newly
>     added by service discovery in a certain period of time. May I ask
>     this prometheus Can it be done?

You can ask Prometheus to return those metrics which do exist now and
haven't existed some time ago. Example for 1 hour:


        isphone{name="user",exname~"13"} unless
isphone{name="user",exname~"13"} offset 1h

Note: It sounds like you might be putting rather dynamical data
(exname?) into labels. This may lead to cardinality issues. Be sure to
implement some safeguards and/or beware of the potential resource
requirements.

Kind regards,
Christian

-- 
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/e93aeffb-1d7b-175d-be04-405be5a526bd%40hoffmann-christian.info.

Reply via email to