For existing agents
To reconfigure existing agents to use SSL to connect to a SQL PI repository, run the following groovy script run in the script console. Create the variable fglamName to the Foglight Agent Manager (FglAM) name that can be found in the Agent Managers dashboard.
/**
* This software is confidential. Quest Software Inc., or one of its subsidiaries, has supplied this software to you
* under terms of a license agreement, nondisclosure agreement or both.
*
* You may not copy, disclose, or use this software except in accordance with those terms.
*
* Copyright 2017 Quest Software Inc. ALL RIGHTS RESERVED.
*
* QUEST SOFTWARE INC. MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE SOFTWARE, EITHER EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE,
* OR NON-INFRINGEMENT. QUEST SOFTWARE SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING,
* MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES.
*/
def set_asp(dbPlatform , agentID){
def agent = server.AgentService.findById( agentID )
def configService = server.get("ConfigService")
def primaryASP = configService.getAgentInstancePrimaryAsp(agent.getAgentNamespace(), agent.getTypeId(), agent.getId())
if( dbPlatform == "DB_SQL_Server_SPI_Repository" ){
primaryASP.setValueByString("spirpUseSSl", "true");
}
else if( dbPlatform == "DB_SQL_Server" ){
primaryASP.setValueByString("parcStorageUseSSl", "true");
}
else if( dbPlatform == "SSAS_Agent" ){
primaryASP.setValueByString("ssasSpiCommonStorageUseSSl", "true");
}
else if( dbPlatform == "SSAS_SPI_Repository" ){
primaryASP.setValueByString("spirpUseSSl", "true");
}
configService.saveConfig(primaryASP);
}
def getFglamID(fglamName) {
for(fglam in server.RemoteAgentManagementService.findAllRemoteClients()) {
if(fglam.getDisplayName().equals(fglamName)) {
return fglam.getId();
}
}
return "0";
}
DB_TYPE = ["DB_SQL_Server_SPI_Repository" , "DB_SQL_Server" , "SSAS_Agent" , "SSAS_SPI_Repository"]
def fglamName = "";
fglamMap = [:];
agents = server.AgentService.findAll();
def fglamID = getFglamID(fglamName);
if(!fglamID.equals("0")) {
for ( agent in agents) {
if (DB_TYPE.contains(agent.getTypeId())&& agent.getRemoteClientId().equals(fglamID)) {
fglamMap.put(agent.getId() , agent.getTypeId());
}
}
for (entry in fglamMap.entrySet()) {
set_asp( entry.getValue() , entry.getKey() );
}
}
println(fglamMap.size());
return true;
For new agents
For new agents, change the default value of useSSL in both the PI Repository Profile and in the MSSQL Repository Settings to true as shown in the following steps
- Navigate to Configuration > Definitions
- Navigate to Databases > SQL PI Repository > Installer > APIs

- Set the pulldown to Types and select MSSQL Repository Settings
- Click the Edit Button (the Foglight user requires the Cartridge Developer role for the Edit button to be enabled)

- Change the default value of useSSL to true

- Click the Save button

- Repeat the previous steps for the PI Repository Profile Type
As confirmation, the spirplUseSSL value in the SPI Repository agent log file should be set at 1 (true) instead of the default value of 0 (disabled)