Ohai is a tool for collecting system configuration data, which it then provides to Chef Infra Client to use in cookbooks. Chef Infra Client runs Ohai at the start of every Chef Infra run to determine system state. The attributes that Ohai collects are called automatic attributes. Chef Infra Client uses these attributes to ensure that nodes are in the desired state after each configuration run.
The types of attributes Ohai collects include but are not limited to:
- Operating System
- Network
- Memory
- Disk
- CPU
- Kernel
- Host names
- Fully qualified domain names
- Virtualization
- Cloud provider metadata
Ohai collects data for many platforms, including
- AIX,
- macOS,
- Linux,
- FreeBSD,
- Solaris, and
- any Windows operating systems.

log "The platform on which a node is running:- #{node['platform']}!" do | |
level :info | |
end | |
log "The platform family is a Chef Infra specific:- #{node['platform_family']}!" do | |
level :info | |
end | |
log "The version of the platform: #{node['platform_version']}!" do | |
level :info | |
end | |
log "The IP address for a node: #{node['ipaddress']}!" do | |
level :info | |
end | |
log "The MAC address for a node: #{node['macaddress']}!" do | |
level :info | |
end | |
log "fully qualified domain name: #{node['fqdn']}!" do | |
level :info | |
end | |
log "The host name for the node: #{node['hostname']}!" do | |
level :info | |
end | |
log "The domain for the node: #{node['domain']}!" do | |
level :info | |
end | |
log "A list of recipes associated with a node: #{node['recipes']}!" do | |
level :info | |
end | |
log "The time at which Ohai was last run: #{node['recipes']}!" do | |
level :info | |
end |
I’m a DevOps/SRE/DevSecOps/Cloud Expert passionate about sharing knowledge and experiences. I am working at Cotocus. I blog tech insights at DevOps School, travel stories at Holiday Landmark, stock market tips at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at I reviewed , and SEO strategies at Wizbrand.
Please find my social handles as below;
Rajesh Kumar Personal Website
Rajesh Kumar at YOUTUBE
Rajesh Kumar at INSTAGRAM
Rajesh Kumar at X
Rajesh Kumar at FACEBOOK
Rajesh Kumar at LINKEDIN
Rajesh Kumar at PINTEREST
Rajesh Kumar at QUORA
Rajesh Kumar at WIZBRAND