Alert rule do not imported

  • What Grafana version and what operating system are you using?
    V9.3.6

  • What are you trying to achieve?
    export exist dashboard with alert rule to json format
    and import dashboard using json format

  • How are you trying to achieve it?

  1. dashboard → import → json
  2. http api → import → json
  • What happened?
  1. dashboard imported normally.
  2. but do not imported alert rule
  3. I can’t find data in alert_rule table
  • What did you expect to happen?

  • Can you copy/paste the configuration(s) that you are having problems with?

  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.

  • Did you follow any online instructions? If so, what is the URL?

used json file format is below

{
    "dashboard": {
        "editable": true,
        "fiscalYearStartMonth": 0,
        "graphTooltip": 0,
        "id": null,
        "links": [],
        "liveNow": false,
        "panels": [
            {
                "alert": {
                    "alertRuleTags": {},
                    "conditions": [
                        {
                            "evaluator": {
                                "params": [
                                    60
                                ],
                                "type": "gt"
                            },
                            "operator": {
                                "type": "and"
                            },
                            "query": {
                                "params": [
                                    "A",
                                    "5m",
                                    "now"
                                ]
                            },
                            "reducer": {
                                "params": [],
                                "type": "avg"
                            },
                            "type": "query"
                        }
                    ],
                    "executionErrorState": "alerting",
                    "for": "10s",
                    "frequency": "1s",
                    "handler": 1,
                    "name": "[-invoice-factoring-live-01] CPU Alert alert",
                    "noDataState": "ok",
                    "notifications": [
                        {
                            "uid": "trUrkDOMz"
                        }
                    ]
                },
                "datasource": {
                    "type": "cloudwatch",
                    "uid": "xs8qgdvMk"
                },
                "fieldConfig": {
                    "defaults": {
                        "color": {
                            "mode": "palette-classic"
                        },
                        "custom": {
                            "axisCenteredZero": false,
                            "axisColorMode": "text",
                            "axisLabel": "",
                            "axisPlacement": "auto",
                            "barAlignment": 0,
                            "drawStyle": "line",
                            "fillOpacity": 10,
                            "gradientMode": "none",
                            "hideFrom": {
                                "legend": false,
                                "tooltip": false,
                                "viz": false
                            },
                            "lineInterpolation": "linear",
                            "lineWidth": 1,
                            "pointSize": 5,
                            "scaleDistribution": {
                                "type": "linear"
                            },
                            "showPoints": "never",
                            "spanNulls": false,
                            "stacking": {
                                "group": "A",
                                "mode": "none"
                            },
                            "thresholdsStyle": {
                                "mode": "line+area"
                            }
                        },
                        "mappings": [],
                        "thresholds": {
                            "mode": "absolute",
                            "steps": [
                                {
                                    "color": "transparent",
                                    "value": null
                                },
                                {
                                    "color": "red",
                                    "value": 60
                                }
                            ]
                        },
                        "unit": "short"
                    },
                    "overrides": []
                },
                "gridPos": {
                    "h": 8,
                    "w": 4,
                    "x": 0,
                    "y": 0
                },
                "id": 2,
                "options": {
                    "legend": {
                        "calcs": [],
                        "displayMode": "list",
                        "placement": "bottom",
                        "showLegend": true
                    },
                    "tooltip": {
                        "mode": "multi",
                        "sort": "none"
                    }
                },
                "pluginVersion": "9.2.7",
                "targets": [
                    {
                        "alias": "",
                        "datasource": {
                            "type": "cloudwatch",
                            "uid": "xs8qgdvMk"
                        },
                        "dimensions": {
                            "DBInstanceIdentifier": "-invoice-factoring-live-01"
                        },
                        "expression": "",
                        "id": "",
                        "label": "",
                        "matchExact": true,
                        "metricEditorMode": 0,
                        "metricName": "CPUUtilization",
                        "metricQueryType": 0,
                        "namespace": "AWS/RDS",
                        "period": "",
                        "queryMode": "Metrics",
                        "refId": "A",
                        "region": "ap-northeast-2",
                        "sqlExpression": "",
                        "statistic": "Average"
                    }
                ],
                "title": "[-invoice-factoring-live-01] CPU Alert",
                "type": "timeseries"
            },
            {
                "alert": {
                    "alertRuleTags": {},
                    "conditions": [
                        {
                            "evaluator": {
                                "params": [
                                    3435973836
                                ],
                                "type": "lt"
                            },
                            "operator": {
                                "type": "and"
                            },
                            "query": {
                                "params": [
                                    "A",
                                    "1m",
                                    "now"
                                ]
                            },
                            "reducer": {
                                "params": [],
                                "type": "avg"
                            },
                            "type": "query"
                        }
                    ],
                    "executionErrorState": "alerting",
                    "for": "1m",
                    "frequency": "1m",
                    "handler": 1,
                    "name": "[-invoice-factoring-live-01] Memory Alert alert",
                    "noDataState": "ok",
                    "notifications": [
                        {
                            "uid": "trUrkDOMz"
                        }
                    ]
                },
                "datasource": {
                    "type": "cloudwatch",
                    "uid": "xs8qgdvMk"
                },
                "fieldConfig": {
                    "defaults": {
                        "color": {
                            "mode": "palette-classic"
                        },
                        "custom": {
                            "axisCenteredZero": false,
                            "axisColorMode": "text",
                            "axisLabel": "",
                            "axisPlacement": "auto",
                            "barAlignment": 0,
                            "drawStyle": "line",
                            "fillOpacity": 10,
                            "gradientMode": "none",
                            "hideFrom": {
                                "legend": false,
                                "tooltip": false,
                                "viz": false
                            },
                            "lineInterpolation": "linear",
                            "lineWidth": 1,
                            "pointSize": 5,
                            "scaleDistribution": {
                                "type": "linear"
                            },
                            "showPoints": "never",
                            "spanNulls": false,
                            "stacking": {
                                "group": "A",
                                "mode": "none"
                            },
                            "thresholdsStyle": {
                                "mode": "line+area"
                            }
                        },
                        "mappings": [],
                        "min": 0,
                        "thresholds": {
                            "mode": "absolute",
                            "steps": [
                                {
                                    "color": "red",
                                    "value": null
                                },
                                {
                                    "color": "transparent",
                                    "value": 3435973836
                                }
                            ]
                        },
                        "unit": "decbytes"
                    },
                    "overrides": []
                },
                "gridPos": {
                    "h": 8,
                    "w": 4,
                    "x": 4,
                    "y": 0
                },
                "id": 14,
                "options": {
                    "legend": {
                        "calcs": [],
                        "displayMode": "list",
                        "placement": "bottom",
                        "showLegend": true
                    },
                    "tooltip": {
                        "mode": "multi",
                        "sort": "none"
                    }
                },
                "pluginVersion": "9.2.7",
                "targets": [
                    {
                        "alias": "",
                        "datasource": {
                            "type": "cloudwatch",
                            "uid": "xs8qgdvMk"
                        },
                        "dimensions": {
                            "DBInstanceIdentifier": "-invoice-factoring-live-01"
                        },
                        "expression": "",
                        "id": "",
                        "label": "",
                        "matchExact": true,
                        "metricEditorMode": 0,
                        "metricName": "FreeableMemory",
                        "metricQueryType": 0,
                        "namespace": "AWS/RDS",
                        "period": "",
                        "queryMode": "Metrics",
                        "refId": "A",
                        "region": "ap-northeast-2",
                        "sqlExpression": "",
                        "statistic": "Average"
                    }
                ],
                "title": "[-invoice-factoring-live-01] Memory Alert",
                "type": "timeseries"
            }
        ],
        "refresh": "10s",
        "schemaVersion": 37,
        "style": "dark",
        "tags": [],
        "templating": {
            "list": []
        },
        "time": {
            "from": "now-6h",
            "to": "now"
        },
        "timepicker": {
            "refresh_intervals": [
                "10s",
                "30s",
                "1m",
                "5m",
                "15m",
                "30m",
                "1h",
                "2h",
                "1d"
            ]
        },
        "timezone": "",
        "title": "[Live]AWS-Invoice-Factoring-Databases-Alerts",
        "uid": null,
        "version": 0,
        "weekStart": ""
    },
    "folderId": 47
}