This topic provides reference information for the Grafana pacakge.
About Grafana
Grafana (https://grafana.com/) is open source visualization and analytics software. Grafana lets you query, visualize, alert on, and explore metrics no matter where they are stored. Grafana provides tools to form graphs and visualizations from application data.
To install the Grafana package on a TKG cluster, refer to the following topics:
- TKr for vSphere 8.x: Install Grafana
- TKr for vSphere 7.x:
Grafana Package Components
The Grafana package installs on the cluster the container listed in the table. The Grafana package pulls the container from the public registry specified in package repository.
Container | Resource Type | Replicas | Description |
---|---|---|---|
Grafana | Deployment | 2 | Data visualization |
Grafana Data Values
Below is an example
grafana-data-values.yaml
file with the following customizations:
- ingress is enabled (ingress: enabled: true)
- ingress is configured for URLs ending in / (prefix:)
- The FQDN for Grafana is grafana.system.tanzu (virtual_host_fqdn:)
- The pvc for grafana is 2GB and will be created under the default vSphere storageClass
- The admin password (base64 encoded) for the Grafana UI (grafana: secret: admin_password:).
namespace: grafana-dashboard grafana: deployment: replicas: 1 updateStrategy: Recreate pvc: accessMode: ReadWriteOnce storage: 2Gi storageClassName: default secret: admin_password: admin admin_user: YWRtaW4= type: Opaque service: port: 80 targetPort: 3000 type: LoadBalancer ingress: enabled: true prefix: / servicePort: 80 virtual_host_fqdn: grafana.system.tanzu
Grafana Configuration
The Grafana configuration is set in
grafana-data-values.yaml
. The table lists and describes the available parameters.
Parameter | Description | Type | Default |
---|---|---|---|
monitoring.namespace | Namespace where Prometheus will be deployed | string | tanzu-system-monitoring |
monitoring.create_namespace | The flag indicates whether to create the namespace specified by monitoring.namespace | boolean | false |
monitoring.grafana.cluster_role.apiGroups | api group defined for grafana clusterrole | list | [""] |
monitoring.grafana.cluster_role.resources | resources defined for grafana clusterrole | list | ["configmaps", "secrets"] |
monitoring.grafana.cluster_role.verbs | access permission defined for clusterrole | list | ["get", "watch", "list"] |
monitoring.grafana.config.grafana_ini | Grafana configuration file details | config file | grafana.ini In this file, |
monitoring.grafana.config.datasource.type | Grafana datasource type | string | prometheus |
monitoring.grafana.config.datasource.access | access mode. proxy or direct (Server or Browser in the UI) | string | proxy |
monitoring.grafana.config.datasource.isDefault | mark as default Grafana datasource | boolean | true |
monitoring.grafana.config.provider_yaml | Config file to define grafana dashboard provider | yaml file | provider.yaml |
monitoring.grafana.service.type | Type of service to expose Grafana. Supported Values: ClusterIP, NodePort, LoadBalancer | string | vSphere: NodePort, aws/azure: LoadBalancer |
monitoring.grafana.pvc.storage_class | Define access mode for persistent volume claim. Supported values: ReadWriteOnce, ReadOnlyMany, ReadWriteMany | string | ReadWriteOnce |
monitoring.grafana.pvc.storage | Define storage size for persistent volume claim | string | 2Gi |
monitoring.grafana.deployment.replicas | Number of grafana replicas | integer | 1 |
monitoring.grafana.image.repository | Location of the repository with the Grafana image. The default is the public VMware registry. Change this value if you are using a private repository (e.g., air-gapped environment). | string | projects.registry.vmware.com/tkg/grafana |
monitoring.grafana.image.name | Name of Grafana image | string | grafana |
monitoring.grafana.image.tag | Grafana image tag. This value may need to be updated if you are upgrading the version. | string | v7.3.5_vmware.1 |
monitoring.grafana.image.pullPolicy | Grafana image pull policy | string | IfNotPresent |
monitoring.grafana.secret.type | Secret type defined for Grafana dashboard | string | Opaque |
monitoring.grafana.secret.admin_user | username to access Grafana dashboard | string | YWRtaW4= Value is base64 encoded; to decode: |
monitoring.grafana.secret.admin_password | password to access Grafana dashboard | string | null |
monitoring.grafana.secret.ldap_toml | If using ldap auth, ldap configuration file path | string | "" |
monitoring.grafana_init_container.image.repository | Repository containing grafana init container image. The default is the public VMware registry. Change this value if you are using a private repository (e.g., air-gapped environment). | string | projects.registry.vmware.com/tkg/grafana |
monitoring.grafana_init_container.image.name | Name of grafana init container image | string | k8s-sidecar |
monitoring.grafana_init_container.image.tag | Grafana init container image tag. This value may need to be updated if you are upgrading the version. | string | 0.1.99 |
monitoring.grafana_init_container.image.pullPolicy | grafana init container image pull policy | string | IfNotPresent |
monitoring.grafana_sc_dashboard.image.repository | Repository containing the Grafana dashboard image. The default is the public VMware registry. Change this value if you are using a private repository (e.g., air-gapped environment). | string | projects.registry.vmware.com/tkg/grafana |
monitoring.grafana_sc_dashboard.image.name | Name of grafana dashboard image | string | k8s-sidecar |
monitoring.grafana_sc_dashboard.image.tag | Grafana dashboard image tag. This value may need to be updated if you are upgrading the version. | string | 0.1.99 |
monitoring.grafana_sc_dashboard.image.pullPolicy | grafana dashboard image pull policy | string | IfNotPresent |
monitoring.grafana.ingress.enabled | Enable/disable ingress for grafana | boolean | true |
monitoring.grafana.ingress.virtual_host_fqdn | Hostname for accessing grafana | string | grafana.system.tanzu |
monitoring.grafana.ingress.prefix | Path prefix for grafana | string | / |
monitoring.grafana.ingress.tlsCertificate.tls.crt | Optional cert for ingress if you want to use your own TLS cert. A self signed cert is generated by default | string | Generated cert |
monitoring.grafana.ingress.tlsCertificate.tls.key | Optional cert private key for ingress if you want to use your own TLS cert. | string | Generated cert key |