TECHZEN Zenoss User Community ARCHIVE  

Audio Alert Notification

Subject: Audio Alert Notification
Author: Alessandro Costa
Posted: 2017-05-25 10:21

Hi All,

one easy question (but not with easy answer i suppose).
Can I have an Audio Notification for events?
I tried some silly thing:

- i saved wav file: /opt/nagios/include/media/alert.wav
- i create a script: /opt/nagios/include/media/runaudio.sh

#!/bin/bash

/usr/bin/aplay /opt/zenoss/include/media/service_critical.wav

then I set notification as command and telling zenoss to run runaudio,sh script.
Of course it doesn't work, the error I have seems to suggest me to indicate an output for playing audio.

Is there any way or any other solution to have an audio alert in Zenoss?

Thanks
Ale


------------------------------
Ale Ale
------------------------------


Subject: RE: Audio Alert Notification
Author: Alessandro Costa
Posted: 2017-05-30 06:27

I forgot to write I'm using Zenoss 4.2.5 on Centos 6.8 server.

Any help will be appreciated :)

------------------------------
Ale

- Trying is the first step towards failure
------------------------------

Subject: RE: Audio Alert Notification
Author: Jane Curry
Posted: 2017-05-30 09:17

Bear in mind that your notification command will run on the Zenoss server unless you embed in your script something to run stuff over ssh but that also will be fraught. 

Does your command:
/usr/bin/aplay /opt/zenoss/include/media/service_critical.wav

work if you run it from a command line on the Zenoss server?  If not, you need to work on this step first.

You should also assume that a script run by a notification command has effectively no shell environment - PATH, LIBPATH, etc so I would include anything like that explicitly in the script.

The notification is run by the zenactiond daemon so go and look at its logfile - you should be able to find the attempt to run that notification and you may get debugging help from any failure message.

What version of Zenoss are you on??

Cheers,
Jane

------------------------------
Jane Curry
Skills 1st United Kingdom
jane.curry@skills-1st.co.uk
------------------------------


< Previous
Zenosee OVA file installer
  Next
zenoss 5.2.1 and WINRM
>