Forum Discussion

jklemm2000's avatar
jklemm2000
Icon for Nimbostratus rankNimbostratus
Dec 22, 2010

Sharepoint 2010 and F5 Management Pack

I am curious what is meant by the $vip.MgmtAddress in the below config? Does anyone know if this address pertains to the F5 management address or is this the Sharepoint server management address?

 

 

"SPS_http_virtual"

 

{

 

$vip.MgmtAddress = "172.27.58.180";

 

$vip.Name = "SPS_http_virtual";

 

$vip.IP = "192.0.2.10";

 

$vip.Port = "80";

 

3 Replies

  • What if the F5 fails over to the standby unit? Then you udon't have the correct management address in the config.
  • Dave_Ruddell_79's avatar
    Dave_Ruddell_79
    Historic F5 Account
    Hey John,

    Not to overcomplicate the issue, but you would need to detect if the device is part of a failover (HA) pair and then handle the case accordingly. I whipped up a script which should help in this situation.

    
     Set the initial IP Address you wish to check
    $initialMgmtAddress = "172.27.58.180";
    $ErrorActionPreference = "stop";
    add-PSSnapIn Microsoft.EnterpriseManagement.OperationsManager.Client -ErrorAction SilentlyContinue;; 
     Grab SCOM Directory from the Registry
    $scomFolder = $(Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\Microsoft Operations Manager\3.0\Setup").InstallDirectory;
     Switch to SCOM folder and run Startup Script
    sl $scomFolder
    .\Microsoft.EnterpriseManagement.OperationsManager.ClientShell.Functions.ps1;
    Start-OperationsManagerClientShell -ManagementServerName: "" -PersistConnection: $true -Interactive: $true;
     Grab the Device object out of Operations Manager
    $f5DeviceClass = Get-MonitoringClass -Name "F5.Device"
    $f5DeviceObject = Get-MonitoringObject -MonitoringClass $f5DeviceClass -Criteria "MgmtAddress=`'$initialMgmtAddress`'"
    $failoverPeer = "";
    $failoverState = "";
     Grab all of the properties on the device
    $props = $f5DeviceObject.GetMonitoringProperties();
    foreach ($prop in $props)
    {
         Store the FailoverPeerAddress property
        if ($prop.Name -ieq "FailoverPeerAddress")
        {
            $failoverPeer = $f5DeviceObject.GetMonitoringPropertyValue($prop).ToString();
        }
        
         Store the FailoverState property
        if ($prop.Name -ieq "FailoverState")
        {
            $failoverState = $f5DeviceObject.GetMonitoringPropertyValue($prop).ToString();
        }
    }
     Check the failover state from the above query and choose the correct device.
    if ($failoverState -ieq "active")
    {
        $mgmtAddress = $initialMgmtAddress;
    }
    else
    {
        $mgmtAddress = $failoverPeer;
    }
     Continued from existing script (plug in the $mgmtAddress value)
    "SPS_http_virtual"
    {
    $vip.MgmtAddress = $mgmtAddress;
    $vip.Name = "SPS_http_virtual";
    $vip.IP = "192.0.2.10";
    $vip.Port = "80";
    ...
    ...

    Hope this helps, and let me know if this will not work for your config. The only catch is that it will not automatically rebuild the SharePoint application view unless you run rediscovery, but with this in place it should at least pick the active device.

    Thanks,

    -Dave