Alert Sound - Grafana v9.5.1

Hello everyone, how are you?

I would like some help from you regarding a problem I am trying to resolve. I am implementing the alert system to monitor grafana, but I would need to include the alert with a sound effect. While searching the forum I came across the following post:

I followed her step by step, but the sound is not coming out.

First of all, I would like to warn you that I’m not very familiar with webhook and Node-RED, I’m new to the subject and I’m gradually evolving.

Below is the flow model that I created in Node-RED, I configured the HTML (post) and read file nodes (Path from folder to the sound file). Remembering that Node-red is on top of a Linux server (Centos7) and Grafana is on top of another server, they are not on the same server.

Below is the structure set up in Node-RED:

prnt.sc/ YDH_s3pIgsNN

Grafana:

prnt.sc/ osRu0N3Oeo8p
prnt.sc/ 5vQ2ecPcdscV

The notification is being redirected to the correct place:

prnt.sc/ E_Sj6YqxX_LO

Debug Node-RED:

prnt.sc/ KpHH7yHEoJwv

That said, when the alert is generated in grafana the sound effect is not made. Can you tell me if there is any configuration missing on NODE-RED or Grafana that needs to be done? Thanks in advance.

Welcome @brun0 to the Grafana forum.

I cannot view your screenshots. Please post them as images to this thread.

Is this the flow you are trying to create?

Remember that the above flow should run on a PC that has a soundcard installed or is hooked up to a speaker, etc. The PC where Grafana is running will NOT play the sound. The PC where the above flow resides is the one that will generate the audio alert.

Hi, thanks for the welcome @grant2!

The print links are not opening because I needed to put “Space” between the URL, as it is not possible to place more than two links in the same topic.

Below are the images:

Below is the structure set up in Node-RED:

Grafana:

Screenshot_2

Screenshot_3

The notification is being redirected to the correct place:

Debug Node-RED:

Screenshot_5

In relation to what you commented, the current structure is as follows:

Grafana is on a Linux server (Ubuntu)
Node-RED is on a Linux server (Centos 7)

Therefore, will it not be possible for the audio to be reproduced?

What about your webhook screen? In my example, it says LenovoLinux, but in yours it would be the LinuxCentos7.

Follow the informations:

http in:

Change:

File:

Audio out:

Http response:

Hi @brun0

Your change node should be as follows:

image

Also, your Audio Out node looks like it might be missing some settings? Perhaps try something in there as well?

image

I went ahead and re-created the flow from Oct 2022 and tested it. It works fine and am posting it here:

[{"id":"b2d9e3976ee226d3","type":"tab","label":"Flow 1","disabled":false,"info":"","env":[]},{"id":"d8b323fb13f5550c","type":"http in","z":"b2d9e3976ee226d3","name":"","url":"/hello","method":"post","upload":false,"swaggerDoc":"","x":290,"y":120,"wires":[["25dc1bd898c8e90c","f997e540947e047b"]]},{"id":"25dc1bd898c8e90c","type":"http response","z":"b2d9e3976ee226d3","name":"","statusCode":"","headers":{},"x":1110,"y":120,"wires":[]},{"id":"f997e540947e047b","type":"change","z":"b2d9e3976ee226d3","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.status","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":500,"y":180,"wires":[["cec42cc5597ed9f3"]]},{"id":"984d401542f7884e","type":"play audio","z":"b2d9e3976ee226d3","name":"","voice":"","x":1050,"y":180,"wires":[]},{"id":"cec42cc5597ed9f3","type":"file in","z":"b2d9e3976ee226d3","name":"","filename":"/home/grantpi/Music/StarWars3.wav","filenameType":"str","format":"","chunk":false,"sendError":false,"encoding":"none","allProps":false,"x":790,"y":180,"wires":[["984d401542f7884e"]]}]

Hi, @grant2!

Thanks for the help, it worked. I needed to change the audio out node to play audio. In this scenario, it is only possible to generate the audio if Node-red is open in the browser, right? And there is only this scenario, right?

Thank you for your help!

Awesome, glad it works. In fact, Node-RED does not need to be open in the browser for this to work, but it needs to be running on the PC. Whenever I install Node-RED on a new Pi or other Linux device, I configure it to automatically start upon boot via the command:

sudo systemctl enable nodered.service

I believe I need to leave Node-red and Grafana on the same VM for it to work this way then. I’ll try. Thank you for your help!

Perhaps. I do not have Grafana or Node-RED running on any VM’s so cannot comment as to how that affects the webhook delivery.