Alert_rules table bug?

Hi team,

I could not add the same name even with the different device_id so i think the column (device_id & name) both should be the unique index rather then just the name.

anyone can comment on this please?

Not sure what you are referring to here? are you trying to add a device with the same name?

maybe a screenshot of what you are doing?

I don’t think it’s unreasonable that the rule name is forced to be unique.

1 Like

I think rule name could be unique for different devices.
I agree that rule name cant be same for the same device.

The problem is i can’t add the same rule name for different devices.

Correct, you can’t because that’s how it is designed.

You are more than welcome to submit a pull request and see if it will be merged but imho the current design is how it should be.

It’s fine for now i think.

Just wanted to know the best way if i have one alert rule and i wanted it to apply on a few devices.
what is the best way to do it since i cant add the same rule name for different devices.

Thank you …

i am trying to add a rule into alert_rules table with the same rule name for different device.