Import by CSV file
The import or inventorying through a CSV file
enables the addition of new assets and the enhancement of the Asset inventory (already stored in the WOCU-Monitoring database) by reading a file in CSV format. It also facilitates the update of the Monitoring database by reading a CSV format file that contains the list of Hosts along with their respective data.
Note
The CSV (Comma Separated Value) format is a simple format that separates columns with a delimiter (semicolon ‘;’) and rows with a line break. Exporting data from various sources (other monitoring tools, databases, CMDB tools, inventories in table formats or spreadsheets) to this type of format is straightforward. Consequently, it is easy to make any pre-existing system compatible as an Import Source for WOCU-Monitoring.
There are two possible Tasks that use CSV files for the incorporation of Assets: CSV_Import task and CSV_Inventory task, and CSV_Delete task for the bulk deletion of assets.
CSV_Import task
Each of the different fields that the user must fill in for the configuration of the Task is detailed below:
Realm Name
This field is not editable and indicates the name of the Realm that is the subject of the Import Task.
Task Type
This field indicates the Task Type that will be generated. It is the first selectable field in the dropdown menu and influences the remaining fields.
If a different type of Task is selected before saving the changes, the previously entered data will be lost.
Name
The field contains the name chosen by the user to identify the New Task created.
Enabled
Checking this box enables and activates this New Import Task for its next execution.
By default this option is enabled.
Interval
By means of this drop-down menu it is possible to choose how often the Asset Import of this new Task will be executed. The possible options available are:
Task executed daily (Every 1 days).
Task executed every second (Every 1 second).
Contrab
An alternative option for setting the frequency at which the Task will be executed. Its configuration is done using the Crontab format, providing greater flexibility for more specific use cases.
Expand on the information about defining execution periods here.
Help Information about the CSV File
Next, the creation form provides instructions regarding the type of import task and the format that the CSV file used as the data source for the assets to be imported must adhere to.
Import data via CSV file
CSV_IMPORT task allow Wocu users to import several data types into WOCU system. Data types can be one of the following:
Hosts
Contacts
HostBusinessProcess
ServiceBusinessProcess
Each CSV data type has a minimun required fields and a list of allowed fields to be imported on it
Sample /tmp/csv_import.txt:
host_name;address;use_templates
dummy_csv;127.0.0.1;generic-host
Host CSV:
Required fields:
host_name;address
Allowed fields:
host_name;address;use_templates;use_packs;alias;check_interval;
max_check_attempts;active_checks_enabled;retry_interval;hostgroups;
notifications_enabled;latitude;longitude;check_period_link;check_period;
notification_period_link;notification_period;service_excludes;service_includes;
service_overrides;check_command;business_impact;parents;poller_tag;macros;
display_name;realm;contacts;contact_groups
Contacts CSV:
Required fields:
contact_name
Allowed fields:
contact_name;alias;use;host_notifications_enabled;
service_notifications_enabled;email;pager;is_admin;password;
notificationways_link;contactgroups;notificationways
Hostgroup CSV:
Required fields:
hostgroup_name
Allowed fields:
hostgroup_name;alias;realm;host_members
bp_members;hostgroup_members
HostBusinessProcess CSV:
Required fields:
host_name;check_command;business_impact
Allowed fields:
host_name;check_command;use_templates;use_packs;
alias;check_interval;max_check_attempts;active_checks_enabled;
retry_interval;hostgroups;notifications_enabled;
latitude;longitude;check_period_link;check_period;
notification_period_link;notification_period;service_excludes;service_includes;
service_overrides;business_impact;contacts;contact_groups
ServicesBusinessProcess CSV:
Required fields:
host_name;check_command;service_description
Allowed fields:
host_name;check_command;service_description
normal_check_interval;use;business_impact
CSV file
In this field the user shall attach the file in
CSV
format with the inventory of Hosts or associated values associated with importing through the Task.
Only scan active and pending assets
This option allows you to enable data enrichment only for Hosts present in the active and pending databases, excluding from the import all other Hosts that are not present in these databases. By default the option is disabled.
It is useful for keeping WOCU’s Host information complete and up to date, as it allows updated Host data to be collected at each new CSV file reading.
Overwrite simple macros
This option allows you to enable or disable the updating of the simple macros of the Assets. By default this option is enabled.
Overwrite complex macros
This option allows you to enable or disable the updating of the complex macros of the Assets. By default this option is disabled.
Attention
Macros are elements that WOCU-Monitoring internally uses to store properties and information about monitored Assets.
A simple macro stores a single value. An example of a simple macro is “_DEVICEVENDOR”, a macro that stores as a value the name of the manufacturer of the Host. For example for a Cisco switch this example macro would have the value:
DEVICEVENDOR:Cisco.
A complex macro, on the other hand, can store a multitude of values within a table. An example of a complex macro is “_IFACES”, a macro that stores all the data of the ports and network interfaces of a Host. For example for a Cisco switch this example macro would have the value:
_IFACES:Fa0/0$(1)$$(1)$$(0)$$(0)$$(m)$,Fa1/1$$(4)$$(0)$$(0)$$(m)$, WAN_CPD_01$$(8)$$(0)$$(0)$$(0)$$(m)$…
Given the difficulty of configuring some complex macros, which may require additional manual configuration, it may be preferable to avoid overwriting them when running an Import Task. This is why this option to overwrite complex macros is disabled by default. It is advisable to use this option only with caution, when the user is sure that the execution of this option will not cause major misalignments in the configuration of the Assets.
Register as active
Enabling this option will send assets imported via CSV files directly to the Monitored Assets list. In other words, the creation in the Pending Assets list will be skipped, and they will proceed directly to monitoring.
Exclude fields
The various import tasks in WOCU-Monitoring have a set of Host attributes that are ignored by default during the import or update of the asset configuration profile.
In this field the user can manually edit the fields excluded during the asset check via the
CSV
file. It is possible to modify the list by adding new fields or deleting some of the preset ones.
Note
Clicking on the button identified by the i (Information) icon will open a new window with help information for the different fields. This action does not make any changes to the configuration.
After entering the data in the respective fields, you need to click the blue Add Tasks button to save the new Task in the list.
CSV_Inventory task
Each of the different fields that the user must fill in for the configuration of the Task is detailed below:
Important
This task solely undertakes enrichment activities on Asset inventory data already stored in the WOCU monitoring database. Under no circumstances does it initiate the discovery of new Assets.
Realm Name
This field is not editable and indicates the name of the Realm that is the subject of the Import Task.
Task Type
This field indicates the Task Type that will be generated. It is the first selectable field in the dropdown menu and influences the remaining fields.
If a different type of Task is selected before saving the changes, the previously entered data will be lost.
Name
The field contains the name chosen by the user to identify the New Task created.
Enabled
Checking this box enables and activates this new Import Task for its next execution.
By default this option is enabled.
Interval
By means of this drop-down menu it is possible to choose how often the Asset Import of this New Task will be executed. The possible options available are:
Task executed daily (Every 1 days).
Task executed every second (Every 1 second).
Contrab
An alternative option for setting the frequency at which the Task will be executed. Its configuration is done using the Crontab format, providing greater flexibility for more specific use cases.
Expand on the information about defining execution periods here.
Help Information about the CSV File
Next, the creation form provides instructions regarding the type of import task and the format that the CSV file used as the data source for the assets to be imported must adhere to.
Import hosts inventory via CSV file
Sample contents of CSV file:
host_name;type;vendor
dummy_csv;router;cisco
First column will always be host_name, and it is mandatory.
CSV file
In this field the user shall attach the file in
CSV
format with the inventory of Hosts or associated values associated with importing through the Task.
Section
This field groups the inventory data in the section specified by the user. By default, the CSV section is pre-set, but this can be freely modified or deleted.
After entering the data in the respective fields, you need to click the blue Add Tasks button to save the new Task in the list.
Note
Clicking on the button identified by the i (Information) icon will open a new window with help information for the different fields. This action does not make any changes to the configuration.
CSV_Delete task
The CSV_Delete Task allows the operator to perform bulk deletion of Hosts, Host Business Processes, or associated data by reading a file in CSV
format. For this purpose, the system will place these imported elements in the Junk Assets section for their final removal.
The task-specific configuration fields are detailed below:
Realm Name
This field is not editable and indicates the name of the Realm that is the subject of the Import Task.
Task Type
This field indicates the Task Type that will be generated. It is the first selectable field in the dropdown menu and influences the remaining fields.
If a different type of Task is selected before saving the changes, the previously entered data will be lost.
Name
The field contains the name chosen by the user to identify the New Task created.
Enabled
Checking this box enables and activates this new Import Task for its next execution.
By default this option is enabled.
Interval
By means of this drop-down menu it is possible to choose how often the Asset Import of this New Task will be executed. The possible options available are:
Task executed daily (Every 1 days).
Task executed every second (Every 1 second).
Contrab
An alternative option for setting the frequency at which the Task will be executed. Its configuration is done using the Crontab format, providing greater flexibility for more specific use cases.
Expand on the information about defining execution periods here.
Help Information about the CSV File
Next, the creation form provides instructions regarding the type of import task and the format that the CSV file used as the data source for the assets to be imported must adhere to.
Delete data via CSV file
CSV_DELETE task allows users to delete several data assets into WOCU-monitoring system. Assets can be one of the following:
- Hosts
Each CSV data type has a minimum required fields and a list of allowed fields to be imported on it.
Sample /tmp/csv_delete_import.txt:
Required fields:
host_name
Allowed fields:
host_name;information
Example of csv:
host_name;information
dummy_host_name;random info
dummy_host_name2;random info2
- Business Process Hosts
Required fields:
bphost_name
Allowed fields:
bphost_name;information
Example of csv:
bphost_name;information
dummy_bphost_name;random info
dummy_bphost_name2;random info2
Permanent delete:
By activating this checkbox, the imported elements that were already being monitored (bypassing their passage through Junk Assets) are permanently deleted, as long as they are not linked to any Host Business Process or Service Business Process.
In this case, the element will be firstly included in the list of Junk Assets for its study and evaluation.
Note
This exception does not apply to Host Groups, since the task will directly extract the element without altering any logical meeting as it does for Business Processes.
CSV file
In this field the user shall attach the file in
CSV
format with the inventory of Hosts or associated values to be deleted.
After entering the data in the respective fields, you need to click the blue Add Tasks button to save the new Task in the list.
Note
Clicking on the button identified by the i (Information) icon will open a new window with help information for the different fields. This action does not make any changes to the configuration.