Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Issues creating alerts in Performance Monitor Expand / Collapse
Author
Message
Posted Thursday, April 30, 2009 3:54 PM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Monday, September 8, 2014 3:56 PM
Points: 363, Visits: 781
I am trying to setup some performance monitor alerts in Windows Server 2008 to run a powershell script to notify me of issues. I have some various SQL Server counters and I cannot get my script to run when the alert gets triggered. Perfmon seems to have changed from Windows Server 2003. It has been really hard to find any documentation on this online.

From my research it seems that you cannot have perfmon alerts execute scripts anymore and you have to use WMI commands. This is from the msdn documentation. Can anyone confirm if this is true. I do not believe Microsoft would have removed functionality for running scripts off of alerts, but I cannot find this anywhere in Windows Server 2008.


Adam Durr
Remote DBA support
www.bluegecko.net
Post #708133
Posted Tuesday, May 12, 2009 12:57 PM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Monday, September 8, 2014 3:56 PM
Points: 363, Visits: 781
I found a solution. I thought I would post it here since this has taken me a few weeks off and on to fix.

In Windows Server 2008 you must first create a windows scheduled task that executes the file. Under performance monitor, in your data collector you specify the task name there. If anyone is having this same issue I can go into more details.


Adam Durr
Remote DBA support
www.bluegecko.net
Post #715394
Posted Wednesday, May 13, 2009 8:44 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Today @ 7:12 AM
Points: 1,208, Visits: 3,193
Yes. I am interested.
Post #716069
Posted Sunday, May 24, 2009 12:55 PM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Monday, September 8, 2014 3:56 PM
Points: 363, Visits: 781
Sorry for taking so long to post back. Creating an alert in Windows Server 2008 requires you to first setup a windows scheduled task and also a performance counter. In performance monitor you create a new data collector and add an alert. You can specify different counters in your alert. I added logical disk counters to measure the % free disk space for each of my drives on the server. Then specify any necessary requirements like trigger the alert if the disk space goes below %15. Switch over to the action tab here is where it differs slightly from Windows Server 2003. In 2008 your action is the name of a windows scheduled task. So if you have a powershell script or vbscript you need to add that to a windows scheduled task. This task doesnt need a schedule associated with it. Then in your action you type in the name of the scheduled task and your done. This probabnly should be written up in an article to explain it better. If there is a specific question that you have let me know.

Adam Durr
Remote DBA support
www.bluegecko.net
Post #722761
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse