#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.'displayname' - Display name of the monitor.
#12.'serverpath' - The path of the script file in the server, to be monitored.
#13.'workingdirectory' - The directory in which the script will be executed.
#14.'serversite' - [local/remote] - Specifies whether the script to be monitored is on the Local or Remote Server.
#15.'pollInterval' - Set the Polling Interval. By default, it is 5 minutes.
#16.'timeout' - Specify the Timeout value in seconds. The value can be the maximum time taken by the script to execute.
#17.'isCommand' - To choose the Script Location as command, use the keyword "isCommand=true" in the API call.
#18.'globalseverity' - true/false Option to affect health when exception occurs.
#19.'host' - The name or IP address of the host where the script monitor is running.
#20.'monitoringmode' - TELNET/SSH/POWERSHELL Specifies the Mode Of Monitoring. ( TELNET/SSH for Linux and Powershell for Windows).
#21.'choosehost' - [-1/hostid], For new host, use -1, else use id value from the query 'select * from AM_SCRIPTHOSTDETAILS'.
#22.'Port' - [23/22] The port number.
#23.'username' - The username to add a new host.
#24.'password' - The password to add a new host.
#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. Default value is $.
#26.'mode' - Enter the mode. The default value will be 'sh'
#27.'credentialID' - Credential ID
#28.'opfile' - [true/false] - Specify if you want to Get output from file.
#29.'outputfile' - Specify the path of the output file
#30.'StringAttributes' - Enter the String attributes
#31.'NumericAttributes' - Enter the Numeric attributes
#32.'delimiter' - Enter the value of Delimiter used in the output file. By default, it is "=". If you don't specify a delimiter, then '=' would be considered as a delimiter. To specify 'space' as a delimiter give it as 's'.
#33.'TablePresent' - 'on' - Specify as 'on' if you want to enable Table attributes, else leave it empty
#34.'table_row' - Number of rows in the table
#35.'TableName' - Table name → Table,Table,Table...
#36.'tableattributes' - Enter table name & attributes → "[{"tablename":table1,"stringatt":
["atr1","atr2"],"numericatt":["atr3","atr4"],"uniqueatt":["atr1"],"coldelimiter":"|"}]".
# tableattributes → 1. To use comma (,) as column delimiter give it in single quotes Eg. "coldelimiter" : ','
# tableattributes → 2. For 'space' use " ". Eg. "coldelimiter" : " "
#41.'message' - Arguments
#42.'Timeout' - Time out
#43.'manageTableRow' - Options to manage table row. Values are [retain/delete/unmanage]
#44.'healthTableRow' - Options to manage table data. Values are [critical/warning/clear]
#45.'MonitorGroupID' - Give existing monitor group ID to associate with Script Monitor.
#46.'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.
#Header: displayname,serversite,choosehost,host,isCommand,monitoringmode,username,password,prompt,mode,credentialID,port,serverpath
workingdirectory,opfile,outputfile,string_att,numeric_att,delimiter,tablespresent,table_row,tableattributes,manageTableRow,
healthTableRow,message,timeout,MonitorGroupID,pollInterval,globalseverity
#Testmonitor1,local,-1,localhost,,SSH,,,$,sh,,22,,,,,,,,,,,,,,30,,5,
#Testmonitor2,remote,-1,hostname,true,SSH,test,P@s$w0rd,$,sh,,22,ifconfig,/home/test/,false,,,,,,,,,,,30,,5,
#Testmonitor3,local,-1,false,,,SSH,,$,sh,,23,scriptLocation,/home/directorypath/,TRUE,/home/path/output1.txt,Name,version,=,on,2,"[
{"tablename":"DiskDetails","stringatt":["Filepath","str1"],"numericatt":["Blocks","Used"],"uniqueatt":["Filepath"],"coldelimiter":"|"},
{"tablename":"disk","stringatt":["drive"],"numericatt":["used","space"],"uniqueatt":["drive"],"coldelimiter":"="}]",,,,30,,5,