how can play an alarm or bib with warning or critical

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
baber
Posts: 295
Joined: Wed Oct 21, 2015 4:39 am

Re: how can play an alarm or bib with warning or critical

Post by baber »

tgriep wrote:The sound will play on your PC and not the server. As long as you have a web browser open to the Nagios system and a status changes, it will play the sound file on that PC.

Now what is my problem why my sound not play ?
I have to just edit cgi. Cfg file is that enough?

Why not work
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: how can play an alarm or bib with warning or critical

Post by rkennedy »

Yes, you should just need to edit the file.

What browser are you using? I couldn't get it to work on Firefox, but it worked fine on Chrome. Every time I loaded the status.cgi page, and a service was in warning state -- it played the sound.
Former Nagios Employee
baber
Posts: 295
Joined: Wed Oct 21, 2015 4:39 am

Re: how can play an alarm or bib with warning or critical

Post by baber »

rkennedy wrote:Yes, you should just need to edit the file.

What browser are you using? I couldn't get it to work on Firefox, but it worked fine on Chrome. Every time I loaded the status.cgi page, and a service was in warning state -- it played the sound.
I have just checked with firefox

Ok i will test with chrome do i hve need install any plugin or ... For chrome ??
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: how can play an alarm or bib with warning or critical

Post by tgriep »

Take a look at this post for an addon to firefox.
https://support.nagios.com/forum/viewto ... =7&t=21619
Be sure to check out our Knowledgebase for helpful articles and solutions!
baber
Posts: 295
Joined: Wed Oct 21, 2015 4:39 am

Re: how can play an alarm or bib with warning or critical

Post by baber »

tgriep wrote:Take a look at this post for an addon to firefox.
https://support.nagios.com/forum/viewto ... =7&t=21619

Now i am confused in previous post you said sound not support on mozilla but here put a guide for mozilla ??
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: how can play an alarm or bib with warning or critical

Post by rkennedy »

baber wrote:
rkennedy wrote:Yes, you should just need to edit the file.

What browser are you using? I couldn't get it to work on Firefox, but it worked fine on Chrome. Every time I loaded the status.cgi page, and a service was in warning state -- it played the sound.
I have just checked with firefox

Ok i will test with chrome do i hve need install any plugin or ... For chrome ??
baber wrote:
tgriep wrote:Take a look at this post for an addon to firefox.
https://support.nagios.com/forum/viewto ... =7&t=21619

Now i am confused in previous post you said sound not support on mozilla but here put a guide for mozilla ??
@tgriep posted another addon you can use, that will work with Firefox. I don't believe so, as long as your machine can play .wav files.
Former Nagios Employee
baber
Posts: 295
Joined: Wed Oct 21, 2015 4:39 am

Re: how can play an alarm or bib with warning or critical

Post by baber »

rkennedy wrote:
baber wrote:
rkennedy wrote:Yes, you should just need to edit the file.

What browser are you using? I couldn't get it to work on Firefox, but it worked fine on Chrome. Every time I loaded the status.cgi page, and a service was in warning state -- it played the sound.
I have just checked with firefox

Ok i will test with chrome do i hve need install any plugin or ... For chrome ??
baber wrote:
tgriep wrote:Take a look at this post for an addon to firefox.
https://support.nagios.com/forum/viewto ... =7&t=21619

Now i am confused in previous post you said sound not support on mozilla but here put a guide for mozilla ??
@tgriep posted another addon you can use, that will work with Firefox. I don't believe so, as long as your machine can play .wav files.

i have appeared with new problem with chrome when i add this line

Code: Select all

service_critical_sound=/usr/local/nagios/share/media/warn.wav

it don't play any sound

but when i add this line

Code: Select all

service_critical_sound=warn.wav

it play a sound every time i click on every item on nagios such as server hostgroups problem and .... and also this wav file is not that file i have selected why ?
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: how can play an alarm or bib with warning or critical

Post by rkennedy »

rkennedy wrote:Change this -

Code: Select all

service_warning_sound=warning.wav
to (since you're file is called warn.wav) -

Code: Select all

service_warning_sound=warn.wav
As I mentioned, you need to use direct file names not full paths. It isn't expecting a full path.
it play a sound every time i click on every item on nagios such as server hostgroups problem and .... and also this wav file is not that file i have selected why ?
Yes, this is how it works. It plays a sound if there are any warning / critical alerts on your system at all. When everything is at an OK status, you can leave the browser open and when something switches to warning / critical it'll play the sound as the page refreshes.
Former Nagios Employee
baber
Posts: 295
Joined: Wed Oct 21, 2015 4:39 am

Re: how can play an alarm or bib with warning or critical

Post by baber »

rkennedy wrote:
rkennedy wrote:Change this -

Code: Select all

service_warning_sound=warning.wav
to (since you're file is called warn.wav) -

Code: Select all

service_warning_sound=warn.wav
As I mentioned, you need to use direct file names not full paths. It isn't expecting a full path.
it play a sound every time i click on every item on nagios such as server hostgroups problem and .... and also this wav file is not that file i have selected why ?
Yes, this is how it works. It plays a sound if there are any warning / critical alerts on your system at all. When everything is at an OK status, you can leave the browser open and when something switches to warning / critical it'll play the sound as the page refreshes.

Dear friend

So thanks
Now with appear warning alarm will be play just there is a problem with each page refresh the alarm will be play is there any config on nagios core that can config to play alarm if warning appear every 5 min untill problem solve

How can do this??

BR
Babak
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: how can play an alarm or bib with warning or critical

Post by tmcdonald »

I don't see any options aside from just specifying the sound files to use, and whether to play sounds. There does not appear to be anything regarding a repeat frequency.
Former Nagios employee
Locked