SL1 allows users to manually create physical devices without running discovery. When you manually create a physical device, a device record exists in SL1 before SL1 can communicate with the device.
In some cases, service providers find it useful to pre-populate a SL1 System with device records but set the status of the manually created devices to disabled. When network and firewall work is completed, the provider can enable the devices and use the Discovery tool to keep the device data up-to-date.
You can manually create a physical device in three ways:
- In the user interface
- By uploading device data via a CSV file
- With the ScienceLogic API
Requirements
Before manually creating a device record in SL1, you must have the following information:
- Unique IP address for each device that you want to create. The IP address must be unique in SL1 so it can be used to communicate with the device.
- Organization ID. If you use the API to manually create a physical device or if you manually create multiple devices in bulk using a CSV file, you must supply the organization ID for an existing organization.
Using the User Interface to Create a Physical Device
Creating a Physical Device in the User Interface
To manually create a physical device using the user interface:
- Go to the Device Manager page (Devices > Classic Devices, or Registry > Devices > Device Manager in the classic SL1 user interface).
- Click the Create Physical Device. The Create Physical Device modal page appears. menu and select
- In the Create Physical Device modal page, supply the following:
- IP Address. Required. Enter an IP address that is unique in the device's collector group and can be used to communicate with the device.
- Device Name. Optional. Enter a device name for the device.
- SNMP Credential. Optional. Select from a list of SNMP credentials. If no credential is selected, the default value of NO CREDENTIAL is assigned to the new device.
- Organization. Optional. Select from a list of organizations. If no organization is selected, the default organization, System, is assigned to the new device.
- Device Class. Optional. Select from a list of device classes. If no device class is selected, the default device class, Ping | ICMP, is assigned to the new device.
- CUG. Optional. Select from a list of collector groups. If no collector group is selected, the collector group with the lowest ID is assigned to the new device.
- Click to add the new physical device.
SL1 will not allow a new device to be added with a public IP address that is not unique system-wide or a private IP address that is not unique to the selected Collector Group.
Managing Physical Devices Created in the User Interface
After an administrator manually creates a physical device, the device appears in the Device Manager page (Devices > Classic Devices, or Registry > Devices > Device Manager in the classic SL1 user interface).
The new device can be managed like any physical device in SL1. However, the following caveats apply:
- No Dynamic Applications are automatically aligned with the device.
- No interfaces are discovered and no interface data is included with the device record.
If you want to disable Auto-Update and disable Collection for the new device, see the details in the
If you want to discover the device using the Discovery tool, see the section on
Using a CSV File to Create Multiple Physical Devices
SL1 allows users to manually create multiple physical devices simultaneously by uploading device data in a CSV file.
The following fields are supported:
- ip. Required. An IP address that is unique in the device's collector group and can be used to communicate with the device.
- organization. Required. The ID of an existing organization.
- name. Optional. A name for the device.
- class_type. Optional. If no device class is included, the default device class, Ping | ICMP, is assigned to the device.
- snmp_cred_id. Optional. An SNMP credential associated with the device. If no SNMP credential is included, no credential is associated with the device.
- collector_group. Optional. The collector group (CUG) assigned to the new device. If no CUG is included, SL1 assigns the CUG from the top of the list of all CUGs, sorted numerically by ID.
SL1 generates an error if a required field is excluded from the CSV file or if non-supported fields (for example, hostname) are included in the CSV file.
The CSV file must contain a comma-separated header line that indicates the fields used, followed by comma-separated lines for each device. The CSV file must include the ip and organization fields at a minimum, and can include additional fields. You must enter the field names in lowercase with no space between field names. Because the field names must match the corresponding parameters in the API, you must enter the field names exactly as follows:
- ip
- organization
- name
- class_type
- snmp_cred_id
- collector_group
For example, to create two devices using only the required fields of IP address and organization, the CSV file must contain the following:
ip,organization
10.2.9.42,1
10.2.10.42,1
To create "Device A" and "Device B" using all supported fields, the CSV file must contain the following:
ip,organization,name,class_type,snmp_cred_id,collector_group
10.2.9.42,1,Device A,Ping,37,1
10.2.10.42,1,Device B,Ping,37,1
Do not include spaces between the comma-separated values in the CSV file.
Creating Multiple Physical Devices Using a CSV File
To manually create multiple physical devices using a CSV file:
- Go to the Device Manager page (Devices > Classic Devices, or Registry > Devices > Device Manager in the classic SL1 user interface).
- Click the Create Physical Devices From File. The Bulk Physical Device modal appears. menu and select
- In the Bulk Physical Device modal, click , then select the desired CSV file.
- Click Bulk Physical Device modal displays log messages as each new physical device is created or if any errors occurred while adding a device. to import the CSV file and create the physical devices. The
- If an error occurred importing a device, select the wrench icon () for a that device to open the manually edit the settings for that device. The Creating a Physical Device in the User Interface section describes the user interface for adding a single device manually.
SL1 will not allow a new device to be added with a public IP address that is not unique system-wide or a private IP address that is not unique to the selected Collector Group.
Managing Physical Devices Created Using a CSV File
You can use the ScienceLogic user interface to manage the newly created devices. For details, see the section Managing Physical Devices Created in the User Interface.
Using the API to Create a Physical Device
Creating a Physical Device with the API
You can use a POST request to the /device API resource to manually create a physical device in SL1.
The following fields are supported:
- ip. Required. Supply an IP address that is unique in SL1 and can be used to communicate with the device.
- organization. Required. Supply the relative API URI for an existing organization, e.g. /api/organization/0.
- name. Optional. Supply a name for the device.
- snmp_cred_id. Optional. Specify the relative API URI of an existing SNMP credential. If no credential is selected, no credential is assigned to the new device.
- class_type. Optional. Specify the relative API URI of an existing device class. If no device class is selected, the default device class, Ping | ICMP, is assigned to the new device.
- collector_group. Optional. Specify the relative API URI of an existing collector group. If no collector group is selected, the collector group with the lowest ID is assigned to the new device.
Example
The following example creates a physical device using the API:
curl -v -H 'X-em7-beautify-response:1' -H 'accept:application/json' -H 'content-type:application/json' -u 'em7admin:<password>' "http://192.168.10.205/api/device" -d '{"name": "example-device", "organization": "\/api\/organization\/0", "class_type": "\/api\/device_class\/1547", "ip": "10.20.7.31", "snmp_cred_id": "\/api\/credential\/snmp\/69","collector_group": "\/api\/collector_group\/1"}'
- curl -v. Executes the cURL request. The -v option tells cURL to use verbose mode (displays all header information and all status and error messages). In the response, lines that start with ">" include header data returned by cURL. Lines that start with "<" include header data received by cURL.
- -H 'X-em7-beautify-response:1'. The -H option tells cURL to include an additional header in the request. In this case, we're including a ScienceLogic custom header that tells the API to include white-space in the response.
- -H 'accept:application/json'. The -H option tells cURL to include an additional header in the request. In this case, we're telling the API to return responses in JSON format.
- -H 'content-type:application/json'. The -H option tells cURL to include an additional header in the request. In this case, we're telling the API that the incoming data is in JSON format.
- -u 'em7admin:<password>'. The -u option tells cURL to authenticate as a specified user. In our example, we authenticated as the user "em7admin". You would replace <password> with the appropriate password for that user.
- "https://192.168.10.205/api/device". Connect to the specified URL. In our example, we connected to the API at 192.168.10.205 and navigated to the resource for devices.
- -d. Tells the API the following text is the data to submit as a POST request.
- The device is created using the following fields:
Field Name | Value |
---|---|
name | example-device |
organization | /api/organization/0 |
class type | /api/device_class/1547 |
ip | 10.20.7.31 |
snmp_cred_id | /api/credential/snmp/69 |
collector_group | /api/collector_group/1 |
The API returns an HTTP 201 response. The response body includes the newly created device record in JSON format.
The X-EM7-status-message header includes the device ID of the newly created device.
< HTTP/1.1 201 Created:
< Server: nginx/1.10.0
< Date: Thu, 28 Jul 2016 16:50:12 GMT
< Content-Type: application/json
< Transfer-Encoding: chunked
< Connection: keep-alive
< X-EM7-Implemented-methods: GET,POST,PUT,DELETE
< X-Powered-By: ScienceLogic, Inc. - EM7 API/Integration Server
< X-EM7-Authenticated-account: /api/account/1
< Location: /api/device/33
< Cache-Control: private, no-cache, must-revalidate, no-store, max-age=0, post-c heck=0, pre-check=0
< X-EM7-status-message: Device :33 added successfully
< X-EM7-status-code: CREATED
< Vary: Accept-Encoding
<
{
"name": "example-device",
"ip": "10.20.7.31",
"hostname": null,
"snmp_cred_id": "\/api\/credential\/snmp\/69",
"snmp_w_cred_id": null,
"class_type": "\/api\/device_class\/1547",
"collector_group": "\/api\/collector_group\/1",
"organization": "\/api\/organization\/0",
The rest of the response includes a list of all device fields, each set to its default value.
Managing Physical Devices Created with the API
You can use the ScienceLogic user interface to manage the newly created device. For details, see the section Managing Physical Devices Manually Created in the User Interface.
You can also use the ScienceLogic API to manage the newly created device. For details,
Available Actions for the Device Resource
Action | URI | Method |
---|---|---|
View/search/filter the list of devices. | /device | GET |
Create a new physical device. Unlike for virtual device, must specify a valid IP address and the organization ID for an existing organization. |
/device |
POST |
Create a new virtual device. | /device | POST |
View the properties of a device. | /device/X | GET |
Update the properties of a device. | /device/X | POST |
Replace the properties of a device. | /device/X | PUT |
Delete a device. | /device/X | DELETE |
View/search/filter the list of Dynamic Applications aligned with a device. | /device/X/aligned_app | GET |
Align a Dynamic Application with a device. | /device/X/aligned_app | POST |
View the collection status and associated credential for a Dynamic Application aligned with a device. | /device/X/aligned_app/X | GET |
Update the collection status and associated credential for a Dynamic Application aligned with a device. | /device/X/aligned_app/X | POST |
Unalign a Dynamic Application from a device. | /device/X/aligned_app/X | DELETE |
View/search/filter the list of available configuration data for a device. | /device/X/config_data | GET |
View meta-data about data collected from a device by a configuration Dynamic Application. | /device/X/config_data/X | GET |
View data collected from a device by a configuration Dynamic Application. | /device/X/config_data/X/data | GET |
View historical snapshots of data collected from a device by a configuration Dynamic Application. | /device/X/config_data/X/snapshots | GET |
View general information collected from a device. | /device/X/detail | GET |
View/search/filter the list of credentials aligned with a device. | /device/X/device_app_credentials | GET |
View the threshold settings for a device. | /device/X/device_thresholds | GET |
Update the threshold settings for a device. | /device/X/device_thresholds | POST |
Replace the threshold settings for a device. | /device/X/device_thresholds | PUT |
Revert all device thresholds to the global default values. | /device/X/device_thresholds | DELETE |
Add an interface record to a device. | /device/X/interface | POST |
View/search/filter the list of interfaces for a device. | /device/X/interface | GET |
View the properties of an interface for a device. | /device/X/interface/X | GET |
Update the properties of an interface for a device. | /device/X/interface/X | POST |
Replace an interface record associated with a device. | /device/X/interface/X | PUT |
Delete an interface record associated with a device. | /device/X/interface/X | DELETE |
View data for an interface. | /device/X/interface/X/interface_data/data | GET |
View daily normalized data for an interface. | /device/X/interface/X/interface_data/normalized_daily | GET |
View hourly normalized data for an interface. | /device/X/interface/X/interface_data/normalized_hourly | GET |
View/search/filter the list of logs associated with a device. | /device/X/log/ | GET |
View a log associated with a device. | /device/X/log/X | GET |
Add a note to a device. | /device/X/note/ | POST |
View/search/filter the list of notes associated with a device. | /device/X/note/ | GET |
View a note associated with a device. | /device/X/note/X | GET |
Update a note associated with a device. | /device/X/note/X | POST |
Replace a note associated with a device. | /device/X/note/X | PUT |
Delete a note associated with a device. | /device/X/note/X | DELETE |
View/search/filter the list of files associated with a device note. | /device/X/note/X/media | GET |
Get a media file associated with a device note. | /device/X/note/X/media/X | GET |
Add a media file to a device note. | /device/X/note/X/media/X | PUT |
View meta-data about a media file associated with a device note. | /device/X/note/X/media/X/info | GET |
View/search/filter the list of available Dynamic Application data for a device. | /device/X/performance_data | GET |
View data for a Dynamic Application aligned to a device. | /device/X/performance_data/X/data | GET |
View daily normalized data for a Dynamic Application aligned to a device. | /device/X/performance_data/X/normalized_daily | GET |
View hourly normalized data for a Dynamic Application aligned to a device. | /device/X/performance_data/X/normalized_hourly | GET |
View/search/filter the list of available vitals data for a device. | /device/X/vitals | GET |
View availability data for a device. | /device/X/vitals/availability/data | GET |
View daily normalized availability data for a device. | /device/X/vitals/availability/normalized_daily | GET |
View hourly normalized availability data for a device. | /device/X/vitals/availability/normalized_hourly | GET |
View data for a file system on a device. | /device/X/vitals/fsX/data | GET |
View daily normalized data for a file system on a device. | /device/X/vitals/fsX/normalized_daily | GET |
View latency data for a device. | /device/X/vitals/latency/data | GET |
View daily normalized latency data for a device. | /device/X/vitals/latency/normalized_daily | GET |
View hourly normalized latency data for a device. | /device/X/vitals/latency/normalized_hourly | GET |
Apply a device template to a device. | /device/X | Post a /device_template resource. |