![]() File Name: File name pattern with which the files need to be filtered in the directory.After enabling, enter the following details: For Directory monitor, enable the Filter files in directory option to filter files in the given directory (does not include Sub-directories) and generate alerts.For both File and Directory monitor, you can enable the Do file / directory age check checkbox to change the monitor status to UP / DOWN if the file/directory is MODIFIED / NOT MODIFIED within a certain time period.However, this option is displayed only after selecting the Only appended content option under File Parsing Options. If this option is enabled and the file was not updated, then the current monitor status will be set for Availability as UP and Health as CLEAR. Enable the Clear monitor status when the file is not modified checkbox to control content check when the file is not updated during the polling interval.You can perform a content check for case sensitive character strings by enabling the Do Case Sensitive Search checkbox.You can perform a content check for regular expressions by enabling the Do Regular Expression Search checkbox (Refer Regex Guide for more info).The monitor status will be affected based on the chosen Severity criteria. All: If all of the content matches, the monitor status will become UP / DOWN.Also, you can enter the number of contents to be checked in the corresponding textbox if you wish to check for more than one string. Any: When this option is chosen, the monitor status will be affected based on the chosen Severity criteria if any of the contents from the above Content textbox match.There are two conditions to configure the monitor status:.You can add/remove multiple strings using the ( / -) button. Enter the string for which you want to check content matching in the Content to be searched text box.Under this window, select the severity criteria for Health (CRITICAL / WARNING / CLEAR) or Availability (UP / DOWN) from the Severity drop-down menu.This opens a new window where you can add new rules. You can add criteria based on which the content check can be performed to change the Health or Availability severity by clicking on the Create New Rule link.Select the required option under Monitor Severity to perform this content check to change the Health or Availability severity status.Choose between the File Parsing Options to perform a content check to Only appended content or the Whole File.If this checkbox is enabled, perform the following steps: For a File monitor, select the Do Content Check checkbox if you wish to run a content check.However, hostnames that are already present and configured for server monitoring cannot be deleted in this manner. The new hosts that are created can also be deleted by selecting the required host and clicking on the Delete Host link.Also, there is an option to Resolve Hostname / IP, enabling which will resolve the entered IP address to its corresponding hostname. Select the Mode Of Monitoring ( WMI for Windows, Telnet / SSH for Linux), the port and the Command Prompt, if required. You can either enter the credential details like user name, password, the command prompt or select the required credential from the Credential Manager list. You can create a new host by entering a new hostname / IP address and login credentials of the host.If it is in the Remote Server, either select the Host Name from the dropdown or create a new host, and then provide the file / directory's absolute path.If it is in the Local Server, provide the absolute path to the file / directory.Specify whether the File / Directory to be monitored is in the Local or Remote Server.Select whether it is a File or Directory monitor.Provide a Display Name for the monitor.From the New Monitor link, select File / Directory Monitor.To create a file / directory monitor, follow the steps given below: Using the REST API to add a new File/Directory monitor: Click here Configuring RCA Message for File Monitor.Script must be run on the local computer. ("Select * from Win32_Directory where name = 'c:\\Scripts'")ĮrrResults = objFolder.Rename("C:\Admins\Documents\Archive\VBScript")ĭemonstration script that uses the FileSystemObject to rename a folder. Set colFolders = objWMIService.ExecQuery _ Set objWMIService = GetObject("winmgmts:" _ ObjFolder.Attributes = objFolder.Attributes XOR 2Ĭompresses the folder C:\Scripts. If objFolder.Attributes = objFolder.Attributes AND 2 Then Set objFolder = objFSO.GetFolder("C:\FSO") Set objFSO = CreateObject("Scripting.FileSystemObject") Scripts to manage Folders Changing Folder AttributesĮnumerating All the Folders on a Computerĭemonstration script that uses the FileSystemObject to check if a folder is hidden and, if it is not, hides it.
0 Comments
Leave a Reply. |