Wednesday, July 17, 2013

ADFS SCOM: Configuration Database unavailable

I'm currently in the process of helping set up the ADFS management pack for a relatively new ADFS 2.0 installation.  All of our servers have continuously been alerting:

Alert: SQL Configuration Database Unavailable
Alert Description: The AD FS configuration database that is stored in SQL Server 'false' is unavailable.

When digging through the SCOM agent's health service state directory, I found all of the scripts for the MP seem to be powershell.  The one that checks this is FederationServerRemoteSQLServerPing.ps1.  Basically the script pulls out the SQL connection string for the configuration database and checks a few things in the format (like is the server local to the machine, or has a backslash in it).  After this, it takes the server value and tries a .NET ping on the host.  The problem with this script is that they forgot a few things about SQL connections.  If your SQL server has a port specified with the servername,portnumber format, the server name is not cleaned up by the script, and the ping attempt blows up due to the badly formatted name.

As for a fix (I'm not a SCOM guy), if the script can be edited, a simple check before the ping...

If ($script:server –match “,”) {
     $script:server = $script:server.substring(0,$script:server.indexof(“,”))

will solve the problem.  Otherwise, you may just need to disable the rule until a fix comes from Microsoft.

No comments:

Post a Comment