You are here

Extending Puppet into your Monitoring Environment

Puppet Labs helps companies automate their infrastructure deployments with ease and efficiency. Puppet provides a declarative consistency across server, virtual machine and container builds. The sort of consistency that Puppet offers is the same sort of consistency you need when monitoring hundreds or thousands of compute instances. 

Opsview has introduced the Opsview Puppet Module, which automatically registers compute instances for monitoring within Opsview Monitor. It facilitates the creation, synchronization and update of the monitored system in the Opsview configuration using Opsview’s REST API.

Puppet is a powerful configuration management and automation framework, but to integrate systems like Opsview, it often requires many hours of scripting trial and error to get it working. So it’s with great pride that Opsview has released a module for its customers to easily integrate with Puppet. Note that we also have similar integration modules available for Ansible and Chef. The Opsview Puppet Module includes declaration for all the core Opsview operations. This includes Host groups, Hosts, Users/Roles , Service Checks and even Business Service Monitoring (Application Dependency Monitoring and Availability).

Let’s demonstrate how to automate a host deployment with Opsview Monitor and the Opsview Puppet Module.

As a preface, we assume the following have been completed:

  • Puppet Master is currently setup and deployed.
  • Opsview Master is running on version 5.x.
  • REST API user account has configure hosts and reloads access.
  • Opsview Puppet Module has been installed from Puppet Forge.

We’ll begin by first configuring the Opsview Puppet Module to talk to the Opsview Master Server via the Opsview REST API. This enables Puppet to communicate with the Opsview Monitor server.

File to be changed

Fig 1: File to be changed to add in settings - /etc/puppet/opsview.conf
File edited with Opsview Master URL

Fig 2: File edited with Opsview Master URL and username/password for Web UI User

To test this, we execute puppet resources –types to show all of the Opsview Components available to configure:

Opsview Puppet Module Resource Types

Fig 3: Opsview Puppet Module Resource Types

To view these, we execute puppet resource opsview_host to list all the hosts that the Opsview Monitor server is currently monitoring.

Command puppet resource opsview_host

Fig 4: Command puppet resource opsview_host
Puppet manifest file

Fig 5: Example.pp is a Puppet manifest file that includes new host information which will be added to Opsview Monitor

For our purposes, we edit example.pp which is a Puppet Manfifest file that defines the host properties of a host that Opsview is not currently monitoring. Note, the name of this host is example-host and was not seen when we ran puppet resources opsview_host.

Not shown in this demo, but another advanced feature of Opsview is BSM, our Business Service Monitoring capability. It ties applications and their service dependencies into an overall business service, like databases, apps and web servers that all work together to offer a single business service. These services could also be automatically generated by puppet using the puppet resource opsview_bsmservice and puppet resource opsview_bsmcomponent commands in the Puppet Manifest file.

Now we'll apply the configuration: puppet apply /etc/puppet/modules/opsview-puppet/examples/example.pp

Hopefully you’re using some sort of configuration management or automation in your monitoring environment already. If you aren’t, contact us for more information on how automating your monitoring environment ensures no systems go unmonitored.

Below is a video that demonstrates the integration discussed here.

Advance your monitoring with the Opsview Puppet module

For more information, visit us at GitHub. Or to get started with Opsview,  please download a free trial today.

Get unified insight into your IT operations with Opsview Monitor

jhashem's picture
by John Hashem,
Technical Pre-sales
John joined Opsview in December 2015 and continues his passion for technical pre-sales and account management. He enjoys attending technical conferences and showcasing Opsview Monitor to a wide range of audiences. In John's free time, he likes to travel and to learn new technologies.

More like this

Simplify memory and disk utilization monitoring in AWS
By John Hashem, Technical Pre-sales

Since AWS CloudWatch does not have access to your OS, some monitoring metrics may be missing including disk and memory utilization.

Container Monitoring in the Cloud
By Robert Oliver, Technical Writer

Containers are increasingly becoming a core technology in modern IT infrastructure. 

By Opsview Team, Administrator

In this technical overview we will look at automation and monitoring, and how they can be deployed to work hand-in...