Highlights from NetApp Insight 2018’s: 1266-3 Accelerating Success through Integrations with OnCommand Insight

Too many highlights really - well worth catching this packed presentation:

OnCommand Insight’s Value Proposition
- OCI is a data center infrastructure analytics solution
- You leverage it for managing your hybrid cloud infrastructures
- OCI provides a detailed and consistent view of inventory and performance across your entire heterogeneous IT environment.

Image: OnCommand Insight Ecosytem (with ServiceNow and BMC integration)

How does integrating OnCommand Insight help accelerate your success?
Three primary tenants of OCI that benefit from integrations:
1) Intelligent Operations
2) Business Insights
3) IT Ecosystem Integration

Integration Pack #1: Integrating OnCommand Insight with ServiceNow
How does OnCommand Insight complement your ServiceNow?
- Use the OCI Connector to populate your ServiceNow with:
--- Storage Inventory
--- Relationships from Servers to Storage Servers
--- Relationships from Storage Servers to Servers

Image: Integrating OCI with ServiceNow

Image: How does integrating ServiceNow with OCI work?

How is it Setup and Configured?
- Download the ServiceNow Connector from the NetApp Automation Storefront:
- Upload and apply the update set to ServiceNow to prepare the environment.
- Edit the config file to define your OCI server and SNOW instance names, users and passwords.
- Run the python script to initialize, test, and then sync.
- Works with Windows or Linux.

Expansion of the ServiceNow Connector
The ServiceNow Connector acts as a foundation script for additional customizations that can be expanded upon through NetApp Professional Services.

Image: Bringing Additional Storage Management Data into ServiceNow

Integration Pack #2: VMware Folder Structures in OCI
OCI Business Entities help you define levels of your business
- These OCI structures help you define hierarchical areas of your business for chargeback, showback, and more…
For example: Tenant > Line of Business > Business Unit > Project

Pulling VMware Folder Structures into OCI as Business Entities
- These folder structures can be pulled from vSphere and into OCI as your business entities.

How is it Setup and Configured?
- Prepare a server with python and required packages noted in readme file (can be Windows or Linux).
- Download VSphere VM Folder Structure in OCI from the NetApp® Automation Storefront (in the scripts section): https://automationstore.netapp.com/onCommandInsight.shtml
- Run the script with parameters according to your needs as described in the readme file.

OnCommand Insight Integration Packs: Plugins - Ingesting Metrics into OCI
Why would I want to do this?
- There may be devices OCI does not yet support (or is not able to support), but which are important to a specific solution needed in your environment.
- Or, you want specific counters that aren’t available in a particular data source to troubleshoot an issue.
- You may just want to see more about your data than the average person.

Integration Pack #3: Data Collector: Metricbeat (by Elastic)
Additional counters for correlation, analysis and troubleshooting.
- MetricBeat is an OCI plugin for the lightweight metrics shipper - Metricbeat - that you can install on your servers to collect additional metrics.
- You can ingest these external performance metrics into OCI dashboards for:
--- Troubleshooting
--- Performance Analysis
--- Capacity Planning
- Available on the Automation Store
- Works with Windows or Linux

Modules for Elastic Metricbeat:
- Apache, Docker, Elasticsearch, Kubernetes, MongoDB, MySQL, Nginx, PostgreSQL, Redis, System, Zookeeper, and more ...

How is it Setup and Configured?
- Install Go and Beats on the target server you want to collect from.
- Download the Metricbeat integration pack from the NetApp Automation Storefront: https://automationstore.netapp.com/onCommandInsight.shtml
- Build the oci metricbeat module with Go.
- Using REST, create an integration agent on OCI server with a POST which returns a token.
- Configure integration modules to collect on in `metricbeat.yml` file:
--- Make sure the token returned by the POST is put in the `metricbeat.yml` file in the OCI server config.
- Update the integration agent with a PUT sending the integration name (cpu, diskio, etc.)

Another Integration: Data Collector: OCI Write Plugin for collectd
More open source capabilities to gather metrics for specific solutions
- collectd is an OCI plugin for the collectd system statistics collection daemon.
- Like the Metricbeat integration, you can ingest these external performance metrics into OCI dashboards for: Troubleshooting, Performance Analysis, Capacity Planning, ...
- Works primarily with Linux, but there is a Windows collectd version available from a private party online (not tested).

How Is It Setup and Configured?
- Register the integration with the OCI server and receive a token to use when the setup script is run:
curl -k -XPOST --data '{"description": "Collectd OCI integration", "integrations":["*"]}' -H 'Content-Type: application/json' -uadmin:admin123 https://{ip.address}/rest/v1/integrationAgents
- Get the setup python script from github and put it on your target server:
wget https://raw.githubusercontent.com/NetApp/OCI_collectd/master/src/setup.py
- Run the python setup script:
sudo ./setup.py --host-name {ip.address} --token {your token from the curl goes here}
- Edit the collectd config file to set desired plugins to be active and restart collectd.

OnCommand Insight REST API

REST API documentation
- In the OCI Server navigate to the help (?) icon
- The REST API documentation page:
--- API version in the header
--- ‘API Samples’, examples in Python, PowerShell and Java
--- The ‘Getting started’ PDF
--- All the documented and preview API calls (Swagger Docs)
- Read through the ‘Getting started’ PDF first!
--- Authentication: Basic
--- Content Type: JSON

Assets in REST
- An asset is any object which is modelled in OCI. Every asset has a unique ID.
Example: “Storage”, “Switch”, “VirtualMachine”, “Application”
- Get a list of Assets:
GET /rest/v1/assets/{Asset}
GET /rest/v1/assets/storages
- Get a single Asset
GET /rest/v1/assets/storages/{id}
-Note: Append a valid Asset ID to the path

The methods of REST
- HTTP “verbs” indicate action on specified resource:
--- GET: retrieve information on resource(s) (idempotent - no state change)
--- POST: create new object
--- PUT/PATCH: update existing object (state changes)
--- DELETE: delete existing object (which supports it)
- Permissions for APIs match roles in OCI (Admin, User, Guest)

The OCI UI is build on REST
- Everything in OCI WebUI is available in REST (display, graphs, actions, etc.)
https://oci.corp.com/uiserver/#assets/storages/31964
https://oci.corp.com/rest/v1/assets/storages/31964
- Broken into two major sections: “assets”, “admin”.
- Login API uses “Basic” HTTP authentication.
- HTTPS only (all encrypted)

Examples: Asking for information
All Storages:
https://oci.corp.com/rest/assets/storages
Single Storage:
https://oci.corp.com/rest/v1/assets/storages/1692924
All pools on a single storage:
https://oci.corp.com/rest/v1/assets/storages/1692924/storagePools

What you get back
JSON: Java Script Object Notation

New calls and versions
- API “Preview” calls:
--- A “preview” call is like a beta. They are marked with a yellow exclamation mark.
--- The calls are subject to change in any future API version.
- API Versions:
--- Minor releases are always backwards compatible, e.g. 1.4.x and 1.2.x.
--- Major releases may not be, e.g. 2.0.x and 1.4.x.
--- Every call has a “Since” section that shows what version it was introduced in.

For more control and options, use a REST Client (like Insomnia, Postman, etc.)

REST API: Python Example 01: Get compression savings for all non-root FlexVols
Run at $ prompt as:
python3.6 compsaves.py

Image: Python Example 01: Get compression savings for all non-root FlexVols

REST API: Python Example 02: Count of Cloud VMs
Run at $ prompt as:
python3.6 cloudVMs.py

Image: Python Example 02: Count of Cloud VMs

REST API: Python Example 03: VMware VMs that have multiple DataStores
Run at $ prompt as:
python3.6 VMsMultiDS.py

Image: Python Example 3: VMware VMs that have multiple DataStores

For additional information visit:

APPENDIX 1: Python Example - Integration API

Image: Python Example - Integration API - Part 1 of 2

Image: Python Example - Integration API - Part 2 of 2

APPENDIX 2: REST API: Helpful Tips

Performance Tips:
1. Reduce the amount of REST calls.
- E.g. If you want to get an annotation for every VM. Instead of going through VMs and retrieving the annotation (assets/virtualMachines/{id}/annotations), get all the annotations for all VMs (assets/annotations/{id}/values/VirtualMachine) then match them up on the client side.
2. Only expand the data that you need.
3. Thread your REST calls:
- For large batches of calls, threading can provide significant performance improvements.

Note: Top level calls may not allow expands:
- GET assets/storages?expand=internalVolumes (will fail with HTTP 400)
- Get assets/storages/{id}?expand=internalVolumes (will work)

Comments