Ohai is a tool that is used to collect system configuration data, which is provided to the chef-client for use within cookbooks. Ohai is run by the chef-client at the beginning of every Chef run to determine the system state. Ohai includes many built-in plugins to detect common configuration details as well as a plugin model for writing custom plugins.
The types of attributes Ohai collects includes
*Fully qualified domain names
*Cloud provider metadata
Attributes that are collected by Ohai are automatic level attributes, in that these attributes are used by the chef-client to ensure that these attributes remain unchanged after the chef-client is done configuring the node and some important directory are
*/opt/chef-server – The installation from the package is here.
*/etc/chef-server – The API-specific configuration files and keys are here.
*/var/opt/chef-server – The dependent services such as RabbitMQ, Nginx, PostgreSQL database, SOLR indexes are here.