az grafana
Note
This reference is part of the amg extension for the Azure CLI (version 2.38.0 or higher). The extension will automatically install the first time you run an az grafana command. Learn more about extensions.
Commands to manage Azure Grafana instances.
For optimized experience, not all data plane APIs, documented at https://grafana.com/docs/grafana/latest/http_api/, are exposed. On coverage gap, please reach out to ad4g@microsoft.com.
Commands
Name | Description | Type | Status |
---|---|---|---|
az grafana api-key |
Commands to manage api keys. |
Extension | GA |
az grafana api-key create |
Create a new API key. |
Extension | GA |
az grafana api-key delete |
Delete an API key. |
Extension | GA |
az grafana api-key list |
List existing API keys. |
Extension | GA |
az grafana backup |
Backup an Azure Managed Grafana instance's content to an archive. |
Extension | Preview |
az grafana create |
Create an Azure Managed Grafana instance. |
Extension | GA |
az grafana dashboard |
Commands to manage dashboards of an instance. |
Extension | GA |
az grafana dashboard create |
Create a new dashboard. |
Extension | GA |
az grafana dashboard delete |
Delete a dashboard. |
Extension | GA |
az grafana dashboard import |
Import a dashboard. |
Extension | GA |
az grafana dashboard list |
List all dashboards of an instance. |
Extension | GA |
az grafana dashboard show |
Get the details of a dashboard. |
Extension | GA |
az grafana dashboard sync |
Sync Azure Managed Grafana dashboards from one instance to another instance. Note, dashboards with "provisioned" state will be skipped due to being read-only. |
Extension | Preview |
az grafana dashboard update |
Update a dashboard. |
Extension | GA |
az grafana data-source |
Commands to manage data sources of an instance. |
Extension | GA |
az grafana data-source create |
Create a data source. |
Extension | GA |
az grafana data-source delete |
Delete a data source. |
Extension | GA |
az grafana data-source list |
List all data sources of an instance. |
Extension | GA |
az grafana data-source query |
Query a data source having backend implementation. |
Extension | GA |
az grafana data-source show |
Get the details of a data source. |
Extension | GA |
az grafana data-source update |
Update a data source. |
Extension | GA |
az grafana delete |
Delete an Azure Managed Grafana instance. |
Extension | GA |
az grafana folder |
Commands to manage folders of an instance. |
Extension | GA |
az grafana folder create |
Create a new folder. |
Extension | GA |
az grafana folder delete |
Delete a folder. |
Extension | GA |
az grafana folder list |
List all folders of an instance. |
Extension | GA |
az grafana folder show |
Get the details of a folder. |
Extension | GA |
az grafana folder update |
Update a folder. |
Extension | GA |
az grafana list |
List Azure Managed Grafana instances. |
Extension | GA |
az grafana notification-channel |
Commands to manage notification channels of an instance. |
Extension | GA |
az grafana notification-channel create |
Create a notification channel. |
Extension | GA |
az grafana notification-channel delete |
Delete a notification channel. |
Extension | GA |
az grafana notification-channel list |
List all notification channels of an instance. |
Extension | GA |
az grafana notification-channel show |
Get the details of a notification channel. |
Extension | GA |
az grafana notification-channel test |
Test a notification channel. |
Extension | GA |
az grafana notification-channel update |
Update a notification channel. |
Extension | GA |
az grafana restore |
Restore an Azure Managed Grafana instance from an archive. |
Extension | Preview |
az grafana service-account |
Commands to manage service accounts. |
Extension | GA |
az grafana service-account create |
Create a new service account. |
Extension | GA |
az grafana service-account delete |
Delete a service account. |
Extension | GA |
az grafana service-account list |
List existing service accounts. |
Extension | GA |
az grafana service-account show |
Get the details of a service account. |
Extension | GA |
az grafana service-account token |
Commands to manage service account tokens. |
Extension | GA |
az grafana service-account token create |
Create a new service account token. |
Extension | GA |
az grafana service-account token delete |
Delete a service account token. |
Extension | GA |
az grafana service-account token list |
List existing service account tokens. |
Extension | GA |
az grafana service-account update |
Update a service account. |
Extension | GA |
az grafana show |
Show details of an Azure Managed Grafana instance. |
Extension | GA |
az grafana update |
Update an Azure Managed Grafana instance. |
Extension | GA |
az grafana user |
Commands to manage users of an instance. |
Extension | GA |
az grafana user actual-user |
Get the details of the current user. |
Extension | GA |
az grafana user list |
List users. |
Extension | GA |
az grafana user show |
Get the details of a user. |
Extension | GA |
az grafana backup
This command is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Backup an Azure Managed Grafana instance's content to an archive.
az grafana backup --name
[--components {annotations, dashboards, datasources, folders, snapshots}]
[--directory]
[--folders-to-exclude]
[--folders-to-include]
[--resource-group]
Examples
backup dashboards under 2 folders (data sources are included to enable name remapping when restore dashboards to another workspace)
az grafana backup -g MyResourceGroup -n MyGrafana -d c:\temp --folders-to-include "Prod" "Compute Gateway" --components datasources dashboards folders
backup dashboards and skip a few folders
az grafana backup -g MyResourceGroup -n MyGrafana -d c:\temp --folders-to-exclude General "Azure Monitor" --components datasources dashboards folders
Required Parameters
Name of the Azure Managed Grafana.
Optional Parameters
Grafana artifact types to backup.
Directory to backup Grafana artifacts.
Folders to exclude in backup or sync.
Folders to include in backup or sync.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az grafana create
Create an Azure Managed Grafana instance.
az grafana create --name
--resource-group
[--deterministic-outbound-ip {Disabled, Enabled}]
[--location]
[--principal-ids]
[--principal-types {Group, ServicePrincipal, User}]
[--skip-role-assignments {false, true}]
[--skip-system-assigned-identity {false, true}]
[--tags]
[--zone-redundancy {Disabled, Enabled}]
Required Parameters
Name of the Azure Managed Grafana.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
If enabled, the Grafana workspace will have fixed egress IPs you can use them in the firewall of datasources. Default: Disabled.
Location. Values from: az account list-locations
. You can configure the default location using az configure --defaults location=<location>
.
Space-separated Azure AD object ids for users, groups, etc to be made as Grafana Admins. Once provided, CLI won't make the current logged-in user as Grafana Admin.
Space-separated Azure AD principal types to pair with --principal-ids.
Do not create role assignments for managed identity and the current login user.
Do not enable system assigned identity.
Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.
Indicates whether or not zone redundancy should be enabled. Default: Disabled.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az grafana delete
Delete an Azure Managed Grafana instance.
az grafana delete --name
[--resource-group]
[--yes]
Required Parameters
Name of the Azure Managed Grafana.
Optional Parameters
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Do not prompt for confirmation.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az grafana list
List Azure Managed Grafana instances.
az grafana list [--resource-group]
Optional Parameters
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az grafana restore
This command is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Restore an Azure Managed Grafana instance from an archive.
az grafana restore --archive-file
--name
[--components {annotations, dashboards, datasources, folders, snapshots}]
[--remap-data-sources {false, true}]
[--resource-group]
Examples
Restore dashboards. If they are under folders, include "folders" in the components list; use "--remap-data-sources" so CLI will update dashboards to point to same data sources at target workspace
az grafana restore -g MyResourceGroup -n MyGrafana --archive-file backup\dashboards\ServiceHealth-202307051036.tar.gz --components dashboards folders --remap-data-sources
Required Parameters
Archive to restore Grafana artifacts from.
Name of the Azure Managed Grafana.
Optional Parameters
Grafana artifact types to backup.
During restoration, update dashboards to reference data sources defined at the destination workspace through name matching.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az grafana show
Show details of an Azure Managed Grafana instance.
az grafana show --name
[--resource-group]
Required Parameters
Name of the Azure Managed Grafana.
Optional Parameters
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az grafana update
Update an Azure Managed Grafana instance.
az grafana update --name
[--api-key {Disabled, Enabled}]
[--deterministic-outbound-ip {Disabled, Enabled}]
[--from-address]
[--from-name]
[--host]
[--major-version]
[--password]
[--public-network-access {Disabled, Enabled}]
[--resource-group]
[--skip-verify {false, true}]
[--smtp {Disabled, Enabled}]
[--start-tls-policy {MandatoryStartTLS, NoStartTLS, OpportunisticStartTLS}]
[--tags]
[--user]
Examples
disable the public network access
az grafana update -g MyResourceGroup -n MyGrafana --public-network-access disabled
enable mail notification through SMTP relay sevice of mailgun
az grafana update -g MyResourceGroup -n MyGrafana --smtp enabled --from-address johndoe@outlook.com --from-name john --host "smtp.mailgun.org:587" --user "postmaster@sandbox12345.mailgun.org" --password "password" --start-tls-policy OpportunisticStartTLS --skip-verify true
Required Parameters
Name of the Azure Managed Grafana.
Optional Parameters
If enabled, you will be able to configure Grafana API keys and service accounts.
If enabled, the Grafana workspace will have fixed egress IPs you can use them in the firewall of datasources.
Address used when sending out emails.
Name to be used when sending out emails.
SMTP server url (port included).
Grafana major version number.
SMTP server user password.
Allow public network access.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Skip verifying SSL for SMTP server.
Allow Grafana to send email.
TLS policy.
Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.
SMTP server user name.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for