You can use the API to deploy event collection on a virtual machine. Include a message body specifying the event profile you want to use.
Note: Event Collection profiles are configured from the CA User Activity Reporting Module user interface. See the CA User Activity Reporting Module Online Help for more information on configuring Event Collection profiles.
The following procedure illustrates how to deploy a collection using the cURL utility.
Follow these steps:
<deploymentRequest> <tenant>Default</tenant><profile>syslog test</profile><host>syslogsource.ca.com</host><ip>10.0.0.0</ip><credentials><user>root</user><password>rootpw</password></credentials></deploymentRequest>
The following parameters are available:
Names the virtual tenant where you want to deploy event collection. You can get a list of available tenants using /tenants.
Names the event collection profile you want to use. You can get a list of available profiles using /collectionprofiles.
Names the event source from which you want to collect events.
Specifies the IP address of the event source from which you want to collect events.
Contains the elements that supply the username and password for access to the event source. This element is only required for connection profiles that are set to require credentials.
curl -u elm_user:elm_password -k -H "Accept: application/xml" -H "Content-Type: application/xml" -X POST -d @deploy.txt "https://hostname:8443/rest/am/1/deploycollection"
The "-d @deploy.txt" element delivers the content of the text file in the body of the request.
If the deployment is successful, you receive an HTTP 201 (CREATED) message:
HTTP/1.1 201 Created Location: http://myelmhost:8443/rest/agentgroups/Agents/agents/014589ec-4b97-4179-8778-65b1671996f8/connectors/1cde5aa8-e11c-4c36-b7cc-712477c9f52f/sources/10.0.0.0 Content-Type: application/xml <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <eventTarget> <host>10.0.0.0</host> <tcpPort>1468</tcpPort> <udpPort>40514</udpPort> </eventTarget>
The response shows the URI of the deployed resource, following "Location:".
This information can be used to modify or delete the deployment. In the preceding example, the deployed resource is a passive connector, so the "eventTarget" element appears. EventTarget shows the port and IP address information for the connector, allowing you to configure the event source to transmit events to the proper target.
If there is not enough capacity available in the selected agent group, an error message (HTTP 507) appears.
Copyright © 2013 CA.
All rights reserved.
|
|