Log Insight REST API

I am currently working on some PowerShell scripts to verify the user and group permissions on VMware products. For vCenter Server, the PowerCLI provides cmdlets to do the job. However for vRealize Operations Manager (vROPS) and Log Insight this is not the case (Yes, vROPS has some cmdlets but not for getting permissions). Luckily, both products do include a REST API, so time to investigate.

PowerShell offers two commands to interact with REST API’s; Invoke-WebRequest and Invoke-RestMethod. After reading this post from Adam Bertram I decided to give Invoke-RestMethod a try, the next step was how to start?

Reading “Introduction to PowerShell Rest API Authentication” from Joshua Stenhouse, was very helpful. So after some practicing with his vROPS example, which can be found here, it was time to figure out how to setup authentication for Log Insight.

A good starting point is the API documentation. Besides documentation, the Log Insight GUI also provides access; In the upper-right corner, open the drop-down menu and select Help. On this page, you will find a link to the REST API Documentation.

The REST-API can also directly be accessed by this URL:
https://fqdnLogInsight/rest-api.

Continue reading

vROPS Alerts, a closer look

In a previous post I demonstrated a way to see the contents of REST messages.

Since the properties of the REST message were not quite clear to me, I also configured the Standard Email plugin in the Outbound Settings of vROPS in addition to the REST notification plugin and added it to the notification Settings. Alerts are now sent in 2 ways and can be compared.

As an example the content of a “Virtual machine disk I/O write latency is high”.
BTW, my vROPS version is  8.2.0.

First, the email at the time the Alert was generated.

Continue reading