Re: [prometheus-users] questions about testing patterns and metric registration in Go

2020-04-04 Thread Victor Watkins
Thanks for sharing your wisdom and for correcting my misunderstanding about registering from init causing duplicate registration. I demonstrated both collectors as package level variables (package flipper) and struct members (package flopper) at https://github.com/vickleford/promex as an

Re: [prometheus-users] AlertManager firing duplicate alerts

2020-04-04 Thread Sagar
Thank you so much for the pointer Christian. It resolved the issue. Thanks Sunil Sagar On Sun, Apr 5, 2020 at 12:58 AM Christian Hoffmann < m...@hoffmann-christian.info> wrote: > On 4/4/20 6:42 PM, Sagar wrote: > > relabel_configs: > > - action: drop > >source_labels:

Re: [prometheus-users] AlertManager Silence Regex

2020-04-04 Thread Christian Hoffmann
Hi, On 4/4/20 6:54 PM, Adso Castro wrote: > I'm trying to create a silence using regex from the AlertManager UI and > I want to silence alarms from deployments (from my Kubernetes cluster) > like below: > > *new-batch-stream-**g1343* > *super-batch-pipeline-g1273* > * > * > The match would be

Re: [prometheus-users] AlertManager firing duplicate alerts

2020-04-04 Thread Christian Hoffmann
On 4/4/20 6:42 PM, Sagar wrote: >      relabel_configs: >      - action: drop >        source_labels: [replica] >        regex: (.*) [...] > > For other server, replica is secondary  > I want to drop only label in alert manager , but it drops entire alert > in alert_manager.  Ah, now I see the

[prometheus-users] AlertManager Silence Regex

2020-04-04 Thread Adso Castro
Hi all, I'm trying to create a silence using regex from the AlertManager UI and I want to silence alarms from deployments (from my Kubernetes cluster) like below: *new-batch-stream-**g1343* *super-batch-pipeline-g1273* The match would be the word "batch". I've tried a few times using the

Re: [prometheus-users] AlertManager firing duplicate alerts

2020-04-04 Thread Sagar
Hi Christian, Thank you for the helping hand . My prometheus.yml file looks like this : global: external_labels: dc: europe replica: primary alerting: alertmanagers: - static_configs: - targets: - am:9093 relabel_configs: - action: drop

Re: [prometheus-users] Prometheus and rolling update services

2020-04-04 Thread Ivan Pohodnya
It is marathon_sd_config ( https://prometheus.io/docs/prometheus/latest/configuration/configuration/#marathon_sd_config), prometheus get instances from service discovery (marathon), and call them directly, i think it something wrong with prometheus merathon_sd module. суббота, 4 апреля 2020

Re: [prometheus-users] Prometheus and rolling update services

2020-04-04 Thread Ben Kochie
I assume you're hitting the metrics through some kind of load balancer. Prometheus assumes direct access to each instance of an application, rather than through a load balancer. On Sat, Apr 4, 2020 at 2:53 PM Ivan Pohodnya wrote: > > Hello everyone, i have question about rolling update

[prometheus-users] Re: Writing prometheus test with metric operations/function

2020-04-04 Thread Brian Candler
On Saturday, 4 April 2020 10:43:27 UTC+1, Belmark Caday wrote: > > Here are the udpdated tests : > > - series: 'node_filesystem_free{fstype="ext4"}' >values: '1+0x120' > > - expr: 'predict_linear(node_filesystem_free{fstype!~"tmpfs"}[1h], 4 * > 3600) > 0'

[prometheus-users] Re: Writing prometheus test with metric operations/function

2020-04-04 Thread Belmark Caday
Here are the udpdated tests : - series: 'node_filesystem_free{fstype="ext4"}' values: '1+0x120' - expr: 'predict_linear(node_filesystem_free{fstype!~"tmpfs"}[1h], 4 * 3600) > 0'

[prometheus-users] Re: Writing prometheus test with metric operations/function

2020-04-04 Thread Belmark Caday
Here are the test's ive updated : Series and values: [image: Capture1.PNG] Expr : [image: Capture2.PNG] And here is the error message : [image: Capture3.PNG] On Saturday, April 4, 2020 at 5:05:49 PM UTC+8, Brian Candler wrote: > > Put at least two data points in the time series. > --

[prometheus-users] Re: Writing prometheus test with metric operations/function

2020-04-04 Thread Brian Candler
Put at least two data points in the time series. -- 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 prometheus-users+unsubscr...@googlegroups.com. To view this

Re: [prometheus-users] questions about testing patterns and metric registration in Go

2020-04-04 Thread Brian Brazil
On Sat, 4 Apr 2020 at 00:27, Victor Watkins wrote: > Hi! This question is about best practices for testing applications that > use client_golang to instrument with custom metrics and avoiding the > dreaded "duplicate metrics collector registration attempted". > > Let's say I have an HTTP handler