#This is a sample .csv file for bulk import of monitors.
#1. Header should start with #Header: followed by the Input Field names. It is already coded for you. Note: Do not modify the header.
#2. From the second line onwards, give the input values according to the column names in the header.
#3. You can remove the example entries in this file from the second line onwards and add your own monitor input information. You can add comments by including # symbol in the beginning of the line.
#4. Save the file in any computer but upload it to the Applications Manager webclient using bulk import monitor form.
#5. After uploading, click on Next, the entire monitor input information will be shown in a table format for your reference.
#6. If everything is OK, click on Start Discovery. The monitors will be scheduled for discovery. It would take few minutes to complete the process. When the monitors are scheduled for discovery, simultaneously the uploaded file will be deleted from Applications Manager (as this file contains security information)
#7. If you want to cancel the process in midway, delete the uploaded file from Applications Manager machine.
#8. Fields MonitorGroupID and PollInterval are Optional.If PollInterval is not specified, the default value for it will be 5 minutes
#9. PollInterval should be given in Minutes.
#10.Values with embedded commas can be given inside "".
#11.'type' - The type of monitor you want to add. Value should be File Monitor or Directory Monitor.
#12.'serversite' - Specifies whether the file/directory to be monitored is located on the Local or Remote server. (local or remote)
#13.'filepath' - Absolute path of the file/directory to be monitored.
#14.'fileDirAge' - Option to perform file/directory age check. (on or off)
#15.'selectMonStatus' - The monitor availability to be set if the file/directory is MODIFIED or NOT MODIFIED within a certain time. (up or down)
#16.'selectChangeType' - The file/directory change type for which the configured monitor availability should be set. Possible values are:
# 0 - When file/directory is not modified
# 1 - When file/directory is modified
#17.'timeval' - Amount of time for which the file/directory age should be checked.
#18.'timeUnit' - The time unit for which the file/directory age should be checked.
#19.'checkAvailability' - Alerts when the file/directory does not exist in the specified location (on or off). Default value is on.
#20.'choosehost' - If the File / Directory to be monitored is in the Remote Server, you can choose the host by providing the host ID if the host was already added or using the value -1 to add a new host.
#21.'host' - The name of the host where the File Monitor is running.
#22.'monitoringmode' - Specifies the Mode Of Monitoring (WMI for Windows, Telnet/SSH for Linux)
#23.'username' - The username to connect with the host.
#24.'password' - The password for the new host username.
#25.'prompt' - The Command Prompt to connect in the Telnet/SSH mode. Specify the command prompt value, which is the last character in your command prompt
#26.'port' - The port number where the File/Directory Monitor is running. Default value is 23.
#27.'credentialID' - Enter the credentialID, if you wish to use preconfigured credentials details from Credentials Manager.
#28.'contentChk' - Specifies whether content check needs to be configured. (on or off)
#29.'fileCheckType' - The File Parsing Options to perform content check. Possible Values are:
# 0 - Perform content check to only appended content.
# 1 - Perform content check to the whole file.
#30.'ccontent' - The string for which you want to check content matching. Content should be specified in JSON array format as: # [{"severityCriteria":contentMatchSeverity, "contents": actualContent "isRegex":regexCheck, "ruleType":ruleNum, "caseSensitive":caseSensitiveCheck, ,"matchWholeWord":matchWholeWord}]
# Description for parameters in the above JSON:
# 'contentMatchSeverity' - The severity to be set when content match occurs. Possible values are:
# 0 - Availability Down
# 1 - Availability Up
# 2 - Health Critical
# 3 - Health Warning
# 4 - Health Clear
# 'actualContent' - The actual content that needs to be matched as comma seperated strings. Do not include content more than the number set for 'File contentCheck string count' in 'Settings → Performance Polling Optimize Data Collection → Monitor Type → File / Directory Monitor' as it might disturb the functionality.
# 'regexCheck' - Specifies whether Regex match should be performed. (true or false)
# 'ruleNum' - The number of contents that are to be matched. Do not use number higher than the count of contents to be matched. The maximum number of the contents specified to be matched represents the 'All' functionality.
# 'caseSensitiveCheck' - Specifies whether exact content match should be performed. (true or false)
# 'matchWholeWord' - Specifies whether content match should be performed for the whole word. (true or false) This value should be 'false' if 'regexCheck' is set as 'true' as it might disturb the functionality.
#31.'clearAlerts' - Specifies whether monitor status should be cleared when file is not modified. (on or off) This value should be 'off' if 'fileCheckType' is set as '1' as clearAlerts cannot be done when content check is performed in whole file.
#32.'filterFiles' - The condition to filter files in the directory. Filtering conditions should be specified in JSON array format as: # {"filepattern":"[FILE PATTERN]", "category":"[CATEGORY]", "condition":"[CONDITION]", "value":[VALUE], "unit":"[UNIT]", ,"alertSeverity":[SEVERITY]}
# Description for parameters in the above JSON:
# 'filepattern' - Regular expression for the file pattern (such as *.txt or *.zip)
# 'category' - Indicates the parameters based on which the files need to be filtered. Possible values include:
# size - Size
# mod - Last Modified Time
# create - Created time (supported only for Windows directory)
# 'condition' - Indicates the filter condition. Possible values are:
# LT - Lesser than
# GT - Greater than
# 'value' - Indicates the value specified for the filter condition. Specified value should be a positive integer.
# 'unit' - The unit for the value specified. Posssible values are either Bytes/KB/MB/GB (for Size filter category) or Minutes/Hours (for Last Modified Time and Created Time filter categories)
# 'alertSeverity' - The alert severity to be set when filtering conditions are met. Possible values are:
# 0 - Availability Down
# 1 - Availability Up
# 2 - Health Critical
# 3 - Health Warning
# 4 - Health Clear
#33.ManagedServerID and ManagedServerGroupName can be specified only if bulk import is being performed from the Admin Server in the Enterprise Edition.If these field values are not specified, then the new monitor will be added in the in least loaded Managed Server.
#34.The existing MonitorGroupID have to be specified and it will not create new Monitor Group if the ID specified is not existing.
#Header: displayname,type,serversite,filepath,fileDirAge,selectMonStatus,selectChangeType,timeval,timeUnit,checkAvailability,choosehost,host,monitoringmode,username,password,prompt,port,credentialID,contentChk,fileCheckType,ccontent,clearAlerts,filterFiles,MonitorGroupID,PollInterval,timeout test12345,File Monitor,remote,C:\mbx.txt,off,,,,,on,10000803,,,,,,,1,on,0,"[{"matchWholeWord":false,"condition":"","isRegex":false,"contents":["Mailbox"],"caseSensitive":true,"ruleType":5,"severityCriteria":2}]",on,,,5,60
dir123,Directory Monitor,remote,C:\tmp,on,down,1,50,Minutes,on,-1,Server1,WMI,Administrator,Biryani,,,,,,,on,"{"condition":"GT","unit":"Minutes","alertSeverity":1,"filepattern":"*.txt","category":"mod","value":5}",10000830,5,60