<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic monitoring Active IQ (9.13) itself in Active IQ Unified Manager Discussions</title>
    <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/monitoring-Active-IQ-9-13-itself/m-p/454501#M28616</link>
    <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;I want to monitor The&amp;nbsp;Active IQ (9.13) itself, that if u suer can't access the application we get alert.&lt;/P&gt;&lt;P&gt;How can I do this?&lt;/P&gt;&lt;P&gt;And what are the services important in the application (ociea, ocie, mysqld, somthing else?)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 14 Aug 2024 23:32:48 GMT</pubDate>
    <dc:creator>Shai_Viente</dc:creator>
    <dc:date>2024-08-14T23:32:48Z</dc:date>
    <item>
      <title>monitoring Active IQ (9.13) itself</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/monitoring-Active-IQ-9-13-itself/m-p/454501#M28616</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;I want to monitor The&amp;nbsp;Active IQ (9.13) itself, that if u suer can't access the application we get alert.&lt;/P&gt;&lt;P&gt;How can I do this?&lt;/P&gt;&lt;P&gt;And what are the services important in the application (ociea, ocie, mysqld, somthing else?)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Aug 2024 23:32:48 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/monitoring-Active-IQ-9-13-itself/m-p/454501#M28616</guid>
      <dc:creator>Shai_Viente</dc:creator>
      <dc:date>2024-08-14T23:32:48Z</dc:date>
    </item>
    <item>
      <title>Re: monitoring Active IQ (9.13) itself</title>
      <link>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/monitoring-Active-IQ-9-13-itself/m-p/454502#M28617</link>
      <description>&lt;P&gt;Hi Shai,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can query the AIQUM service status using the REST API. Here's an example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;Param(
   [Parameter(Mandatory = $True, HelpMessage = "The AIQUM server Hostname, FQDN or IP Address")]
   [String]$Server,
   [Parameter(Mandatory = $True, HelpMessage = "The Credential to authenticate to AIQUM")]
   [System.Management.Automation.PSCredential]$Credential
)
#'------------------------------------------------------------------------------
Function Get-UMAuthorization{
   [Alias("Get-UMAuth")]
   [CmdletBinding()]
   Param(
      [Parameter(Mandatory = $True, HelpMessage = "The Credential to authenticate to AIQUM")]
      [ValidateNotNullOrEmpty()]
      [System.Management.Automation.PSCredential]$Credential
   )
   #'---------------------------------------------------------------------------
   #'Set the authentication header to connect to AIQUM.
   #'---------------------------------------------------------------------------
   $auth    = [System.Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes($Credential.UserName + ':' + $Credential.GetNetworkCredential().Password))
   $headers = @{
      "Authorization" = "Basic $auth"
      "Accept"        = "application/json"
      "Content-Type"  = "application/json"
   }
   Return $headers;
}#'End Function Get-UMAuthorization
#'------------------------------------------------------------------------------
Function Get-UMSystemInfo{
   [CmdletBinding()]
   Param(
      [Parameter(Mandatory = $True, HelpMessage = "The AIQUM server Hostname, FQDN or IP Address")]
      [ValidateNotNullOrEmpty()]
      [String]$Server,
      [Parameter(Mandatory = $True, HelpMessage = "The Credential to authenticate to AIQUM")]
      [ValidateNotNullOrEmpty()]
      [System.Management.Automation.PSCredential]$Credential
   )
   #'---------------------------------------------------------------------------
   #'Set the authentication header to connect to AIQUM.
   #'---------------------------------------------------------------------------
   $headers = Get-UMAuthorization -Credential $Credential
   #'---------------------------------------------------------------------------
   #'Enumerate the system information.
   #'---------------------------------------------------------------------------
   [String]$uri = "https://$Server/api/management-server/system"
   Try{
      $response = Invoke-RestMethod -Uri $uri -Method GET -Headers $headers -ErrorAction Stop
      Write-Host "Enumerated system information on server ""$Server"" using URI ""$uri"""
   }Catch{
      Write-Warning -Message $("Failed enumerating system on Server ""$Server"" using URI ""$uri"". Error " + $_.Exception.Message + ". Status Code " + $_.Exception.Response.StatusCode.value__)
   }
   Return $response;
}#'End Function Get-UMSystemInfo.
#'------------------------------------------------------------------------------
#'Set the certificate policy and TLS version.
#'------------------------------------------------------------------------------
If(-Not("TrustAllCertsPolicy" -As [Type])){
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]::SecurityProtocol  = [System.Net.SecurityProtocolType]'Tls12'
[System.Net.ServicePointManager]::CertificatePolicy = New-Object TrustAllCertsPolicy
#'------------------------------------------------------------------------------
#'Enumerate the AIQUM System Information.
#'------------------------------------------------------------------------------
[Int]$errorCount = 0
Try{
   $system = Get-UMSystemInfo -Server $Server -Credential $Credential -ErrorAction Stop
}Catch{
   Write-Warning -Message $("Failed Enumerating System Information for Server ""$Server"". Error " + $_.Exception.Message)
   Exit -1
}
If($Null -eq $system){
   Write-Warning -Message "Failed Enumerating System Information for Server ""$Server"""
   Exit -1
}
#'------------------------------------------------------------------------------
#'Check the Service Status.
#'------------------------------------------------------------------------------
Write-Host $("The Server ""$Server"" is running " + $system.Product + " " + $system.Version)
ForEach($service In $system.Services){
   If($service.Status -ne "running"){
      Write-Warning -Message $("The Service """ + $service.Name + """ is """ + $service.Status + """")
      [Int]$errorCount++
   }Else{
      Write-Host $("The Service """ + $service.Name + """ is """ + $service.Status + """")
   }
}
If($errorCount -ne 0){
   Write-Warning -Message "There are $errorCount Services that are unavailable on Server ""$Server"""
}Else{
   Write-Host "All Services are available on Server ""$Server"""
}
#'------------------------------------------------------------------------------
&lt;/LI-CODE&gt;&lt;P&gt;Usage:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;PS C:\Scripts\PowerShell\Projects\AIQUM&amp;gt; .\GetSystemInfo.ps1 -Server aiqum.testlab.local -Credential $credentials
Enumerated system information on server "aiqum.testlab.local" using URI "https://aiqum.testlab.local/api/management-server/system"
The Server "aiqum.testlab.local" is running Active IQ Unified Manager 9.13P1
The Service "ocie" is "running"
The Service "ocie_au" is "running"
All Services are available on Server "aiqum.testlab.local"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope that helps&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/Matt&lt;/P&gt;</description>
      <pubDate>Thu, 15 Aug 2024 02:05:28 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Active-IQ-Unified-Manager-Discussions/monitoring-Active-IQ-9-13-itself/m-p/454502#M28617</guid>
      <dc:creator>mbeattie</dc:creator>
      <dc:date>2024-08-15T02:05:28Z</dc:date>
    </item>
  </channel>
</rss>

