Book Image

LEARNING PUPPET

Book Image

LEARNING PUPPET

Overview of this book

Table of Contents (17 chapters)
Learning Puppet
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Creating a Nagios module for the client and server


In Chapter 3, My First Puppet Module, we practiced creating our first Puppet module for the web server that was deployed by the class called webapp. Now, we'll create another module for Nagios that incorporates a parent class called nagios and two subclasses, one for the Nagios Server called nagios::server and another for the Nagios Client called the nagios::client.

Puppet dictates the class names that we can use within the module. Let's take an example of the class nagios::server that we will create. The double colon (::) notation in the class name acts as a separator between the parent class and the subclass. In this case, server is a subclass of the parent class called nagios. This nagios parent class must reside in the Puppet module called nagios, or else Puppet won't be able to find the class. If you would declare the class nagios inside the webapp class that was created in Chapter 3, My First Puppet Module, and apply it, then Puppet...