RPC API: Add a Collector
Note that LogicMonitor does have an available REST API equivalent for this API call.
Collectors are used to gather data from your hosts and send it to LogicMonitor. They are installed and run on a host within your infrastructure. The LogicMonitor API allows you to manage collectors programmatically. With the addAgent RPC API call you can add and install a collector.
Note: As with all of our API calls, authentication is required.
New collectors can be added with three steps:
- Create the collector record in your LogicMonitor account
- Download the collector installer
- Run the install file on the selected host
Note: Once a collector record is created, the corresponding installer is only valid for two hours.
Step 1. Add a Collector record into your account
Request Parameters: You can include the following as query parameters in an addAgent RPC call:
All outputs will be in the format: { [status], [data], [errmsg] }, where status is the status of the response, errmsg is the error message associated with the response, and the data object includes the following:
Step 2. Download the Installer
After the collector is created and registered in your LogicMonitor account an install file must be downloaded and executed.
Step 3. Silent Installation
The last step in adding a collector is running the install file on the selected server. The device where the collector resides will need to be a Windows or Linux (physical or virtual) server with an outgoing SSL connection over port 443 to the LogicMonitor servers.