It can be time consuming to add large numbers of systems to Uptime Infrastructure Monitor using the web interface. As a quicker alternative, you can add multiple systems to Uptime Infrastructure Monitor using the addsystem command line utility and a text file.
The text file, referred to as a hosts file, contains entries that mirror the fields in the Add System window of the Uptime Infrastructure Monitor web interface. These fields contain information about the systems to be added. The addsystem utility requires the hosts file to be located in the scripts sub-folder of the directory in which the monitoring station is installed.
The following text provides an example of the entries in a hosts file:
In the hosts file:
- The information for each host consists of a name-value pair. Each name-value pair is on a separate line, and is separated by a colon. For example, Group: Solaris Servers.
- The information for each host is separated by two percentage signs (%%) on a new line.
Creating a Hosts File
There are several ways to create a hosts file. The simplest option is to use a text editor to create the file and type the required entries. If you have a large number of systems to add, you can copy and paste each entry, and simply modify the appropriate fields. The sample host file attached to this article contains example entries that you can use as a template for your host file.
If you have a list of all your systems in a spreadsheet, you can save the list as a text file or a comma separated values (.csv) file and then write a script to manipulate the text or .csv file into the proper format.
Fields in the Hosts File
The following table describes the fields used in the hosts file. The fields required to add a system will vary depending on the type of system being added. For example, to add an agent system, you only need to include the Host Name, Type and Port fields (see Managing Your Infrastructure for more information). An example of a properly formatted hosts file is attached to this article (see below).
The name or IP address of the system to add to Uptime Infrastructure Monitor.
The name for the system that will appear in the Uptime Infrastructure Monitor UI.
A short description of the system (optional field).
The type of system, which can be one of the following:
The name of the Uptime Infrastructure Monitor service group (which enables you to simultaneously apply common service checks to hosts that you are monitoring) to which you want to add the system (optional field).
The port number that you will use to connect to the system (leave this field blank to use the default port for the type of system that you are adding).
If you are adding a Net-SNMP system to Uptime Infrastructure Monitor, specify the read community (which acts like a user ID or password) that gives you access to the system. Valid options are:
If you are adding a Net-SNMP or Novell NRM system to Uptime Infrastructure Monitor, specify the user name required to access the system.
If you are adding a Net-SNMP or Novell NRM system to Uptime Infrastructure Monitor, specify the password required to access the \nsystem.
The name of the entity group (a set of systems that have been combined in a meaningful way) to which you want to add this system (optional field).
For agent systems, use this field to specify if Uptime Infrastructure Monitor will securely communicate with an agent installed on the system using SSL. Valid options are true and false (optional field).
For Net-SNMP systems, use this field to determine how encrypted information traveling between the Net-SNMP \ninstance and Uptime Infrastructure Monitor will be authenticated. Valid options are:
For Net-SNMP systems, the password that will be used to encrypt information traveling between the Net-SNMP \ninstance and Uptime Infrastructure Monitor.
For Net-SNMP systems, how information traveling between Uptime Infrastructure Monitor and the Net-SNMP instance \nis encrypted. Valid options are:
For virtual nodes, use this field to specify if Uptime Infrastructure Monitor can contact the virtual node using the icmp ping utility. Valid options are true and false.
Adding Multiple Systems to Uptime Infrastructure Monitor
To add multiple systems to Uptime Infrastructure Monitor with the addsystem utility:
- Copy the hosts file to the scripts folder in the directory where you installed the Uptime Infrastructure Monitor monitoring station. \n
For example, if you installed the monitoring station in the default location, copy the hosts \nfile to the following folder:
- At the command line, navigate to the scripts folder.
Enter the following command:
Where: <path_and_filename> is the name of the text file that contains the list of systems that you want to add to Uptime Infrastructure Monitor, along with its full path.
The systems listed in the file are added to Uptime Infrastructure Monitor, unless:
- Uptime Infrastructure Monitor cannot connect to the system.
- The system does not exist in your environment.
- The system has already been added to Uptime Infrastructure Monitor.