Git Product home page Git Product logo

Comments (6)

satterly avatar satterly commented on May 31, 2024 7

The environment label must match an allowed environment. By default this is either Production or Development. You also must define a service but it doesn't matter what it is as long as it's not null.

from alerta-docs.

fajfer avatar fajfer commented on May 31, 2024 1

Absolute gamechanger for me, thank you! For other people viewing this - remember the labels are case sensitive - eg. you can't write "production", it has to be "Production" (at least in my case)

from alerta-docs.

satterly avatar satterly commented on May 31, 2024

I agree that returning a 403 Forbidden status code from the Reject plugin is confusing. This should be a 400 Bad Request indicating to the client that authentication was successful but the request was malformed for some reason.

from alerta-docs.

fajfer avatar fajfer commented on May 31, 2024

I have the exact same problem but I always had environment label, what am I missing?

from alerta-docs.

satterly avatar satterly commented on May 31, 2024

When the Alerta API starts up now it will print the following to logfiles or stdout...

2018-11-27 12:04:31,349 - alerta.plugins[34323]: DEBUG - Server plugin 'reject' installed. [in /Users/nsatterl/Projects/alerta/alerta/utils/plugin.py:30]
2018-11-27 12:04:31,353 - flask.app[34323]: INFO -

    Default reject policy will block alerts that do not have the following
    required attributes:
    1) environment - must match an allowed environment. By default it should
       be either "Production" or "Development". Config setting is `ALLOWED_ENVIRONMENTS`.
    2) service - must supply a value for service. Any value is acceptable.

 [in /Users/nsatterl/Projects/alerta/alerta/plugins/__init__.py:18]
2018-11-27 12:04:31,353 - alerta.plugins[34323]: INFO - Server plugin 'reject' enabled. [in /Users/nsatterl/Projects/alerta/alerta/utils/plugin.py:38]

from alerta-docs.

satterly avatar satterly commented on May 31, 2024

Also note that there is a FAQ where this is mentioned and multiple places in the online docs.

from alerta-docs.

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.