Although the Prometheus,
Kiali, and
Grafana add-ons
are enabled by default in the 1.7 version of the asm-gcp-multicloud
profile,
we recommend that you follow the applicable
third-party documentation and install your own
instance. Additionally, these addons have been removed from all profiles in
Anthos Service Mesh 1.8. For information on why the add-ons were removed, see
Reworking our Addon Integrations.
Enabling metrics export to Prometheus
To use the Prometheus, Grafana, or Kiali dashboards, Anthos Service Mesh must be configured to export metrics to Prometheus. Metrics export to Prometheus is enabled by default when you install Anthos Service Mesh on GKE on VMware or on bare metal. On these platforms, you are all set to install your own instance of the dashboards.
You can enable metrics export to Prometheus on GKE on Google Cloud clusters, but the steps for doing that differs depending on whether your clusters are in the same project or in different projects.
Same project
- Copy and paste the following YAML to a file called
prometheus-metrics-export.yaml
:
apiVersion: install.istio.io/v1alpha1
kind: IstioOperator
spec:
values:
telemetry:
enabled: true
v2:
enabled: true
prometheus:
enabled: true
stackdriver:
enabled: false
Follow the steps in Installing Anthos Service Mesh on GKE to use a Google-provided script to install or upgrade Anthos Service Mesh. When you run the script, include the following option:
--custom_overlay prometheus-metrics-export.yaml
For example:
./install_asm \ --project_id PROJECT_ID \ --cluster_name CLUSTER_NAME \ --cluster_location CLUSTER_LOCATION \ --mode install \ --output_dir DIR_PATH \ --enable_all \ --custom_overlay prometheus-metrics-export.yaml
Be sure to specify any other overlay files that you need to configure Anthos Service Mesh.
Complete the Anthos Service Mesh installation to enable automatic sidecar proxy injection on your workloads. For details, see Deploying and redeploying workloads.
Different projects
Follow the steps in the Multi-project installation and migration on GKE to the point where you install Anthos Service Mesh.
Add
--set prometheus.enabled=true
and--set stackdriver.enabled=false
to theistioctl install
command. Be sure to include any other overlay files that you need to enable optional features. For example:istioctl install \ -f asm/istio/istio-operator.yaml \ -f asm/istio/options/multiproject.yaml \ -f asm/istio/options/multicluster.yaml\ --set prometheus.enabled=true \ --set stackdriver.enabled=false \ --set revision=asm-178-10
Complete the Anthos Service Mesh installation to enable automatic sidecar proxy injection on your workloads.
Third-party documentation
You can deploy Prometheus and Grafana through the Cloud Marketplace or refer to the following documentation for installation.
Grafana:
Import the dashboards into an existing Grafana deployment.
Kiali:
Prometheus: