What is the best practice for creating alert rules in grafana

Hello,

I am looking for best practice for creating alert rules.
I have 20 servers monitoring. Currently I have created separate panels for each and every servers.
Can we monitor all the servers using one panel.

I am monitoring CPU, Memory and disk. For CPU and memory threshold will be same for disk alerts I have to create separate panels.

Also I am looking for a solution to import alert rules. I have exported alert rules from old grafana server. No I don’t see any option to import the alert rules. PS: I am using ecs service to host grafana so i can not log in into the server or run some script inside it.

Thanks!

Yes, if you are using v9 or higher, you can (should!) create a single multidimensional alert rule to monitor all 20 servers. See here to get you started. As for importing the alert rules from an old Grafana server, I am pretty sure that will not work and you’ll have to start fresh.

1 Like

I am trying with POST api to import alert rules but I am getting error message.

curl -X POST -H “Accept: application/json” -H “Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx” -H “Content-Type: application/json” -d @alerts.yaml http://www.domain.com:3000/api/v1/provisioning/alert-rules

{“message”:“bad request data”,“traceID”:“”}