Update: Learn more about Chef Analytics in our upcoming webinar on September 17, 2014 at 10am Pacific.
The Chef analytics platform is a premium feature of Chef. It provides real-time visibility into what is happening on your Chef server and is the latest in a growing suite of features that will provide a comprehensive view of your infrastructure. Chef analytics runs on separate hardware from the Chef server and consists of several components. Today, we are releasing the first version of the analytics platform, which includes the ability to log Chef actions. Over time, the analytics platform will provide additional capabilities for analyzing metrics and event data from Chef servers and clients.
Analytics give you visibility into your Chef server, a way to publish notifications when there is a change, and a way to verify compliance.
Existing Enterprise Chef features include a management console, which provides an action-oriented view of your infrastructure, and reporting, which tracks what happened during chef-client runs. However, until now there has been no easy way to see what policies have been updated on a Chef server, or to monitor changes. For example, if a bug in a cookbook stopped node convergence, administrators couldn’t be sure what cookbooks had recently changed, or been uploaded, or by whom. Chef action logs solve this by providing a real-time feed of the operations that have changed the state of the server. Actions are policy and administrative changes made to the Chef server. The Chef server gathers a lot of data—each node object, the node run history for all nodes, the history of every cookbook and cookbook version, how policy settings, such as roles, environments, and data bags, are applied and to what they are applied, individual user data, and so on. Actions are changes to any of these objects. Actions can occur as the result of user interaction in the management console, as the result of knife commands, or by running the Chef client. No matter what the source, all actions are tracked by the analytics platform and recorded in the action log. The result is real-time tracking with an intuitive display. Action logs help you to answer the following questions:
Examples are:
This information can be used to quickly identify where in the overall system something changed, which in turn helps identify what went wrong, and then helps show your organization what the resolution should be. When errors occur, you’ll also be able to see what happened just before one (or more) chef-client runs started failing. Because Chef tracks all of this in real-time, your organization will now be able to react to events as they happen, and to more quickly resolve issues that arise.
Until now, in order to respond in real time to changes on your nodes, you needed to create custom client-side handlers embedded in the Chef client. With action logs, this logic moves to the server, augmenting and replacing these for you, giving you better, centralized control over those handlers. Today you might deploy a handler to Sensu, logstash to HipChat, or PagerDuty. These will be replaced by notifications, starting with HipChat notification in this release of the Chef analytics platform. And we’ll be iterating rapidly to bring you the notification features that you need.
We use a publish-subscribe messaging platform for components to publish messages about interesting events that are happening within each public API. The pub/sub platform we use provides some standard consumers of the information, including a database
archiving component and web visualization. The data is searchable and stored long term for after-the-fact investigation and audit purposes. Here’s how it works:
Currently, the UI lets you:
We’d love to hear from you! Chef action logs were demoed at #ChefConf2014, and we’ve had great feedback and suggestions since then. Share your ideas with your sales representative. Analytics is an exciting new direction for us, and your use cases are important. We plan to continually release new features–let us know what you would like to see.
To allow you to scale Chef analytics independently from the Chef server in production, the analytics server should be deployed in a standalone configuration, on a different host from the Chef server. Follow the instructions on the Chef documentation site to install Chef action logs using the analytics package. See Install analytics prerequisites and Install analytics. Also, check out the documentation.