[prometheus-users] Prometheus Talk with other web UI

2021-12-06 Thread nina guo
Hi, Is there a way for Prometheus to talk with other web UI to get the real-time status of targets? -- 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

Re: [prometheus-users] Re: Mutiple PromQLs for each expr in alert rules

2021-12-06 Thread nina guo
in container_cpu_usage_seconds_total, there are following labels: instance name kubernetes_io_arch hostname job cpu (the value of this label is "total") On Tuesday, December 7, 2021 at 10:15:15 AM UTC+8 nina guo wrote: > Thank you. > > in container_cpu_usage_seconds_total, there are following

Re: [prometheus-users] Re: Mutiple PromQLs for each expr in alert rules

2021-12-06 Thread nina guo
Thank you. in container_cpu_usage_seconds_total, there are following labels: instance name kubernetes_io_arch hostname job On Monday, December 6, 2021 at 5:54:08 PM UTC+8 Stuart Clark wrote: > On 06/12/2021 08:43, nina guo wrote: > > May I ask how to check all the available labels for this?

[prometheus-users] Re: Debugging email_configs in Alertmanager

2021-12-06 Thread Brian Candler
By looking in logs in your SMTP server By checking if an E-mail is received By running alertmanager with --log.level=debug and looking at its output By looking at the metrics which alertmanager gives: curl localhost:9093/metrics | grep email On Monday, 6 December 2021 at 19:06:49 UTC

[prometheus-users] Debugging email_configs in Alertmanager

2021-12-06 Thread Renan Campos
Given that an Alertmanager receiver is properly configured with an email_configs clause, how can it be verified that the smtp server is receiving a valid call from Alertmanager? -- You received this message because you are subscribed to the Google Groups "Prometheus Users" group. To unsubscribe

[prometheus-users] Re: Question about @ operator

2021-12-06 Thread Brian Candler
You are evaluating the PromQL query "scrape_duration_seconds{job="prometheus"}@1637919561" at time 1638787945.238 That seems perfectly consistent to me. A simple instant vector query, like "up", evaluates the expression at some specific instant in time T (by default, the current time). The

[prometheus-users] Question about @ operator

2021-12-06 Thread Helio Loureiro
Hi, We were given a try on the new @ operator, but we got uncanny results. First using time: $ curl -s ' http://localhost:9090/api/v1/query?query=scrape_duration_seconds%7Bjob= "prometheus"%7D=2021-11-26T09:39:21.000Z' | jq . { "status": "success", "data": { "resultType": "vector",

Re: [prometheus-users] Re: Mutiple PromQLs for each expr in alert rules

2021-12-06 Thread Stuart Clark
On 06/12/2021 08:43, nina guo wrote: May I ask how to check all the available labels for this? Can we define new labels? For instances, we use file discovery to get the monitored target list. Just enter the metric name in the query page of the Prometheus UI and you'll see all the different

Re: [prometheus-users] Re: Mutiple PromQLs for each expr in alert rules

2021-12-06 Thread nina guo
May I ask how to check all the available labels for this? Can we define new labels? For instances, we use file discovery to get the monitored target list. On Monday, December 6, 2021 at 4:29:27 PM UTC+8 Stuart Clark wrote: > On 06/12/2021 08:19, nina guo wrote: > > Thank you for your reply. >

Re: [prometheus-users] Re: Mutiple PromQLs for each expr in alert rules

2021-12-06 Thread Stuart Clark
On 06/12/2021 08:19, nina guo wrote: Thank you for your reply. Let me clarify what we are going to do more. We have the following alert rules for a container. But we still want to include the CPU usage of the corresponding host which host this container. That is:  - when CPU usage for

[prometheus-users] Re: Mutiple PromQLs for each expr in alert rules

2021-12-06 Thread nina guo
Thank you for your reply. Let me clarify what we are going to do more. We have the following alert rules for a container. But we still want to include the CPU usage of the corresponding host which host this container. That is: - when CPU usage for container is larger than 85%, and CPU usage

[prometheus-users] Re: Mutiple PromQLs for each expr in alert rules

2021-12-06 Thread Brian Candler
Yes, but you need to be really clear on what you're doing. What you need to realise is that this is a *vector* expression: expr: containerCPUusage > 80 This may return zero, one, or many results in a vector: that is, a set of all timeseries with metric name "containerCPUusage" that meet

Re: [prometheus-users] Mutiple PromQLs for each expr in alert rules

2021-12-06 Thread Henrik Peng
you can combine them in a monitor rather than in a alert. On 2021/12/6 3:58, nina guo wrote: expr: if containerCPUusage>80 and serverCPUusge>80 -- You received this message because you are subscribed to the Google Groups "Prometheus Users" group. To unsubscribe from this group and stop