Showing posts with label PowerFlex. Show all posts
Showing posts with label PowerFlex. Show all posts

Friday, October 30, 2020

Dell EMC PowerFlex MP for vROps 8.x - Part1 - Install

Dell EMC has recently released a vROps management pack for PowerFlex. It is a monitoring and alerting solution that provides extensive visibility into PowerFlex systems using vROps. The management pack collects key metrics for PowerFlex storage, networking, compute, and server hardware and ingests into vROps. The solution is available to all PowerFlex rack and appliance customers free of cost. This brings additional value to the IT operations and life cycle management functionality delivered by PowerFlex Manager.

Now, let's start with installation of the management pack. The steps are same for vROps 8.0, 8.1, and 8.2.

Administration - Solutions - Repository - Add/ Upgrade

Browse and select the PAK file and click upload.


Click next.


Accept the EULA and click next.


Click finish.


The management pack is now installed and it will be listed in the repository.


Verify the contents of the management pack by selecting view content.


Verify the 13 dashboards.
Note: If any of the dashboards are missing, then try to reinstall the management pack.



In the next part, we will go through the adapter instance configurations. Hope it was useful. Cheers!

Related posts


Part2 - Configure
Part3 - Dashboards
Part4 - Resource kinds and relationships


References


Wednesday, February 28, 2018

Working with Dell EMC PowerFlex REST API using PowerShell - Part 1

In this article, I will explain briefly how to work with REST API exposed by PowerFlex (formerly known as ScaleIO and VxFlex OS Software) using PowerShell to manage/ monitor your PowerFlex cluster. The PowerFlex REST API is served from the PowerFlex Gateway which allows querying information and performing actions related to PowerFlex software components. PowerFlex Gateway connects and queries master MDM, reformats the results in a RESTful manner, and passes it to a REST client.

Access to the API requires a login using Gateway username and password. A successful login returns a token, and you can use this token for later authentications for other requests. The responses or results returned are in JSON format. In the following sections, I will explain how to use PowerShell to query PowerFlex REST API and obtain relevant results.  

PowerShell uses Invoke-RestMethod cmdlet which sends HTTP/ HTTPS requests to REST web services that return rich structured data. PowerShell will format the response based on the data type. For JSON PowerShell converts the response content to objects. 

Step 1: Authentication and token generation

#Note: 192.168.11.15 is the IP of PowerFlex Gateway
$User = Read-Host -Prompt "Please enter username"
$SecurePassword = Read-Host -Prompt "Enter Password for user $user" AsSecureString
$Credentials = New-Object System.Management.Automation.PSCredential ($user,$Securepassword)

#HTTPS Get request is invoked with credentials for authentication
$Token = Invoke-RestMethod -Uri "https://192.168.11.15:443/api/login" -Method Get -Credential $Credentials

Step 2: Create header with the token
$auth = [System.Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes(':'+$Token))
$global:PowerFlexAuthHeaders = @{'Authorization' = "Basic $auth"
'Content-Type' = "application/json" }

Step 3: Invoke-RestMethod

#Query all alerts in the system
$alerts = (Invoke-RestMethod -Uri "https://192.168.11.15:443/api/types/Alert/instances/" -Method Get -Headers $PowerFlexAuthHeaders)

#Query all SDSs in a PD
$all_SDS = (Invoke-RestMethod -Uri "https://192.168.11.15:443/api/instances/ProtectionDomain::3ce4af5f00000000/relationships/Sds " -Method Get -Headers $PowerFlexAuthHeaders)

#Query a specified PD
$pd01 = (Invoke-RestMethod -Uri "https://192.168.11.15:443/api/instances/ProtectionDomain::3ce4af5f00000000 " -Method Get -Headers $PowerFlexAuthHeaders)
#Query statistics of a specified PD
$pd01_stats = (Invoke-RestMethod -Uri "https://192.168.11.15:443/api/instances/ProtectionDomain::3ce4af5f00000000/relationships/Statistics " -Method Get -Headers $PowerFlexAuthHeaders)

Hope this was useful. Refer to the PowerFlex REST API Reference Guide for more details.
In the next article, I will explain how to query selected statistics/ parameters with POST method which will help you to
create custom monitoring scripts for your PowerFlex clusters.

Note:
If you are getting the below error while trying to create the token during step 1, please add the below lines of code to the
start of your script.

"Invoke-RestMethod : The underlying connection was closed: An unexpected error occurred on a send."

#Solution to above error!
add-type @"
    using System.Net;
    using System.Security.Cryptography.X509Certificates;
    public class TrustAllCertsPolicy : ICertificatePolicy {
        public bool CheckValidationResult(
            ServicePoint srvPoint, X509Certificate certificate,
            WebRequest request, int certificateProblem) {
            return true;
        }
    }
"@
[System.Net.ServicePointManager]::CertificatePolicy = New-Object TrustAllCertsPolicy
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12 -bor [System.Net.SecurityProtocolType]::Tls11