Forum Discussion
jklemm2000
Nimbostratus
Dec 21, 2010Sharepoint 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? ...
Dave_Ruddell_79
Dec 22, 2010Historic 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
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects