Git Product home page Git Product logo

Comments (4)

fredgate avatar fredgate commented on May 30, 2024

Same problem. The field customer is empty in alerta using a label in prometheus alert.

I use Docker image alerta/alerta-web:8.7.0.

$ alerta version
alerta 8.7.0
alerta client 8.5.1
requests 2.26.0
click 8.0.3

It's curious because the prometheus webhook seems correct : https://github.com/alerta/alerta/blob/v8.7.0/alerta/webhooks/prometheus.py#L49

    environment = labels.pop('environment', current_app.config['DEFAULT_ENVIRONMENT'])
    customer = labels.pop('customer', None)

The customer field was introduced in alerta on Jan 11, 2019 by this commit, and always filled from the label:
alerta/alerta@aeb600d

from prometheus-config.

fredgate avatar fredgate commented on May 30, 2024

It seems that the field is correct for the alert object : we can see the correct value for the customer field in the AJAX requests that loaf alerts list, and in the data tab of the alert page.

It is a display bug in the web UI.

My UI is translated in french, can it be the cause ?
No : I changed the application settings to set the language as english, and the customer column is still empty.

from prometheus-config.

fredgate avatar fredgate commented on May 30, 2024

Solved by adding CUSTOMER_VIEWS = True in alerta configuration.

Not sure that it should be the correct behaviour. CUSTOMER_VIEWS is planned for multi-tenancy. But we want to see the value in customer column event without multi-tenancy.
To see if this condition is relevant: https://github.com/alerta/alerta-webui/blob/master/src/components/AlertList.vue#L218

<span v-if="col == 'customer' && $config.customer_views">

from prometheus-config.

aponchaut avatar aponchaut commented on May 30, 2024

Hello,

I have the same problem with the customer label.
When I put the customer as annotation, I have the value displayed in alerta_webui but it is impossible to filter by customer from the link https://alerta*/customers (the customer value don't match).
Indeed, with the annotation setting, there are 2 "Customer" fields : one empty, the second with the annotation value.

Moreover, alertad receives the value of the client annotation (with the debug mode in alertad.conf) but the postgres "alerts" table does not contain the client value (the column is empty for all alerts).

When I set the both values in the same time (annotation and label, I don't receive the alerts).

The customer filtering don't work.

alertad : 8.7.0

from prometheus-config.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.