Hi I am running a freshly installed LibreNMS on Ubuntu 20.04. Alerting works fine with the built in email alerting. When I use hte Alert Transport Template for using a web API for alerting it seems the template variables are not interpreted. Am I doing something wrong or is this a bug?
In the screenshot below I have scrolled down to the line that gets to be the message. There is also a key and a phonenumber as options, but there is no need to share that with the world
Are you sure that Alert Template variables should work in Alert Transports ? I was under the impression they are only for Alert Templates, which is where you format what your alert subject and body looks like.
Although I don’t use the API transport type, (only Email and Pushover) I would assume that the Alert Transport is only to configure the delivery of messages via the API not to configure how the messages appear.
Formatting of the messages and delivering information by way of Alert Template variables is done using the Alert Templates that are attached to the Alert rules.
Alert Rules → What events trigger alerts, in other words alert criteria.
Alert Templates → How alert data is presented and formatted and which data is sent in the alert (variables etc) These are attached to specific Alert Rules.
Alert Transports → How to deliver the alert, eg email server, push notification, API etc. These are also attached to specific Alert Rules.