View logs and metrics using Kibana and Grafana
Kibana and Grafana web dashboards are provided to bring insight and clarity to the Kubernetes namespaces being used by Azure Arc-enabled data services. To access Kibana and Grafana web dashboards view service endpoints check Azure Data Studio dashboards documentation.
Prerequisites
Use the Bash environment in Azure Cloud Shell. For more information, see Quickstart for Bash in Azure Cloud Shell.
If you prefer to run CLI reference commands locally, install the Azure CLI. If you're running on Windows or macOS, consider running Azure CLI in a Docker container. For more information, see How to run the Azure CLI in a Docker container.
If you're using a local installation, sign in to the Azure CLI by using the az login command. To finish the authentication process, follow the steps displayed in your terminal. For other sign-in options, see Sign in with the Azure CLI.
When you're prompted, install the Azure CLI extension on first use. For more information about extensions, see Use extensions with the Azure CLI.
Run az version to find the version and dependent libraries that are installed. To upgrade to the latest version, run az upgrade.
Monitor Azure SQL managed instances on Azure Arc
To access the logs and monitoring dashboards for SQL Managed Instance enabled by Azure Arc, run the following azdata
CLI command
az sql mi-arc endpoint list -n <name of SQL instance> --use-k8s
The relevant Grafana dashboards are:
- "Azure SQL managed instance Metrics"
- "Host Node Metrics"
- "Host Pods Metrics"
Note
When prompted to enter a username and password, enter the username and password that you provided at the time that you created the Azure Arc data controller.
Note
You will be prompted with a certificate warning because the certificates are self-signed certificates.
Monitor Azure Arc-enabled PostgreSQL server
To access the logs and monitoring dashboards for an Azure Arc-enabled PostgreSQL server, run the following azdata
CLI command
az postgres server-arc endpoint list -n <name of postgreSQL instance> --k8s-namespace <namespace> --use-k8s
The relevant postgreSQL dashboards are:
- "Postgres Metrics"
- "Postgres Table Metrics"
- "Host Node Metrics"
- "Host Pods Metrics"
Additional firewall configuration
Depending on where the data controller is deployed, you may find that you need to open up ports on your firewall to access the Kibana and Grafana endpoints.
Below is an example of how to do this for an Azure VM. You will need to do this if you have deployed Kubernetes using the script.
The steps below highlight how to create an NSG rule for the Kibana and Grafana endpoints:
Find the name of the NSG
az network nsg list -g azurearcvm-rg --query "[].{NSGName:name}" -o table
Add the NSG rule
Once you have the name of the NSG you can add a rule using the following command:
az network nsg rule create -n ports_30777 --nsg-name azurearcvmNSG --priority 600 -g azurearcvm-rg --access Allow --description 'Allow Kibana and Grafana ports' --destination-address-prefixes '*' --destination-port-ranges 30777 --direction Inbound --protocol Tcp --source-address-prefixes '*' --source-port-ranges '*'