Add extra dynamic values alerttransport alertmanager#13828
Merged
laf merged 5 commits intolibrenms:masterfrom Mar 14, 2022
Merged
Add extra dynamic values alerttransport alertmanager#13828laf merged 5 commits intolibrenms:masterfrom
laf merged 5 commits intolibrenms:masterfrom
Conversation
|
This pull request has been mentioned on LibreNMS Community. There might be relevant details there: https://community.librenms.org/t/add-custom-dynamic-variable-to-alertmanager-transport/18292/2 |
Contributor
Author
|
I don't know how to fix this MariaDB pipeline error... |
Member
|
Can you update the AlertManager transport docs to show an example of how people can use this please? |
Contributor
Author
|
Hello, |
|
This pull request has been mentioned on LibreNMS Community. There might be relevant details there: |
jerji
pushed a commit
to Beanfield/librenms
that referenced
this pull request
Apr 14, 2022
* Add extra dynamic values to Alert transport for Alertmanager * Add description to explain how extra dynamic values for Alertmanager works in the WebUI * Add _ in dynamic label name + fix continuous-itegration error * Fix continuous-itegration error part 2 * Updating AlertManager docs with explanation of how dynamic variables works
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello dear LibreNMS Community,
So here you are some changes to be able to add extra dynamic values to the Alert Transport for Alertmanager.
I just added a check in Alertmanager Options that allows to display any variables present in the Alert details (you can view these variables in the WebUI in Alert Notifications and details of a pending alert) if it exists.
You just have to name your Alertmanager Option to start with extra_ and then the name you want it to appears in Alertmanager. The value must be the correct variable name of the variable that you want to get.
For example for a port down you can do :
extra_int = ifName
in Alertmanager Option field in Alertmanaager Transport creation and in Alertmanager you will have :
extra_int = et-0/0/0 (or whatever)
Please tell me if there is something else to improve or to document.
Have a nice week-end!
geg347
DO NOT DELETE THE UNDERLYING TEXT
Please note
Testers
If you would like to test this pull request then please run:
./scripts/github-apply <pr_id>, i.e./scripts/github-apply 5926After you are done testing, you can remove the changes with
./scripts/github-remove. If there are schema changes, you can ask on discord how to revert.