RESOLUTION 1 (for a single agent)
From Foglight web console, navigate to the "Databases" dashboard.
- Select all of the database agents of a single type (for example SQL Server).
- Click Settings | Administration
- Select Connection Details
- Connection Details populates with previously selected database agents, select all the agents.
- Click the Set Credentials to selected agents button and fill in appropriate fields for user and password.
- Click Validate Connectivity
- Click Apply at bottom right.
Refer to knowledgebase article
4228645 for more details on this resolution.
RESOLUTION 2 (for multiple agents)
To change the OS credential:
- Navigate to Administration | Credentials page
- Select the credential properties
- Change the domain user and password (or unix user name and password) then change the credential name and Save.
To change the Database credential:
- Navigate to Administration | Agents | Agent Status
- Highlight all agents for the same type of database
- Deactivate the agents
- Click the edit properties button
- Click the link to modify the properties for all {TYPE} of agents.
- Under Monitored Connection Profile section, change User name and password
- Click the Save Changes button
- Select the same set of agents
- Activate the set of agents
Refer to Knowledge base article 4308764 for more details on this resolution.
RESOLUTION 3 (for multiple agents)
From Foglight web console, navigate to the "Databases" dashboard.
- Select all of the database agents of a single type (for example SQL Server).
- Click Settings | Administration
- Select Connection Details
- Connection Details populates with previously selected database agents, select all the agents.
- Click the Set Credentials to selected agents button and fill in appropriate fields for user and password.
- Click Validate Connectivity
- Click Apply at bottom right.
Refer to knowledgebase article 4228645 for more details on this resolution.
RESOLUTION 4 (for all SQL Server Agents on a Foglight Management Server)
Review KB 4309796 on how to run a groovy script in the FMS script console.
NOTE: This resolution will only update the password for SQL Server database agent monitoring and will not update the OS credentials used by either the Windows or SQL Server agents.
- Navigate to Administration | Agents | Agent Status
- Highlight all of the SQL Server agents
- Deactivate all of the SQL Server agents
- Navigate to Administration | Tooling | Script Console
- Run the groovy script (below) to change the password for all SQL Server agents, fill in the currentDBUser, currentDBPassword, and newDBPassword with the correct values. The user must include the current password or the agents will be ignored.
- Navigate to Administration | Credentials page
- Select the credential properties
- Change the domain user and password (or unix user name and password) then change the credential name and Save.
- Navigate to Administration | Agents | Agent Status
- Highlight all of the SQL Server agents
- Activate all of the SQL Server agents
def agentService = server.get("AgentService");
def configService = server.get("ConfigService");
def currentDBUser = ""; // or \\
def currentDBPassword = "";
def newDBPassword = "";
def out = new StringBuilder();
def agents = agentService.findByAdapterAndType("FglAM", "DB_SQL_Server");
for (agent in agents) {
def primaryAsp = configService.getAgentInstancePrimaryAsp(agent.getAgentNamespace(), agent.getTypeId(), agent.getId());
def authenticationTypeASPValue = primaryAsp.getString("monUserAuthentication");
if (!authenticationTypeASPValue.equalsIgnoreCase("Windows_Default_Account")) {
def dbUserASPValue = primaryAsp.getString("monUserName");
def dbPasswordASPValue = primaryAsp.getString("monPassword");
if (dbUserASPValue.equalsIgnoreCase(currentDBUser) && dbPasswordASPValue.equalsIgnoreCase(currentDBPassword)) {
out.append(String.format("Changing agent %s DB password\n", agent.getName()));
primaryAsp.setValueByString("monPassword", newDBPassword);
configService.saveConfig(primaryAsp);
}
}
}
return out.toString();