# Custom OHAI plugin

**URL:** <https://discourse.chef.io/t/custom-ohai-plugin/9801>\
**Category:** Chef Infra (archive)\
**Created:** [October 31, 2016, 8:12pm UTC](https://discourse.chef.io/t/custom-ohai-plugin/9801 "2016-10-31T20:12:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kavi](https://avatars.discourse-cdn.com/v4/letter/k/a88e57/32.png) [@Kavi](https://discourse.chef.io/u/Kavi)\
**Post date:** [October 31, 2016, 8:12pm UTC](https://discourse.chef.io/t/custom-ohai-plugin/9801/1 "2016-10-31T20:12:44Z")

</div>

I am using Ohai version 8.20.0 and trying to write a custom ohai plugin. I have been reading a few articles.  
Most of them suggest copying the ohai cookbook from [https://supermarket.chef.io/cookbooks/ohai](https://supermarket.chef.io/cookbooks/ohai) and defining it as ‘depends’ in your cookbook metadata.rb.

Is this the only way to do it? Is there any other options available?

---

<div class="post-metadata">

**Author:** ![jdunn](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/jdunn/32/1800_2.png) [@jdunn](https://discourse.chef.io/u/jdunn)\
**Post date:** [November 3, 2016, 4:13am UTC](https://discourse.chef.io/t/custom-ohai-plugin/9801/2 "2016-11-03T04:13:19Z")

</div>

The [Chef Intermediate Topics class](https://training.chef.io/instructor-led-training/chef-intermediate-topics-online) will teach you how to get started writing Ohai plugins.
