Showing posts with label systems management. Show all posts
Showing posts with label systems management. Show all posts

Friday, December 27, 2019

vRealize Operations Manager 7.5 - Part10 - Adding Remote Collector Node

In this article, I will briefly explain the configuration of a remote collector node and a sample scenario too.

Note: Before adding the remote collector nodes a vROps master node should be present.

Refer to my previous blogs for the installation and configuration of the vROps master node and enabling high availability. Here I have a single node vROps 7.5 instance which is a master and I will be expanding it with a remote collector node.

Consider the following scenario:

Datacenter A is the head office where the vROps master is installed. Datacenter B and C need to be monitored using the vROps instance configured at Datacenter A. In this case, Remote Collector nodes are installed at Datacenter B and C. As per VMware recommendation the latency between sites should be 200ms or less. 


Refer vROps 7.5 reference architecture for recommendations from VMware on different deployment profiles and other best practices. 

Deploy a vROps instance at the remote location and open its management IP address in a web browser. 

Click on Expand an existing installation.

Click Next.


Provide a name for the collector node and select node type Remote Collector.
Enter IP of vROps master node and click Validate.


Click Next.


Provide cluster admin password and click Next.


Click Finish.


This may take around 6-8 minutes to complete.



Select Finish adding new nodes.


Click OK.



The remote collector is now part of the cluster.


Now log in to the master vROps instance.
Select Administration > Management > Collector Groups.
You can see only the master node is part of the Default collector group.
Click Create collector Group (+).


Provide a name and select the remote collector node.


Now you can see the remote collector node is part of the newly created collector group.


Now, we will add a vCenter Adapter instance that will monitor the vCenter server of the remote site using the newly added remote collector node.
Click Administration > Solutions > Configuration > VMware vSphere.
Click Configure (gear icon).


Click (+) to add a new vCenter adapter and provide the necessary details.


In the advanced settings, select the collector group.


Click Test connection, Accept and save settings. 


Click OK.


Verify the collection state and status.


Hope it was useful. Cheers.

Related posts

Tuesday, December 3, 2019

Working with iDRAC9 Redfish API using PowerShell - Part 3

In this article, I will explain how to access the iDRAC Redfish API using session-based authentication.


[CmdletBinding()]
param(
    [Parameter(Mandatory)]
    [String]$idrac_ip
)

#To fix the connection issues to iDRAC REST API
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

#Get iDRAC creds
$Credentials = Get-Credential -Message "Enter iDRAC Creds"

$creds_json = '{"UserName": "$($Credentials.UserName)", "Password": "$($Credentials.GetNetworkCredential().Password)"}'
$creds_json = $ExecutionContext.InvokeCommand.ExpandString($creds_json)

#Using Invoke-WebRequest
try {
    $result1 = Invoke-WebRequest -Uri "https://$($idrac_ip)/redfish/v1/Sessions " -Method POST -ContentType 'application/json' -Headers @{"Accept"="application/json"} -Body $creds_json -Verbose
}
catch {
    Write-Error -Message "Failed to invoke the API! Incorrect creds!"
    $PSCmdlet.ThrowTerminatingError($PSItem)
}

$auth_head = @{
"X-Auth-Token" = $result1.Headers.'X-Auth-Token'
"accept" = "application/json" }

#URI to get basic system info
$u1 = "https://$($idrac_ip)/redfish/v1/Systems/System.Embedded.1"

#Using Invoke-RestMethod
try {
    $output = Invoke-RestMethod -Uri $u1 -Method Get -Headers $auth_head -ContentType 'application/json' -Verbose
}
catch {
    Write-Error -Message "Failed to invoke the API! Incorrect creds!"
    $PSCmdlet.ThrowTerminatingError($PSItem)
}

Write-Output "`nBasic System Info:" $output



Hope it was useful. Cheers!

Related posts

Working with iDRAC9 Redfish API using PowerShell - Part 1

Working with iDRAC9 Redfish API using PowerShell - Part 2


References

iDRAC9 Redfish API guide

Saturday, September 15, 2018

Working with iDRAC9 Redfish API using PowerShell - Part 2

In this article I will explain briefly about the JSON response from iDRAC and how you can navigate through the Redfish API tree structure to get all the required information. Now, lets have a look at the URIs. 

Query the computer system collection:
$result1 = Invoke-RestMethod -Uri "https://$($idrac_ip)/redfish/v1/Systems" -Credential $Credentials -Method Get -UseBasicParsing -ContentType 'application/json'

Response: 

You can see one member with URI /redfish/v1/Systems/System.Embedded.1

Below is a sample screen shot of JSON output when you try to query the above listed member system. 


You can get some of the basic information straight away from the above JSON response. And these are organized in hierarchy where you can drill down to each object and get the required details. Below diagram shows basic iDRAC Redfish API tree structure.


Example: You can get details/ health status of  storage controller as shown below.

Query:
$result2 = Invoke-RestMethod -Uri "https://$($idrac_ip)/redfish/v1/Systems/System.Embedded.1/Storage /Controllers/NonRAID.Integrated.1-1" -Credential $Credentials -Method Get -UseBasicParsing -ContentType 'application/json'

Sunday, August 26, 2018

Working with iDRAC9 Redfish API using PowerShell - Part 1

Redfish is a industry standard protocol and specification defined by Distributed Management Task Force (DMTF) for performing systems/ IT infrastructure management actions using RESTful methodology. It is a next generation systems management interface standard which is simple, secure, scalable. Redfish uses JSON data format and transports payload over HTTPS. Initial releases of Redfish focused primarily on systems management and was targeted to be a replacement for IPMI over LAN protocol. Now the capabilities have been extended over the past few years providing a rich set of features and support for network, memory, storage devices etc. Over time the scope of Redfish is being expanded to fit more use cases as the forum is working with several partner organizations. Promoters of this standard include several companies like Broadcom, Cisco, Dell, HP, VMware, Intel, Microsoft etc.

Now, lets have a look at how to connect to iDRAC Redfish API using PowerShell. Redfish provides two authentication methods. Basic authentication and Session-based authentication. Here I will explain basic authentication using username and password for each Redfish API request to iDRAC.

#To fix the connection issues to iDRAC REST API
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

#Get iDRAC creds
$Credentials = Get-Credential -Message "Enter iDRAC Creds"

#URI to get basic system info
$u1 = "https://192.168.10.11/redfish/v1/Systems/System.Embedded.1"

#Using Invoke-RestMethod
$result1 = Invoke-RestMethod -Uri $u1 -Credential $Credentials -Method Get -UseBasicParsing -ContentType 'application/json' -Headers @{"Accept"="application/json"}

Output:


Hope it was useful. Cheers!

References:
iDRAC9 Redfish API reference guide
github.com/dell/iDRAC-Redfish-Scripting