Toad World® Forums

How to Get Spotlight to play a sound on an alarm being raised


#1

Hi,

Has anyone attempted to set up spotlight to use sounds for alarms? Ive attempted to use run a program and run powershell and a script, it runs, but no sound is played. If i run the script in powershell seperately it works just fine.

does anyone have this working and could help?

thanks


#2

The PowerShell scripts are going to run on the server that the alarm was raised on, not on your diagnostic server, nor on your desktop. If you want the powershell script to run locally on your laptop, the PowerShell script would need to remotely connect back to your laptop/workstation, which may be tricky.

Other than through some custom scripting, I don’t know of any other way to configure Spotlight to play sounds when alarms are raise.

Jason

From: Jonathan.Baynes [mailto:bounce-JonathanBaynes@toadworld.com]

Sent: Tuesday, August 1, 2017 7:29 AM

To: sosse@toadworld.com

Subject: [Spotlight on SQL Server - Discussion Forum] How to Get Spotlight to play a sound on an alarm being raised

How to Get Spotlight to play a sound on an alarm being raised

Thread created by Jonathan.Baynes

Hi,

Has anyone attempted to set up spotlight to use sounds for alarms? Ive attempted to use run a program and run powershell and a script, it runs, but no sound is played. If i run the script in powershell seperately it works just fine.

does anyone have this working and could help?

thanks

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or
Unsubscribe from Spotlight on SQL Server Forum
notifications altogether.

Spotlight on SQL Server - Discussion Forum

Flag
this post as spam/abuse.


#3

Yep, thanks, I understand that’s the case with the PowerShell script, I realised this after countless errors stating the sound file didn’t exist in the path, only to realise it was looking on the remote server for the file…

So when I then tried is this:

For all alarms

*where the alarm is Locks - Blocked Processes

run PowerShell -ExecutionPolicy unrestricted -command “& { . c:\AlarmSound-QuestSpotlight.ps1 }”*

the ps1 file reads as this:

$player = New-Object System.Media.SoundPlayer “C:\Quest sound\REMINDER.WAV”

$player.PlaySync()

When I run the script in CMD, outside of Spotlight the sound is played and its successful. When I run this in Spotlight I get nothing.

When I run this command in PowerShell it runs.

The diagnostic server is running on a remote server, sound is turned on (service level and at the taskbar) sound does play through the remote connection (using Royal TS) all the tests have been done on the remote server and the sound plays on the local desktop

So why not in Spotlight?

Any ideas???

Thanks

J

From: Jason Hall [mailto:bounce-JasonHall@toadworld.com]

Sent: 01 August 2017 14:32

To: sosse@toadworld.com

Subject: RE: [Spotlight on SQL Server - Discussion Forum] How to Get Spotlight to play a sound on an alarm being raised

RE: How to Get Spotlight to play a sound on an alarm being raised

Reply by Jason Hall

The PowerShell scripts are going to run on the server that the alarm was raised on, not on your diagnostic server, nor on your desktop. If you want the powershell script to run locally on your laptop, the PowerShell script would need to remotely connect back to your laptop/workstation, which may be tricky.

Other than through some custom scripting, I don’t know of any other way to configure Spotlight to play sounds when alarms are raise.

Jason

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or
Unsubscribe from Spotlight on SQL Server Forum
notifications altogether.

Spotlight on SQL Server - Discussion Forum

Flag
this post as spam/abuse.


This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy it. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. Tradeweb reserves the right to monitor all e-mail communications through its networks. If you do not wish to receive marketing emails about our products / services, please let us know by contacting us, either by email at contactus@tradeweb.com or by writing to us at the registered office of Tradeweb in the UK, which is: Tradeweb Europe Limited (company number 3912826), 1 Fore Street Avenue London EC2Y 9DT. To see our privacy policy, visit our website @ www.tradeweb.com.


#4

Hi Jonathan, the Alarm Action’s “Run A Program” rule does run on the Diagnostic Server. I just did quick test of this rule using a similar PS script and running everything local on Spotlight Diagnostic Server host. My command in Spotlight:
PowerShell -ExecutionPolicy unrestricted -command “& { . c:\temp\Spotlightsound.ps1 }”

Script content same as yours:
$player = New-Object System.Media.SoundPlayer “C:\temp\beep02.WAV”
$player.PlaySync()

My Spotlight isn’t generating the beep noise either. Running the PS script in CMD works fine and other PS scripts in Spotlight work. So it appears that we need to take a closer look at the issue. You can contact our tech support team and we can give you a more detailed analysis on it.

Gita
Visit our Support Portal page
Our new Database Performance Monitoring Community page


#5

Has anyone attempted to set up spotlight to use sounds for alarms? Ive attempted to use run a program and run powershell and a script, it runs, but no sound is played.