Importing data#
Scrutinizer leverages a variety of user-customizable entity/resource labels, definitions, and groupings as part of its data aggregation and reporting functions. These details can be manually configured via the respective admin views or imported as a batch operation using the import utility.
This section covers the syntax, requirements, and other relevant information for each type of import operation.
Note
The import utility can be accessed via the SCRUTINIZER> interactive prompt or directly from the shell. The direct shell syntax can also be included in scripts to automatically update Scrutinizer’s databases.
On this page:
ACL information#
View details
To import custom ACL information from a file, execute the following from the scrut_util interactive shell (SCRUTINIZER> prompt):
import aclfile
Direct shell/script syntax
scrut_util --import aclfile
File requirements
The file must contain the exact output when the command
show access-listis run on the exporter.The file should be named
acl_file.txtand saved to the/home/plixer/scrutinizer/files/directory.
Applications#
View details
To import a list of application definition rules, execute the following from the scrut_util interactive shell (SCRUTINIZER> prompt):
import applications <PATH/FILE> [reset]
Direct shell/script syntax
scrut_util --import applications --file <PATH/FILE> [--reset]
File requirements
The file to be imported must be a CSV file.
Using the file /home/plixer/scrutinizer/files/ipgroup_import.csv for application rule definitions is recommended.
Definition format
Each application-rule pairing should be in a single line, following the format:
'APPLICATION NAME',RULE
Additional notes
Rules can defined as any of the following:
Subnets
Single IP address
IP address ranges
Wildcard masks
Child rules (must be defined first)
Port and protocol
For an application definition to be valid, it must include at least one port rule and one rule of any other type. The import file may include applications that do not meet this requirement, but they will not be considered a defined application by Scrutinizer.
Passing the
resetoption will delete all existing application definitions/rules before the import operation.If the
resetoption is not used, imported rules will be added to the specified application if it already exists.Each import operation supports up to 100,000 application rule definitions.
Definition examples
Rule types:
'Application subnet rule',10.0.0.0/8
'Application single IP rule',10.1.1.1
'Application IP range rule',10.0.0.1-10.0.0.42
'Application wildcard mask rule',10.0.0.1/0.255.255.0
'Parent application with a child rule', 'My Child Application Rule'
'Application port and protocol rule',0-65535/256
ASN definitions#
View details
To import a list of custom ASN definitions, execute the following from the scrut_util interactive shell (SCRUTINIZER> prompt):
import asns <PATH/FILE> [DELIMITER]
Direct shell/script syntax
scrut_util --import asns --file <PATH/FILE> [--delimiter <DELIMITER>]
File requirements
The file to be imported must be a CSV file, and the path provided must be relative to the home/plixer/scrutinizer/ directory. The file’s name should only include lower-case letters.
Definition format
Each ASN definition should be in a single line, following the format:
'AS_NUMBER',AS NAME,AS Description,IP_NETWORK(S)
Additional notes
The optional
DELIMITERparameter can be used to replace `` `` (space) for separating individual IP networks if the contents of the import file are formatted differently.,(comma) cannot be used as a custom delimiter, as it is reserved for separating elements in the definition.
Definition examples
213,My ASN,what a great autonomous system,10.0.0.0/8 192.168.0.0/16
214,Your List,this system is only meh,11.0.0.0/8
Custom hostnames#
View details
To import a list of custom hostname assignments, execute the following from the scrut_util interactive shell (SCRUTINIZER> prompt):
import hostfile
Direct shell/script syntax
scrut_util --import hostfile
File requirements
The file should be named hosts.txt and saved to the /home/plixer/scrutinizer/files/ directory.
Definition format
Each definition should be in a single line, following the format:
IPv4orIPv6ADDRESS HOSTNAME DESCRIPTION
Additional notes
This command will alter the Scrutinizer database tables and should be used with caution.
The description element in the definition is optional.
Definition example
10.1.1.4 my.scrutinizer.rocks The best software in my company
Device GPS details#
View details
To import a list of device/object latitude and longitude details for a specified geographical network map, execute the following from the scrut_util interactive shell (SCRUTINIZER> prompt):
import csv_to_gps <PATH/FILE> <GROUP NAME|GROUP_ID> [create_new] [FORMAT]
Direct shell/script syntax
scrut_util --import csv_to_gps --file <PATH/FILE> --group <GROUP_NAME|GROUP_ID> [--create_new] [--file_format <FORMAT>]
File requirements
The file to be imported must be a CSV file, and the path provided must be relative to the home/plixer/scrutinizer/ directory.
Definition format
Each set of details should be in a single line, following the format:
IP_ADDRESS,LATITUDE,LONGITUDE
Additional notes
The imported GPS details are only assigned to objects for the specified device/mapping group. If the devices are assigned to other groups, they will retain the GPS details configured for those groups.
The optional
FORMATparameter can be used to override the defaultip,lat,lngelement formatting in case the contents of the import file are formatted differently (e.g.,ip,lng,lat).If the
create_newoption is used, objects will be created for devices in the import file that are not currently assigned to the specified device group.
Definition examples
10.169.1.3,37.7749,122.4194
192.168.6.1,40.7128,74.0059
Mapping groups#
View details
To import a list of device/mapping group assignments, execute the following from the scrut_util interactive shell (SCRUTINIZER> prompt):
import csv_to_membership <PATH/FILE> <TYPE> [FORMAT]
Direct shell/script syntax
scrut_util --import csv_to_membership --file <PATH/FILE> --grouptype <TYPE> [--file_format <FORMAT>]
File requirements
The file to be imported must be a CSV file, and the path provided must be relative to the home/plixer/scrutinizer/ directory.
Definition format
Each assignment should be in a single line, following the format:
IP_ADDRESS,GROUP_NAME
Additional notes
The
TYPEparameter specifies the device/mapping group type for any groups that will be created as part of the import operation. Valid values areplixer(for spatial maps) andgooglefor geographical maps.The optional
FORMATparameter can be used to override the defaultipaddr,groupelement formatting in case the contents of the import file are formatted differently (e.g.,group,ipaddr).
Definition examples
10.169.1.3,Routers
192.168.6.1,Firewalls
Interface details#
View details
To import a list of custom interface details to use for displaying utilization, threshold alerts, and other Scrutinizer functions, execute the following from the scrut_util interactive shell (SCRUTINIZER> prompt):
import ifinfo <PATH/FILE> [DELIMITER]
Direct shell/script syntax
scrut_util --import ifinfo --file <PATH/FILE> [--delimiter <DELIMITER>]
Definition format
Each set of details should be in a single line, following the format:
INBOUND_SPEED,OUTBOUND_SPEED,NAME,HOST_IP,INDEX_NUMBER
Additional notes
This command will alter the Scrutinizer database tables and should be used with caution.
The optional
DELIMITERparameter can be used to replace,(comma) for separating elements in each set of details if the contents of the import file are formatted differently.
Definition examples
10000000,10000000,WAN_Interface_1,192.168.1.2,2
20000000,20000000,WAN_Interface_1,192.168.1.4,11
IP groups#
View details
To import a list of IP group inclusion definitions, execute the following from the scrut_util interactive shell (SCRUTINIZER> prompt):
import ipgroups <PATH/FILE> [reset]
Direct shell/script syntax
scrut_util --import ipgroups --file <PATH/FILE> [--reset]
File requirements
The file to be imported must be a UTF8-encoded CSV file.
Definition format
Each inclusion definition should be in a single line, following the format:
IP GROUP NAME,INCLUSION_RULE
Additional notes
Rules can defined as any of the following:
Subnets (e.g.,
Subnet Group,10.0.0.0/8)Single IP address (e.g.,
Single IP Group,10.1.1.1)IP address ranges (e.g.,
IP Range Group,10.0.0.1-10.0.0.42)Wildcard masks (e.g.,
Wildcard Mask Group,10.0.0.1/0.255.255.0)Child groups (must be defined first; e.g.,
Parent/Child Group, Subnet Group)
Passing the
resetoption will delete all existing IP group definitions before the import operation.If the
resetoption is not used, IP addresses covered by an imported inclusion rule will be added to the specified IP group if it already exists.Because each line can contain only one rule, an IP group containing multiple single IP addresses will need to be defined using a separate definition/line for each address. Multiple rules in separate lines for the same IP group are also supported (see examples below).
Each import operation supports up to 100,000 IP group inclusion definitions.
Definition examples
Multiple single addresses:
HR Group,10.1.1.1
HR Group,192.168.3.4
HR Group,10.3.1.2
Multiple rules/types:
New IP Group,10.0.0.1-10.0.0.42
New IP Group,10.0.0.1/0.255.255.0
New IP Group,Subnet Group