It can be done by exporting the config, modifying the rule (rules) and importing config back.
1. Export the config using:
fglcmd.bat -usr foglight -pwd foglight -port 8080 -srv localhost -cmd util:configexport -f export.txt
2. Open the exported file and find the rule you want to modify.
For example to modify the message in the rule DBSS Cluster Failover rule, find it in the exported config file.
It is defined as follow:
<simple-rule id="28bd4aa7-318e-4b2e-8c0d-540657699a9b" name="DBSS - Cluster Failover" comments="" is-external="true" help="" trigger="com.quest.nitro.service.rule.rule.Rule$TriggerType DATA_DRIVEN">
<scoping-query text="DBSS_SQL_Server_Host"/>
<firing_strategies/>
<expressions/>
<messages/>
<effective-schedules/>
<blackout-schedules/>
<severities>
<conditional-severity id="8a8aeef6294581fa012945c822822c4d" level="1">
<message name="SeverityMessage"><![CDATA[Rule @foglight_rule_name fired with @foglight_severity_level_name severity.]]></message>
<expressions>
<expression name="createAlarm"><![CDATA[import java.util.UUID;
if (DBWC_GetIsHostNameChanged(scope,"physical_host_name")) {
alarmService = server.get("AlarmService");
// Generate rule ID
ruleID = "28bd4aa7-318e-4b2e-8c0d-540657699a9b"; //UUID.randomUUID().toString();
// Determine severity
alarmSeverity = 4;
// Get the message
message = "The SQL Server cluster group active node has moved from node " + DBWC_GetLastHostName(scope,"physical_host_name") + " to node " + DBWC_GetCurrentHostName(scope,"physical_host_name");
// Get the topologyObjectId
topologyObjectID = scope.getUniqueId();
// Get the sourceID
sourceID = UUID.randomUUID().toString();
// The sourceName should be set with the name of the PA rule
// so that this is used in the UI instead of showing Unknown Rule.
sourceName = "DBSS - Cluster Failover";
// Create an alarm
alarmID = alarmService.reportAlarm(sourceID, alarmSeverity, topologyObjectID, message, sourceName, ruleID, null);
}]]></expression>
</expressions>
<messages/>
<fire-action-handlers/>
<exit-action-handlers/>
<condition><![CDATA[#physical_host_name#;
return true;]]></condition>
</conditional-severity>
<unconditional-severity id="8a8aeef6294581fa012945c822822c4e" level="-1" disabled="true">
<message name="default.severity.message"><![CDATA[Rule @foglight_rule_name fired with @foglight_severity_level_name severity.]]></message>
<expressions/>
<messages/>
<fire-action-handlers/>
<exit-action-handlers/>
</unconditional-severity>
</severities>
Then it is necessary to modify the message which is defined in the following place:
// Get the message
message = "The SQL Server cluster group active node has moved from node " + DBWC_GetLastHostName(scope,"physical_host_name") + " to node " + DBWC_GetCurrentHostName(scope,"physical_host_name");
3. Save the export.txt file and import the configuration back using
fglcmd.bat -usr foglight -pwd foglight -port 8080 -srv localhost -cmd util:configimport -f export.txt