Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sysdig_monitor_alert_metric is missing grouping and scoping to team #141

Closed
wosteven opened this issue Nov 5, 2021 · 3 comments
Closed
Labels
stale This has become stale due to inactivity

Comments

@wosteven
Copy link

wosteven commented Nov 5, 2021

Hi,

when creating an Alert with "sysdig_monitor_alert_metric" resource (https://registry.terraform.io/providers/sysdiglabs/sysdig/latest/docs/resources/monitor_alert_metric) it is impossible to group the alert to a metric group and it is also impossible to create the alert in the scope of a team.

We heavily use teams, and we want to group alerts (like "ELK","KAFKA", ...). Alerts should only be visible to a specific team (or teams). The sysdig UI supports Metric Groups, when creating an Alert as a Member of a specific Team in UI it is also created in the scope of the team correctly.

ATM we create alerts with TF, then we need to manually copy the alerts to the target team (as they are exposed to default monitoing group only), and then we need to manually add the "group" in UI to each created alert.

You should consider changing "sysdig_monitor_alert_metric" resource to add a "group" attribute and a "team" attribute.

resource "sysdig_monitor_alert_metric" "elk_high_disk" {
    name = "ELK_PROD_DISK_FULL_WARNING"
    description = "The disk usage is very high."
    group = "ELK"  <<<< metric group
    team   = "TEAMID1"  <<<< metric is created in this teams scope
    severity = 2

    scope = "host.hostName starts with \"shared-${lower(var.stage)}-elk\" AND not fs.device contains \"/dev/loop\""
    metric = "max(avg(fs.used.percent)) > ${var.high_disk_threshold_percent}"
    ...
}
@tembleking
Copy link
Member

tembleking commented Dec 28, 2021

I think you need instead to use the API token of the specific group.
The API tokens are different for every person in every team, that is, an API token identifies a single person in a single team.
When you switch teams, your API token changes as well.

@github-actions
Copy link

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days

@github-actions github-actions bot added the stale This has become stale due to inactivity label Feb 27, 2022
@github-actions
Copy link

github-actions bot commented Mar 6, 2022

This issue has been closed due to inactivity.

@github-actions github-actions bot closed this as completed Mar 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale This has become stale due to inactivity
Projects
None yet
Development

No branches or pull requests

2 participants