Skip to content

Commit

Permalink
fix(agent): catch loki datasource call on alert (#330)
Browse files Browse the repository at this point in the history
  • Loading branch information
PierreDemailly authored Dec 13, 2024
1 parent 109354d commit 7814a3b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/agent/src/notifiers/rules.notifier.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,13 @@ export class RuleNotifier extends Notifier<RuleNotifierAlert> {
const { notifierConfig, rule } = alert;
const ruleConfig = this.config.rules.find((configRule) => configRule.name === rule.name)!;

const notifierOptions = {
...notifierConfig,
data: await this.#notiferAlertData(alert),
template: ruleConfig!.alert.template
};

try {
const notifierOptions = {
...notifierConfig,
data: await this.#notiferAlertData(alert),
template: ruleConfig!.alert.template
};

await this.execute(notifierOptions);

this.logger.info(`[${rule.name}](notify: success|notifier: ${notifierConfig.notifier})`);
Expand Down

0 comments on commit 7814a3b

Please sign in to comment.