Generate an alert when a file size is reached
Windows Server Forum Index Windows Server
Server discussion on Windows platform.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web winserverhelp.com
Generate an alert when a file size is reached

 
Post new topic   Reply to topic    Windows Server Forum Index -> MOM
Author Message
Mark
Guest





Posted: Wed Jan 19, 2005 10:35 pm    Post subject: Generate an alert when a file size is reached Reply with quote

Does any one know how I can create an alert (MOM 2005) when a particular file
as reached a determined size limit. I know that using Disk Quotas will work
but I am only concerned w/individual files; for instance I have .psts located
on a file server in one dir and every user has a pst located in this dir. I
would like to be alerted when a pst file reaches, say 1gb.
Back to top
Blake Mengotto
Guest





Posted: Thu Jan 20, 2005 6:48 am    Post subject: Re: Generate an alert when a file size is reached Reply with quote

You can do this but you need a script and what not. Check momanswers.


--
Regards,
Blake Mengotto
Email: mengotto@nospam.hotmail.com
"MOM 2000/2005 - The ultimate solution for monitoring/managing your Windows
OS and applications."
http://www.momanswers.com - MOM solution center resource
http://www.microsoft.com/mom - MOM Application site
http://www.silect.com - MOM Health Reporter
http://www.excsoftware.com - MOM solution provider
"Mark" <Mark@discussions.microsoft.com> wrote in message
news:6511D033-9A71-4205-81BD-067B694FCC10@microsoft.com...
Quote:
Does any one know how I can create an alert (MOM 2005) when a particular
file
as reached a determined size limit. I know that using Disk Quotas will
work
but I am only concerned w/individual files; for instance I have .psts
located
on a file server in one dir and every user has a pst located in this dir.
I
would like to be alerted when a pst file reaches, say 1gb.
Back to top
Brian Wren [MSFT]
Guest





Posted: Thu Jan 20, 2005 10:12 pm    Post subject: Re: Generate an alert when a file size is reached Reply with quote

You can use a WMI provider that checks the file each time it is modified.
Create a Event rule that uses the provider with no criteria to raise the
alert.

The details of the WMI Provider would be as follows. This example uses a
file named c:\dir1\file1.txt and a max file size of 1024 bytes.

Name: File (file1.txt) exceeds size limit (1024)
Namepsace: root\cimv2
Query: select * from __InstanceModificationEvent WITHIN 60 WHERE
TargetInstance ISA 'CIM_DataFile' AND TargetInstance.Name =
'c:\\dir1\\file1.txt' and TargetInstance.FileSize > 1024

Note the two underscores at the start of __InstanceModificationEvent and the
double backslashes in the file path.

-bw

"Mark" <Mark@discussions.microsoft.com> wrote in message
news:6511D033-9A71-4205-81BD-067B694FCC10@microsoft.com...
Quote:
Does any one know how I can create an alert (MOM 2005) when a particular
file
as reached a determined size limit. I know that using Disk Quotas will
work
but I am only concerned w/individual files; for instance I have .psts
located
on a file server in one dir and every user has a pst located in this dir.
I
would like to be alerted when a pst file reaches, say 1gb.
Back to top
Mark
Guest





Posted: Fri Jan 21, 2005 12:17 am    Post subject: Re: Generate an alert when a file size is reached Reply with quote

Brian, thanks for your help.
I created a txt file on a MOM agent at c:\temp. I then created a "provider
type" -WMI Event which is of type "collection" based on the query you
provided below. I followed this verbatim except for the file name.
I then created an event rule based on the provider w/no criteria. Once I
applied the changes I got the following event errors from the MOM agents. Can
you tell me if I am missing something??

Description:
The Microsoft Operations Manager WMI provider 'File exceeds size limit
(1024)' could not register query "select * from__InstanceModificationEvent
WITHIN 60 WHERE TargetInstance ISA 'CIM_DataFile' AND TargetInstance.Name =
'c:\\temp\\test.txt' and TargetInstance.FileSize > 1024". Ensure that the WMI
Query is valid.
Computer: XXXXX Name: WMI Provider - A WMI rule failed
Severity: Error
Resolution State: New
Domain: XXXX
Computer: XX
Time of First Event: 1/20/2005 12:00:39 PM
Time of Last Event: 1/20/2005 12:00:39 PM
Alert latency: 1 sec
Problem State: Investigate
Repeat Count: 0
Age:
Source: Microsoft Operations Manager
Alert Id: 5e4ab851-bd4c-42f3-92fc-5683b9973973
Rule (enabled): Microsoft Operations Manager\Operations Manager 2005\Agents
on all MOM roles\WMI Provider - A WMI rule failed

"Brian Wren [MSFT]" wrote:

Quote:
You can use a WMI provider that checks the file each time it is modified.
Create a Event rule that uses the provider with no criteria to raise the
alert.

The details of the WMI Provider would be as follows. This example uses a
file named c:\dir1\file1.txt and a max file size of 1024 bytes.

Name: File (file1.txt) exceeds size limit (1024)
Namepsace: root\cimv2
Query: select * from __InstanceModificationEvent WITHIN 60 WHERE
TargetInstance ISA 'CIM_DataFile' AND TargetInstance.Name =
'c:\\dir1\\file1.txt' and TargetInstance.FileSize > 1024

Note the two underscores at the start of __InstanceModificationEvent and the
double backslashes in the file path.

-bw

"Mark" <Mark@discussions.microsoft.com> wrote in message
news:6511D033-9A71-4205-81BD-067B694FCC10@microsoft.com...
Does any one know how I can create an alert (MOM 2005) when a particular
file
as reached a determined size limit. I know that using Disk Quotas will
work
but I am only concerned w/individual files; for instance I have .psts
located
on a file server in one dir and every user has a pst located in this dir.
I
would like to be alerted when a pst file reaches, say 1gb.


Back to top
Mark
Guest





Posted: Fri Jan 21, 2005 2:47 am    Post subject: Actually Brian if found out what I did... Reply with quote

I put a space after "from" and reapplied after that I did not get the error
below but I don't seem to be able to generate the alert after I created the
test.txt file which had a size of 3mb.

"Mark" wrote:

Quote:
Brian, thanks for your help.
I created a txt file on a MOM agent at c:\temp. I then created a "provider
type" -WMI Event which is of type "collection" based on the query you
provided below. I followed this verbatim except for the file name.
I then created an event rule based on the provider w/no criteria. Once I
applied the changes I got the following event errors from the MOM agents. Can
you tell me if I am missing something??

Description:
The Microsoft Operations Manager WMI provider 'File exceeds size limit
(1024)' could not register query "select * from__InstanceModificationEvent
WITHIN 60 WHERE TargetInstance ISA 'CIM_DataFile' AND TargetInstance.Name =
'c:\\temp\\test.txt' and TargetInstance.FileSize > 1024". Ensure that the WMI
Query is valid.
Computer: XXXXX Name: WMI Provider - A WMI rule failed
Severity: Error
Resolution State: New
Domain: XXXX
Computer: XX
Time of First Event: 1/20/2005 12:00:39 PM
Time of Last Event: 1/20/2005 12:00:39 PM
Alert latency: 1 sec
Problem State: Investigate
Repeat Count: 0
Age:
Source: Microsoft Operations Manager
Alert Id: 5e4ab851-bd4c-42f3-92fc-5683b9973973
Rule (enabled): Microsoft Operations Manager\Operations Manager 2005\Agents
on all MOM roles\WMI Provider - A WMI rule failed

"Brian Wren [MSFT]" wrote:

You can use a WMI provider that checks the file each time it is modified.
Create a Event rule that uses the provider with no criteria to raise the
alert.

The details of the WMI Provider would be as follows. This example uses a
file named c:\dir1\file1.txt and a max file size of 1024 bytes.

Name: File (file1.txt) exceeds size limit (1024)
Namepsace: root\cimv2
Query: select * from __InstanceModificationEvent WITHIN 60 WHERE
TargetInstance ISA 'CIM_DataFile' AND TargetInstance.Name =
'c:\\dir1\\file1.txt' and TargetInstance.FileSize > 1024

Note the two underscores at the start of __InstanceModificationEvent and the
double backslashes in the file path.

-bw

"Mark" <Mark@discussions.microsoft.com> wrote in message
news:6511D033-9A71-4205-81BD-067B694FCC10@microsoft.com...
Does any one know how I can create an alert (MOM 2005) when a particular
file
as reached a determined size limit. I know that using Disk Quotas will
work
but I am only concerned w/individual files; for instance I have .psts
located
on a file server in one dir and every user has a pst located in this dir.
I
would like to be alerted when a pst file reaches, say 1gb.


Back to top
Brian Wren [MSFT]
Guest





Posted: Fri Jan 21, 2005 3:10 am    Post subject: Re: Actually Brian if found out what I did... Reply with quote

Did you create an event rule based on the provider? The rule should be
applied to the computer holding the file that you want to monitor. The
event rule would specify the type of alert to generate.

You can test the WMI query by running WBEMTEST (that will be installed on
any XP for 2003 machine - just do Start | Run | wbemtest). Connect to
root\cimv2 namespace and then select notification query. Paste in that
query, and you should get a blank window. Create the file, and you should
get an entry show up in the window. It may take up to 60 seconds (that
comes from the WITHIN 60 in the query). That will at least validate the
query.


"Mark" <Mark@discussions.microsoft.com> wrote in message
news:E1B8B8E7-401E-4B8A-8C4C-092EED62C23C@microsoft.com...
Quote:
I put a space after "from" and reapplied after that I did not get the error
below but I don't seem to be able to generate the alert after I created
the
test.txt file which had a size of 3mb.

"Mark" wrote:

Brian, thanks for your help.
I created a txt file on a MOM agent at c:\temp. I then created a
"provider
type" -WMI Event which is of type "collection" based on the query you
provided below. I followed this verbatim except for the file name.
I then created an event rule based on the provider w/no criteria. Once I
applied the changes I got the following event errors from the MOM agents.
Can
you tell me if I am missing something??

Description:
The Microsoft Operations Manager WMI provider 'File exceeds size limit
(1024)' could not register query "select *
from__InstanceModificationEvent
WITHIN 60 WHERE TargetInstance ISA 'CIM_DataFile' AND TargetInstance.Name
=
'c:\\temp\\test.txt' and TargetInstance.FileSize > 1024". Ensure that the
WMI
Query is valid.
Computer: XXXXX Name: WMI Provider - A WMI rule failed
Severity: Error
Resolution State: New
Domain: XXXX
Computer: XX
Time of First Event: 1/20/2005 12:00:39 PM
Time of Last Event: 1/20/2005 12:00:39 PM
Alert latency: 1 sec
Problem State: Investigate
Repeat Count: 0
Age:
Source: Microsoft Operations Manager
Alert Id: 5e4ab851-bd4c-42f3-92fc-5683b9973973
Rule (enabled): Microsoft Operations Manager\Operations Manager
2005\Agents
on all MOM roles\WMI Provider - A WMI rule failed

"Brian Wren [MSFT]" wrote:

You can use a WMI provider that checks the file each time it is
modified.
Create a Event rule that uses the provider with no criteria to raise
the
alert.

The details of the WMI Provider would be as follows. This example uses
a
file named c:\dir1\file1.txt and a max file size of 1024 bytes.

Name: File (file1.txt) exceeds size limit (1024)
Namepsace: root\cimv2
Query: select * from __InstanceModificationEvent WITHIN 60 WHERE
TargetInstance ISA 'CIM_DataFile' AND TargetInstance.Name =
'c:\\dir1\\file1.txt' and TargetInstance.FileSize > 1024

Note the two underscores at the start of __InstanceModificationEvent
and the
double backslashes in the file path.

-bw

"Mark" <Mark@discussions.microsoft.com> wrote in message
news:6511D033-9A71-4205-81BD-067B694FCC10@microsoft.com...
Does any one know how I can create an alert (MOM 2005) when a
particular
file
as reached a determined size limit. I know that using Disk Quotas
will
work
but I am only concerned w/individual files; for instance I have .psts
located
on a file server in one dir and every user has a pst located in this
dir.
I
would like to be alerted when a pst file reaches, say 1gb.


Back to top
 
Post new topic   Reply to topic    Windows Server Forum Index -> MOM All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




New Topics Powered by phpBB