Chef Office Hour: Mining Automate’s Visibility data with Kibana

Mining Chef Automate’s Visibility data for fun and profit.

Automate + ELK

Automate utilizes the Elasticsearch, Logstash, Kibana stack for long term indexing and archiving of a myriad of interesting metadata.

You can get a sense of what sort of metadata is available via the default charts and graphs on Automate’s Workflow and Nodes tabs.

However, if you look under the hood, there is a whole lot more data available..

Example Event

Fields that are unindexed cannot be searched. They have a greyed out magnifying glass icon next to them.

With all of that information at your disposal, it is relatively easy to create a really functional dashboard:

Example Dashboard

Kibana

Kibana is the visualization interface for the data in Elasticsearch.

For a health status overview page: https://your-automate-server.test/kibana/status

Elasticsearch has a similar health page: https://your-automate-server.test/elasticsearch/_cluster/health?pretty=true

To get started mining go to: https://your-automate-server.test/kibana

When mining data, you will typically loop over this progression of steps:

Discover

Click on the ‘Discover’ tab and you will get a time sorted list of events in Elasticsearch that match your search criteria and within your search time-range window.

You can modify the search criteria or begin browsing the events.

Examples of using the search:

Search syntax uses Apache Lucene

Important: In addition to the Search criteria, select the time range to filter search results:

Time Range

Give your search a name and Save the search.

Save Search

Visualize

Visualize the search results by clicking the ‘Visualize’ tab next.

Creating a Pie Chart:

New Visualization

Select Viz Type

Aggregation

This will create a new Pie Chart visualization with each a slice/bucket for every event_action type indexed.

Event Type Pie Chart

You can easily apply this pattern to other searches and fields as well.

Give the visualization a name and Save it.

Add to Dashboard

Once you have a Search and associated Visualization defined, it’s time to add them to a Dashboard!

Click on the ‘Dashboard’ tab then:

New Dashboard

Add Visualization

Adding to Dashboard

External Elasticsearch

https://docs.chef.io/setup_visibility_chef_automate.html#use-an-external-elasticsearch-cluster-optional

Chef Automate uses Elasticsearch to store its data, and the default Chef Automate install includes a single Elasticsearch service. This is sufficient to run production work loads; however for greater data retention and perhaps performance, we recommend using a multi-node Elasticsearch cluster with replication and sharding to store and protect your data.