VMware Cloud Community
cjlougee
Contributor
Contributor
Jump to solution

vRealize Operations 8.6 - How to enable vRealize Log Insight adapter via API

I am working with some automation that deploys and configures vROPs and we recently updated to 8.6, which is causing an issue with the automation.

As a normal part of the configuration, the code will configure the vRLI adapter (LogInsightAdapter) through the api endpoint /suite-api/api/adapters. However, with 8.6, I found that the vRLI adapter is disabled by default which is makes the request to /suite-api/api/adapters fail. The error I get is "No such Adapter Kind - LogInsightAdapter".

If I go to the vROPs UI and look at Data Sources -> Integrations -> Repository ->Available Integrations -> vRealize Log Insight and click activate, the vRLI adapter becomes available to use and the automation works fine again.

The part I've been struggling with is finding a way to activate the vRLI adapter via API or some other automated means. I've found the pakid is MPforLogInsight-8618741595. I've tried playing around with the casa and suite-api, but I'm not really having much luck.

Anyone know of a way I can activate the vRLI adapter by automated means?

0 Kudos
1 Solution

Accepted Solutions
cjlougee
Contributor
Contributor
Jump to solution

Well I found a way using the UI api. I'm not sure if it's totally the right way, but it works.

General flow

  • Log in using post to https://<vrops ip>/ui/login.action
    • Headers
      • Referer - https://<vrops ip>/ui/login.action
        Origin - https://<vrops ip>
        X-Requested-With - XMLHttpRequest
    • Body:
      • mainAction - login
        userName - user
        password - password
        authSourceId - localItem
        authSourceName - Local Users
        authSourceType - LOCAL
    • Store the cookie returned
  • Get the secure token from GET to "https://<vrops ip>/ui/commonJS.action?_dc=<Date code>&mainAction=getApplicationGlobalData"
    • Headers
      • Referer - https://<vrops ip>/ui/login.action
        Origin - https://<vrops ip>
        X-Requested-With - XMLHttpRequest
        Cookie - cookie from log in request
    • Store the secure token
  • Enable the vrli adapter with a POST to https://<vrops ip>/ui/solution.action
    • Headers
      • X-Requested-With - XMLHttpRequest
        Referer - https://<vrops ip>/ui/index.action
        Cookie - cookie from log in request
        Origin - https://<vrops ip>
    • Body
      • currentComponentInfo - TODO
        secureToken - secure token from second request
        mainAction - enable
        pakId - MPforLogInsight
        version - 8.6.18741595
      • Note version may be different over time
  • After a minute the vrli adapter should be enabled

View solution in original post

0 Kudos
1 Reply
cjlougee
Contributor
Contributor
Jump to solution

Well I found a way using the UI api. I'm not sure if it's totally the right way, but it works.

General flow

  • Log in using post to https://<vrops ip>/ui/login.action
    • Headers
      • Referer - https://<vrops ip>/ui/login.action
        Origin - https://<vrops ip>
        X-Requested-With - XMLHttpRequest
    • Body:
      • mainAction - login
        userName - user
        password - password
        authSourceId - localItem
        authSourceName - Local Users
        authSourceType - LOCAL
    • Store the cookie returned
  • Get the secure token from GET to "https://<vrops ip>/ui/commonJS.action?_dc=<Date code>&mainAction=getApplicationGlobalData"
    • Headers
      • Referer - https://<vrops ip>/ui/login.action
        Origin - https://<vrops ip>
        X-Requested-With - XMLHttpRequest
        Cookie - cookie from log in request
    • Store the secure token
  • Enable the vrli adapter with a POST to https://<vrops ip>/ui/solution.action
    • Headers
      • X-Requested-With - XMLHttpRequest
        Referer - https://<vrops ip>/ui/index.action
        Cookie - cookie from log in request
        Origin - https://<vrops ip>
    • Body
      • currentComponentInfo - TODO
        secureToken - secure token from second request
        mainAction - enable
        pakId - MPforLogInsight
        version - 8.6.18741595
      • Note version may be different over time
  • After a minute the vrli adapter should be enabled
0 Kudos