search cancel

How to Enable/Disable Event Profiles outside of the UI

book

Article ID: 133842

calendar_today

Updated On:

Products

CA Performance Management - Usage and Administration

Issue/Introduction

In order to better align with normal business hours, how can Threshold Profiles be Enabled and Disabled through automated or scripted means?


There is no current way to set Business Hours on the raise of Threshold Events. To get around this limitation we can leverage REST web services present on the Data Aggregator to accomplish this task.

Cause

Need to control the timing for Threshold Events being raised in some cases to align with business hours.

Environment

All supported Performance Management releases

Resolution

The high level steps for this process are:

  1. Identify the ID for the targeted Event Profile.
  2. Using a REST PUT statement change the state of the Event Profile to either Enabled (True) or Disabled (False).

Where ever we see <DA_Host> replace it with the real Data Aggregator Host Name or IP Address.


A: Use the following URL in a browser, or via GET in a REST client, to see all Event Profiles.


http://<DA_Host>:8581/rest/eventprofiles


Identify the ID for the Event Profile.


B: Using the ID for the Event Profile found in step A launch the following URL in a browser, or via a GET call in a REST client. Replace <ID> with the ID number identified.


http://<DA_Host>:8581/rest/eventprofiles/<ID>


In this output note the entry for the state of the Profile:  <Enabled>true</Enabled> or <Enabled>false</Enabled>.


C: In a REST API, run a PUT call using the following URL. Replace <ID> with the ID number identified.


http://<DA_Host>:8581/rest/eventprofiles/<ID>


The Body for this REST call will contain these three lines. No other information is needed. Change the Enabled value by setting it to:

  • true to Enable the Profile and generate Events
  • false to Disable the Profile and prevent Event generation


<EventProfile version="2.0.0">

    <Enabled>true</Enabled>

</EventProfile>


Confirm a "Status: 200 OK" success response is returned from the PUT call.


Run the GET call for the ID to confirm the value has been updated. The change should also be reflected in an updated web page for the related Event Profile in the PM web UI.

Additional Information

r20.2 Documentation for REST web services.

 

https://techdocs.broadcom.com/us/en/ca-enterprise-software/it-operations-management/performance-management/20-2/apis/data-aggregator-rest-webservices.html