Skip to content

Commit

Permalink
Fixed a bug where enable managed prometheus alerts flag was not influ…
Browse files Browse the repository at this point in the history
…encing the alerts creation
  • Loading branch information
ganeshrvel committed Oct 26, 2023
1 parent 01171c0 commit 0b15e04
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/robusta/core/sinks/robusta/rrm/rrm.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import time
from typing import List

from robusta.core.model.env_vars import RRM_PERIOD_SEC
from robusta.core.model.env_vars import RRM_PERIOD_SEC, MANAGED_PROMETHEUS_ALERTS_ENABLED
from robusta.core.sinks.robusta.rrm.account_resource_fetcher import AccountResourceFetcher
from robusta.core.sinks.robusta.rrm.base_resource_manager import BaseResourceManager
from robusta.core.sinks.robusta.rrm.prometheus_alert_resource_manager import \
Expand All @@ -19,7 +19,10 @@ def __init__(self, dal: AccountResourceFetcher, cluster: str, account_id: str):
self.__sleep = RRM_PERIOD_SEC

self.__resource_managers: List[BaseResourceManager] = [
PrometheusAlertResourceManager(resource_kind=ResourceKind.PrometheusAlert, cluster=self.cluster, dal=dal)]
PrometheusAlertResourceManager(
resource_kind=ResourceKind.PrometheusAlert, cluster=self.cluster,
dal=dal)
] if MANAGED_PROMETHEUS_ALERTS_ENABLED else []

self.__thread = threading.Thread(target=self.__thread_loop)
self.__thread.start()
Expand Down

0 comments on commit 0b15e04

Please sign in to comment.