Monitoring Services
Garden Enterprise bundles the following tools for monitoring and logging:
Elasticsearch, Fluentd and Kibana for searching, collecting and displaying logs, respectively.
Prometheus and a Grafana dashboard for monitoring.
You can choose which of these services Garden Enterprise installs during the installation process. Furthermore, you can optionally enable the ingresses to the Kibana and Grafana dashboards.
Setting Up Kibana for Logs
Before proceeding, make sure you have your Kubernetes context set to the context of the cluster that runs Garden Enterprise (you can also pass it as an option to kubectl
via the --context
flag).
Elasticsearch and Kibana are very powerful tools for storing and viewing logs respectively. Below you'll find a quick guide to getting started with Kibana, but we recommend looking at the official documentation to see the full potential of these tools.
In what follows, we assume you've already installed Garden Enterprise and that it's running in the garden-enterprise
namespace. If you used a different namespace, adjust the namespace flag in the kubectl
commands below appropriately.
Start a Port-Forward
You can start a port-forward from your localhost to Kibana by running:
Then visit http://localhost:5601 in your browser.
The links below assume you've used the port-forward command above and that Kibana is available on port 5601
locally.
Add Index Patterns
Go to the index patterns page and click Create index pattern.
Set the index pattern value to logstash-*
, click Next Step and proceed through the dialog.
View the Logs
Go to the discover page and select logstash-*
in the index pattern dropdown.
You should now see your logs on the main screen. By default, it shows all the logs that Fluentd collects in the cluster. You can easily filter on these in the search bar at the top of the page.
For example, to filter on logs from the API service, you can query for kubernetes.labels.app_kubernetes_io/name:api
.
Set Up Logs Stream (Optional)
You can also configure the logs stream view to see a live stream of logs.
Go to the logs settings page and set the log indices to: logstash-*
Next click the Apply button at the bottom.
Finally, remove all Log Columns except Timestamp
and add kubernetes.labels.app_kubernetes_io/name
and log
.
Click the Apply button again.
View the Logs Stream (Optional)
Go to the logs stream page to see a live stream of your logs.
You can filter on logs in the search bar by using the following syntax: <column-name>:<value>
. For example, kubernetes.labels.app_kubernetes_io/name:api
.
Next Steps
This barely scratches the surface of what Kibana can do, and we recommend checking out their website for a list of features, dashboard inspirations and documentation.
Setting Up Grafana for Metrics
Before proceeding, make sure you have your Kubernetes context set to the context of the cluster that runs Garden Enterprise (you can also pass it as an option to kubectl
via the --context
flag).
Grafana is an open source dashboard that can display data from Prometheus (among other things), the underlying metrics collector. Below you'll find a quick guide to getting started with Grafana, but we recommend looking at the official documentation to see its full potential.
In what follows, we assume you've already installed Garden Enterprise and that it's running in the garden-enterprise
namespace. If you used a different namespace, adjust the namespace flag in the kubectl
commands below appropriately.
Start a Port-Forward
You can start a port-forward from your localhost to Grafana by running:
Then visit http://localhost:8080 in your browser.
The links below assume you've used the port-forward command above and that Grafana is available on port 8080
locally.
Add Prometheus as Datasource
Go to the Grafana data sources page in your browser. The default username for Grafana is admin
and you'll need to provide the password you created during the Garden Enterprise installation.
On the data sources page, click Add data source and select Prometheus.
Import a Dashboard
Go to the import page and import a pre-built Grafana dashboard. You can find a list of open source Grafana dashboards here.
For example, you can try adding dashboard with ID 11074. You should now see your dashboard on the dashboard page. Click the link and start exploring.
As with the Kibana guide above, this guide barely scratches the surface of all the things Prometheus and Grafana are capable of, and we recommend you check out their official documentation for more.
Last updated