Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added support for Grafana and Graylog alerting #633

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

hvdort
Copy link

@hvdort hvdort commented Dec 24, 2024

Added support for 2 additional api calls:

Grafana (and other AlertManager based alerting tools):

/v2/sendalertmanager

No special things to do. Just create a Contactpoint of type Webhook (POST) with url pointed to http://servername:8485/v2/sendalertmanager

Graylog:

/v2/sendgraylognotification

mandatory fields in Event Definition:

  • fromnumber
  • message
  • recipients

Additional functions to process calls from Graylog or Grafana. Grafana uses the AlertManager structure, so all tools using this structure can use this.
added 2 API registrations :

/api/v2/sendalertmanager
/api/v2/sendgraylognotification
@bbernhard
Copy link
Owner

Thanks a lot for the contribution!

I really thought long about your PR and finally decided to not integrate it into the codebase. It's not about the quality of the PR, but more that those endpoints are only useful for a small number of people. And since there are a lot of different monitoring/alerting systems out there, which probably all require different API structures, we would end up with a lot of different API endpoints.

Personally I am a bit afraid of the maintenance effort and the clutter it will create in the swagger documentation. I think the core of this project should be kept as simple as possible. Nevertheless, I understand, that people want to use the API for all different tasks, which can't be accomplished due to the fixed and inflexible structure of the API.

Therefore I decided to implement a Plugin mechanism. This Plugin mechanism allows you to dynamically register custom API endpoints with arbitrary payloads. Plugins consist of a definition file and a lua script file. Have a look here for details.

The plugin mechanism will be part of the next release, but I can provide you a docker image for testing if you are interested. The idea is that people then can write their own plugins to add additional API endpoints. Any plugin contributions are greatly appreciated - so please feel free to create a PR :)

If you have any questions or need help, please let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants