Extracting data from IBM Endpoint Manager
Have you ever been asked how to extract selective data from the IBM Endpoint Manager solution (also known as IEM)? When the solution is deployed over all devices, one of the hot topics is how to extract and load those devices’ information on other databases, like a Configuration Management Database (CMDB).
One thing you need to know
First of all, you need to keep in mind that IBM Endpoint Manager databases can’t be accessed directly using Structured Query Language (SQL) sentences. Why is that?
The IBM Endpoint Manager product SQL database schema consists of two components: the data itself and the relationships among this data. IEM data are stored in the database in a way that is mapped out (interpreted) by the IEM components (IEM console, IEM Web Reporting and others) so that it can be properly visualized.
Therefore even if we could provide an SQL to access the data, those data would need to be parsed or interpreted.
This behavior (that is, the way the data is mapped) has been implemented in order to optimize read/write database access for Endpoint Manager.
Tools available for retrieving data
IBM Endpoint Manager does, however, offer a REST API that you can use to retrieve the required data. More details can be found at this link.
Regarding the REST API component, there are two ways to extract information from the Endpoint Manager database:
- Use the computer IDs one by one to retrieve the properties (not efficient).
- Use the “query” verb of the REST API together with session relevances. In this approach the Endpoint Manager Server will retrieve the info through the Web Reporting component, and output is provided in XML format.
In this post I will develop the second option to show you how to extract selected data from the devices’ numerous properties. You would not want to load excessive data on your CMDB but only the data necessary for your processes. This is quite easy when you know relevance language; however I will show how to create the sentence to extract this information.
Let’s say that you want to extract the following properties from your managed devices:
- Serial number
- Computer name
- IP address
- Computer ID
- Free space on system drive
Once the properties are extracted you can redirect the output to a file and then use it to load the data onto your CMDB.
Here are the steps:
The first thing you will do is to connect the REST API through the API CLI (command line interface).
You will need to connect to your Endpoint Manager server and then enter your username and password to access to your IEM environment.
Once you are connected to your Endpoint Manager environment, you can run the samples command to get information about your IEM environment:
For example, gather all the devices managed. From the command line you will run:
- iem get computers
Then, you will want to know all the properties for each device managed. From the command line you will run:
- iem get query –relevance=”(values of it, display names of properties of it) of (property results of bes computers)
Then, once you get the data on computers and properties, you will step to another level, which is to gather selected properties from your managed computers in order to retrieve only the required data to load onto your CMDB.
Next, you will execute the following command to extract the eight properties listed above. From the command line you will run:
- iem get query –relevance=”(values of it, display names of properties of it) of (property results of bes computers) whose (display name of properties of it is ”User Name” or display name of properties of it is ”RAM” or display name of properties of it is ”OS” or display name of properties of it is ”Serial Number” or display name of properties of it is ”Computer Name” or display name of properties of it is ”IP Address” or display name of properties of it is ”Computer ID” or display name of properties of it is ”Free Space on System Drive”)”
I developed this process for a customer that required a quick way to extract Endpoint Manager data without the need to log onto the IEM console or IEM Web Reports. Also, the output of this process can be changed very quickly by removing and adding any new properties you need without having to access the IEM UI. Bear in mind that this process can be run daily, weekly or monthly just by adding the sentences to a file and adding it to the Windows Scheduler.
Are you aware of any other process to extract selectively Endpoint Manager information that requires less time? Share your comments below.Tags: CMDB, IBM Endpoint, IBM Endpoint Manager, IBM Endpoint Manager Suite, IEM