What file state parameters can be tracked with IPNetwork Monitor?

What file state parameters can be tracked with IPNetwork Monitor?

Q: I need to keep tracks on file state (attributes) change. What are my options?

A: Files are common objects for monitoring. Those could be system log files; mailboxes, application-generated files containing important information and so on. Depending on the task, it could be required to monitor certain file attributes, such as modification time, size, access rights and so on.

In case of Windows, you can use either ‘for’ command of cmd.exe command-line tool, or WMI (using winMgmts:CIM_DataFile class to get all the file/directory status data). WMI return value can be checked directly; in all the other cases script monitor can be used to run a script checking specific attributes, to analyze them and invoke alerts if necessary.

In case of Linux and similar systems there’s a built-in ‘stat’ utility that can be used to request file and/or directory status attributes. Those can be either used in conjunction with SNMP (to store the retrieved file data as SNMP entry) or using script monitor to pass the data to the IPNetwork Monitor instance.

The above methods cover most of cases of checking file status; if more complicated checks are required, the proper script can be written and used in SSH or Script monitor to get the required data.

Related topics

How to check a file for presence of given string?


Frequently Asked Questions

Check out our Knowledge Base where we answer questions regarding various topics.

Which file attributes can be monitored?

Common file state checks include modification time, file size, access rights, and other status attributes that indicate whether a file or directory has changed.

How can file state be checked on Windows?

Windows checks can use the cmd.exe for command or WMI through the CIM_DataFile class. A Script monitor can evaluate the returned value and trigger alerts when needed.

How can file state be checked on Linux or UNIX-like systems?

The stat utility can retrieve file and directory attributes. Those values can be passed through a Script or SSH monitor, or published as SNMP data for IPNetwork Monitor to read.