Looking up a key value in Hiera is easy. Puppet comes with a very straightforward function for this:
$plugins = hiera('reporting::plugins')
Whenever the compiler encounters such a call in the manifest of the current agent node, it triggers a search in the hierarchy. The specific data sources are determined by the fact values provided by the agent (if you rely on facts to define your hierarchy, of course, which is the most common and sensible way).
If the named key cannot be found in the agent's hierarchy, the master aborts the catalog compilation with an error. To prevent this, it is often sensible to supply a default value with the lookup:
$plugins = hiera('reporting::plugins', )
In this case, Puppet ...