Skip to content

Using Exported Resources

dpeters edited this page Feb 20, 2012 · 2 revisions

Using Exported Resources

Using exported resouces allows you to designate a single node that will handle all communications with Opsview. This is most useful for opsview_monitored resources, where you can define them as exported resources on individual nodes, then collect the exported resources on the chosen host where they'll actually be applied.

When using this method, the chosen host should also be the host that you're using to define any other opsview_* resources, that way it's the one and only host that talks to Opsview.

Basics

  1. Ensure you have stored configurations setup for your puppet master.
  2. Define the opsview_monitored resources as exported resources. Example to include on every node:
    class opsview::node {
      @@opsview_monitored { "$::hostname":
        ip            => $::fqdn,
        hosttemplates => "Unix",
        hostgroup     => "Group A",
      }
    }
  1. Collect the opsview_monitored resources on the chosen host. Example:
    class opsview::chosen_one {
      Opsview_monitored <<||>>
    }

Keep in mind that the chosen one will only apply resources that have already been exported. Nodes only export their data when they do a puppet run, so the master won't know about them until they've completed a puppet run.

Clone this wiki locally