Technical Blog Post
Abstract
ITM Agent Insights: Monitoring Number of Files in a Directory Situation
Body
This blog will discuss how to monitor the number of files in a directory using the KNT agent.
Currently, it is not possible to check for multiple directories/files explicitly using separate rows in a single situation with the KNT File Change/File Trend attributes. This ability is not possible with the out of the box attributes.
The Windows OS agent has attributes to monitor changes to a directory or a file:
- File Change attribute group
- File Trend attribute group
These allow you to set a watch directory, and then monitor for various types of changes. So one could define a situation to monitor the directory using the File Change attribute group, and select to watch the specific directory, and then set a situation to fire if there is a file creation or a file deletion on the directory using the "Action" attribute. Action The type of change that occurred most recently to the directory or to the file. Valid values are positive integers in the range 0 to 5 and can include the use of the *AVG, *MIN, *MAX, or *SUM functions. The numbers 1 through 5 determine the type of change that recently occurred.
Number Description:
1 File/directory was added
2 File/directory was removed
3 File/directory changed (in size, in attribute, or in the security for the file/directory)
4 File/directory was renamed - the old name displays
5 File/directory was renamed - the new name displays
.
The "File Trend" attribute group can track to see if the contents of a directory are increasing or decreasing over time, but this is based on size, not number of files.
Unfortunately, we do not see any way to monitor the count of files in a directory and then trigger an alert if the count is not changing with the NT agent.
Other possible alternative solutions:
- Creation of a custom agent using the Agent Builder product (which will involve scripting)
Additional ITM Agent Insights series of IBM Tivoli Monitoring Agent blogs are indexed under ITM
Subscribe and follow us for all the latest information directly on your social feeds:
|
|
|
Check out all our other posts and updates: | |
Academy Blogs: | h |
Academy Videos: | http://ow.ly/PIKFz |
Academy Google+: | http://ow.ly/Dj3nn |
Academy Twitter Handle: | http://ow.ly/Dj35c |
UID
ibm11085049