Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 

Contrail Insights SDKs

 

The Contrail Insights software development kit (SDK) is a Python library that can be used to interact with the Contrail Insights Platform using the Contrail Insights REST API. The following steps describe how to install and use the Contrail Insights SDK.

  1. Unpack the SDK TAR file.
  2. Set HTTP proxy environment variables, if required for access to the Internet. Dependencies will be downloaded from the Internet in Step 4.
  3. Create a virtual environment (venv) for running the SDK.
  4. Download the Python packages required for the SDK.
  5. Unset the HTTP proxy environment variables (if set in Step 2).
  6. Set OpenStack variables required for Contrail Insights.

    The PagerDuty Configuration, Custom Notification Configuration and ServiceNow Configuration sections are optional.

  7. Set the PYTHONPATH environment variable to include appformix directory.
  8. Edit and run the sample scripts in the samples directory.

    Example: Script to get metrics for a host for a specific period.

    Example: Script to configure an alarm for CPU usage of hosts in an aggregate.

    Example: Script to generate usage reports for all hosts and all projects.

    Example: Script to create a new host aggregate.

Related Documentation