Thursday, May 24, 2007

Recent MOM Alerts

I've created a SQL query to generate Recent MOM alerts in MOM.

Recent MOM Alerts

The below query need to be run against OnePoint database and you need specify the date, time and the server name.
This query will generate only alerts from warning and above and the alerts which are not resolved, you could also change the alert severity by the changing the AlertLevel value.

-******************************************************************************
-- Below is the Severity (AlertLevel) values for the MOM alerts in MOM 2005.
-- Severity Value:
-- SUCCESS ALERT = 10
-- INFORMATION ALERT= 20
-- WARNING ALERT = 30
-- ERROR ALERT = 40
-- CRITICAL ERROR ALERT= 50
-- SECURITY BREACH ALERT = 60
-- SERVICE UNAVAILABLE ALERT = 70



-- SQL Query:

--***************************

Declare @SDateTime DateTime
Declare @EDateTime DateTime
Declare @Server varchar(30)
Declare @ID Varchar(1000)

--***************************


SET @SDateTime = '10/05/2006 12:00:00 AM' -- Format MM/DD/YYYY 12:00:00 AM/PM
SET @EDateTime = '10/12/2006 12:00:00 AM' -- Format MM/DD/YYYY 12:00:00 AM/PM
SET @Server = 'your Server name'


select @ID = idComputer from computer where name = @server
Select Name, Description, Culprit, AlertLevel, ResolutionState, RepeatCount, TimeOffirstevent, TimeofLastevent from alert WHERE (TimeOfFirstEvent BETWEEN @SDateTime AND @EDateTime) And (TimeOfLastEvent BETWEEN @SDateTime AND @EDateTime) AND idComputer=@ID and AlertLevel > 20 and ResolutionState <> 255

1 comment:

Anonymous said...

Hey,

I keep coming to this website[url=http://www.weightrapidloss.com/lose-10-pounds-in-2-weeks-quick-weight-loss-tips].[/url]mom-netiq.blogspot.com is filled with quality info. Let me tell you one thing guys, some time we really forget to pay attention towards our health. Here is a fact for you. Recent Research displays that nearly 50% of all United States grownups are either obese or overweight[url=http://www.weightrapidloss.com/lose-10-pounds-in-2-weeks-quick-weight-loss-tips].[/url] So if you're one of these individuals, you're not alone. In fact, most of us need to lose a few pounds once in a while to get sexy and perfect six pack abs. Now the question is how you are planning to have quick weight loss? Quick weight loss can be achived with little effort. You need to improve some of you daily habbits to achive weight loss in short span of time.

About me: I am webmaster of [url=http://www.weightrapidloss.com/lose-10-pounds-in-2-weeks-quick-weight-loss-tips]Quick weight loss tips[/url]. I am also health expert who can help you lose weight quickly. If you do not want to go under difficult training program than you may also try [url=http://www.weightrapidloss.com/acai-berry-for-quick-weight-loss]Acai Berry[/url] or [url=http://www.weightrapidloss.com/colon-cleanse-for-weight-loss]Colon Cleansing[/url] for effortless weight loss.