Merge branch 'jenkins' into 'master'

Jenkins

See merge request !1
This commit is contained in:
12ww1160
2017-07-20 15:41:28 +02:00
47 changed files with 8397 additions and 0 deletions

16
CHANGELOG.md Normal file
View File

@@ -0,0 +1,16 @@
<h1> Git Changelog changelog </h1>
<p>
Changelog of Git Changelog.
</p>
<h2> Unreleased </h2>
<h2> No issue </h2>
<a href="https://gitlab.puppetsoft.com/12WW1160/git-changelog-lib/commit/8db8758970310bf">8db8758970310bf</a> Arne Teuke <i>2017-07-20 13:31:19</i>
<p>
<h3>recommitting to see if git can be fixed</h3>
</p>

189
LICENSE Normal file
View File

@@ -0,0 +1,189 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for software and other kinds of works.
The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too.
When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.
Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions.
Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and modification follow.
TERMS AND CONDITIONS
0. Definitions.
This License refers to version 3 of the GNU General Public License.
Copyright also means copyright-like laws that apply to other kinds of works, such as semiconductor masks.
The Program refers to any copyrightable work licensed under this License. Each licensee is addressed as you. Licensees and recipients may be individuals or organizations.
To modify a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a modified version of the earlier work or a work based on the earlier work.
A covered work means either the unmodified Program or a work based on the Program.
To propagate a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well.
To convey a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays Appropriate Legal Notices to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion.
1. Source Code.
The source code for a work means the preferred form of the work for making modifications to it. Object code means any non-source form of a work.
A Standard Interface means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language.
The System Libraries of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A Major Component, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it.
The Corresponding Source for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work.
The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source.
The Corresponding Source for a work in source code form is that same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures.
When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified it, and giving a relevant date.
b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to keep intact all notices.
c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so.
A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an aggregate if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways:
a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b.
d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d.
A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work.
A User Product is either (1) a consumer product, which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, normally used refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product.
Installation Information for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made.
If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM).
The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying.
7. Additional Terms.
Additional permissions are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or authors of the material; or
e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors.
All other non-permissive additional terms are considered further restrictions within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11).
However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice.
Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License.
An entity transaction is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it.
11. Patents.
A contributor is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's contributor version.
A contributor's essential patent claims are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, control includes the right to grant patent sublicenses in a manner consistent with the requirements of this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version.
In the following three paragraphs, a patent license is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To grant such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party.
If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. Knowingly relying means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it.
A patent license is discriminatory if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License or any later version applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation.
If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program.
Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS

128
README.md Normal file
View File

@@ -0,0 +1,128 @@
|Repo Name| version | Build Status|
|---|---|---|---|
|`cd_nagios`| 0.0.0.6 | [![Build Status](https://jenkins.confdroid.com/buildStatus/icon?job=cd_nagios)](https://jenkins.confdroid.com/job/cd_nagios/)|
### Synopsis
Nagios is a powerful open source software solution for monitoring your IT environments.
`cd_nagios` is a Puppet module allowing to fully automate the setup & configuration of the Nagios server, as well as actively adding client hosts and services to the monitoring environment through PuppetDB.
### WARNING
`**__!!! Attention: Never use this puppet module on systems which have been previously configured manually. It is impossible to predict how and what would have been configured, hence previuos configurations outside the scope of this module may be overwritten! Automated configurations require a test environment to verify that the module suits the purpose intended by the user, as well as tune the parameters, before deploying into live production!!! __**`
### Table of Contents
* [Features](#features)
* [Repo Structure](https://gitlab.puppetsoft.com/12WW1160/cd_nagios/blob/master/REPOSTRUCTURE.md)
* [Dependencies](#dependencies)
* [Deployment](#deployment)
* [native Puppet deployment](#native-puppet-deployment)
* [through Foreman](#through-foreman)
* [Parameters](#parameters)
* [Mandatory Parameters](#mandatory-parameters)
* [Optional Parameters](#optional-parameters)
* [PuppetDB]
* [SELINUX](#selinux)
* [Known Problems](#known-problems)
* [Support](#support)
* [Tests](#tests)
* [Changelog](https://gitlab.puppetsoft.com/12WW1160/cd_nagios/blob/master/CHANGELOG.md)
* [Contact Us](https://confdroid.com/contact/)
* [Disclaimer](#disclaimer)
### Features
Installation:
* install httpd
* install server binaries on Nagios server
* install client binaries on clients
Configuration
* configure all aspects of Nagios on server
* manage directories (filesystem permissions, selinux )
* manage cgi.cfg through parameters
* manage nagios users through external Puppet rules via define
* configure NRPE on clients (optional)
* configure firewall (optional)
* configure selinux policies (optional)
Service
* manage Nagios service on server
* manage NRPE service on clients (optional)
### Repo Structure
Repostructure has moved to REPOSTRUCTURE.md in repo.
### Dependencies
All dependencies must be included in the catalogue.
* [cd_resources](https://gitlab.puppetsoft.com/12WW1160/cd_resources) for Yum repos.
* [cd_apache](https://gitlab.puppetsoft.com/12WW1160/cd_apache) for installing httpd
* [cd_firewall](https://gitlab.puppetsoft.com/12WW1160/cd_firewall) or [puppetlabs firewall](https://github.com/puppetlabs/puppetlabs-firewall) (optional)
* [cd_selinux](https://gitlab.puppetsoft.com/12WW1160/cd_selinux) for selinux policy adjustments
### Deployment
##### native Puppet deployment
via site.pp or nodes.pp
```
node 'example.example.net' {
include cd_puppetdb
}
```
#### through Foreman:
In order to apply parameters through Foreman, **__cd_nagios::params__** must be added to the host or hostgroup in question.
See [more details about class deployment on Confdroid.com](https://confdroid.com/2017/05/deploying-our-puppet-modules/).
### Parameters
The following parameters are editable via params.pp or through ENC (**__recommended__**). Values changed will take immediate effect at next puppet run. Services will be restarted where neccessary.
#### Mandatory Parameters
The following parameters must be set to make the module logic work properly:
* `$ng_nagios_server` : Specify the FQDN of the nagios server host. Must be a proper A-name, no CNAME i.e. on Loadbalancers. When the FQDN matches the configured value, Nagios server components will be installed and the clients will allow to be connected by that host. Impacts also firewall ports (optional).
#### Optional Parameters
* `$ng_include_nrpe` : Whether to include NRPE as means for the Nagios server to connect to clients. Defaults to `true`.
* `$ng_include_fw` : Whether to include firewall management. Requires [puppetlabs firewall](https://github.com/puppetlabs/puppetlabs-firewall) or [cd_firewall](https://gitlab.puppetsoft.com/12WW1160/cd_firewall), which is a clone of the puppetlabs firewall but tested to be fully functioning with all our features.
See the [full list of all available parameters](https://confdroid.com/2017/07/cd_nagios-parameters/)
### PuppetDB
A working instance of PuppetDBconnected to the Puppet master is required for this to work. Installation and configuration of PuppetDB is out of scope for this module, however [cd_puppetdb](https://gitlab.puppetsoft.com/12WW1160/cd_puppetdb) is available to automate this task for you as well within a few minutes.
### SELINUX
All files and directories are configured with correct selinux context. If selinux is disabled, these contexts are ignored.
### Known Problems
### Support
* OS: CentOS 6, 7
* Puppet 3.x
### Tests
* Puppet Lint
* excluded tests:
* `--no-class_inherits_from_params_class-check`:relavant only to non-supported outdated puppet versions
* `--no-variable_scope-check`: not applicable as we are inheriting parameters from params class. the lint check does not distinguish between facts and inherited parameters.
* `--no-80chars-check`: it is not always possible to stay within 80 characters, although typically only occurring on the parameter vault `params.pp`.
* `--no-arrow_alignment-check`: this check leads to actually not having am easily readable arrow alignment, as this checks `per block`, not per class.
* Puppet Parser
* ERB Template Parser
* Test for unwanted UTF8 files in the Puppet code as this causes problems with PuppetDB (see tests/UTF_Files)
### Contact Us
[contact Us](https://confdroid.com/contact/)
### Disclaimer
ConfDroid as entity is entirely independent from Puppet. We provide custom configuration modules, written for specific purposes and specific environments.
The modules are tested and supported only as documented, and require testing in designated environments (i.e. lab or development environments) for parameter tuning etc. before deploying into production environments.

34
REPOSTRUCTURE.md Normal file
View File

@@ -0,0 +1,34 @@
.
|-- manifests
| |-- client
| | `-- target.pp
| |-- firewall
| | `-- iptables.pp
| |-- main
| | |-- config.pp
| | |-- dirs.pp
| | |-- install.pp
| | `-- user.pp
| |-- selinux
| | `-- config.pp
| |-- server
| | |-- access.pp
| | |-- access_rules.pp
| | |-- files.pp
| | `-- service.pp
| |-- init.pp
| `-- params.pp
|-- templates
| |-- nagios
| | |-- cgi_cfg.erb
| | |-- htpasswd_head.erb
| | `-- htpasswd_rule.erb
| `-- selinux
| `-- taccgi.erb
|-- Gemfile
|-- Gemfile.lock
|-- Jenkinsfile
|-- LICENSE
`-- README.md
9 directories, 22 files

186
doc/_index.html Normal file
View File

@@ -0,0 +1,186 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Documentation by YARD 0.9.9
</title>
<link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
<link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
<script type="text/javascript" charset="utf-8">
pathId = null;
relpath = '';
</script>
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
</head>
<body>
<div class="nav_wrap">
<iframe id="nav" src="puppet_class_list.html?1"></iframe>
<div id="resizer"></div>
</div>
<div id="main" tabindex="-1">
<div id="header">
<div id="menu">
</div>
<div id="search">
<a class="full_list_link" id="puppet_class_list_link"
href="puppet_class_list.html">
<svg width="24" height="24">
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
</svg>
</a>
</div>
<div class="clear"></div>
</div>
<div id="content"><h1 class="noborder title">Documentation by YARD 0.9.9</h1>
<div id="listing">
<h1 class="alphaindex">Alphabetic Index</h1>
<h2>Puppet Class Listing A-Z</h2>
<table>
<tr>
<td valign='top' width="33%">
<ul id="alpha_C" class="alpha">
<li class="letter">C</li>
<ul>
<li>
<span class='object_link'><a href="puppet_classes/cd_nagios.html" title="puppet_classes::cd_nagios (puppet_class)">cd_nagios</a></span>
</li>
<li>
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Afirewall_3A_3Aiptables.html" title="puppet_classes::cd_nagios::firewall::iptables (puppet_class)">cd_nagios::firewall::iptables</a></span>
</li>
<li>
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Amain_3A_3Aconfig.html" title="puppet_classes::cd_nagios::main::config (puppet_class)">cd_nagios::main::config</a></span>
</li>
<li>
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Amain_3A_3Adirs.html" title="puppet_classes::cd_nagios::main::dirs (puppet_class)">cd_nagios::main::dirs</a></span>
</li>
<li>
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Amain_3A_3Ainstall.html" title="puppet_classes::cd_nagios::main::install (puppet_class)">cd_nagios::main::install</a></span>
</li>
<li>
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Amain_3A_3Auser.html" title="puppet_classes::cd_nagios::main::user (puppet_class)">cd_nagios::main::user</a></span>
</li>
<li>
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Aparams.html" title="puppet_classes::cd_nagios::params (puppet_class)">cd_nagios::params</a></span>
</li>
<li>
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Aselinux_3A_3Aconfig.html" title="puppet_classes::cd_nagios::selinux::config (puppet_class)">cd_nagios::selinux::config</a></span>
</li>
<li>
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Aserver_3A_3Aaccess_rules.html" title="puppet_classes::cd_nagios::server::access_rules (puppet_class)">cd_nagios::server::access_rules</a></span>
</li>
<li>
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Aserver_3A_3Afiles.html" title="puppet_classes::cd_nagios::server::files (puppet_class)">cd_nagios::server::files</a></span>
</li>
<li>
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Aserver_3A_3Aservice.html" title="puppet_classes::cd_nagios::server::service (puppet_class)">cd_nagios::server::service</a></span>
</li>
</ul>
</ul>
</td>
</tr>
</table>
<h2>Defined Type Listing A-Z</h2>
<table>
<tr>
<td valign='top' width="33%">
<ul id="alpha_C" class="alpha">
<li class="letter">C</li>
<ul>
<li>
<span class='object_link'><a href="puppet_defined_types/cd_nagios_3A_3Aserver_3A_3Aaccess.html" title="puppet_defined_types::cd_nagios::server::access (puppet_defined_type)">cd_nagios::server::access</a></span>
</li>
</ul>
</ul>
</td>
</tr>
</table>
<h2>File Listing</h2>
<ul id="files" class="index_inline_list">
<li class="r1"><a href="index.html" title="README">README</a></li>
</ul>
<div class="clear"></div>
</div>
</div>
<div id="footer">
Generated on Thu Jul 20 15:47:40 2017 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.9 (ruby-2.0.0).
</div>
</div>
</body>
</html>

8
doc/css/common.css Normal file
View File

@@ -0,0 +1,8 @@
/* Ensure the search bar doesn't overlap with links */
.fixed_header {
padding-bottom: 25px;
}
#full_list {
padding-top: 15px;
}

58
doc/css/full_list.css Normal file
View File

@@ -0,0 +1,58 @@
body {
margin: 0;
font-family: "Lucida Sans", "Lucida Grande", Verdana, Arial, sans-serif;
font-size: 13px;
height: 101%;
overflow-x: hidden;
background: #fafafa;
}
h1 { padding: 12px 10px; padding-bottom: 0; margin: 0; font-size: 1.4em; }
.clear { clear: both; }
.fixed_header { position: fixed; background: #fff; width: 100%; padding-bottom: 10px; margin-top: 0; top: 0; z-index: 9999; height: 70px; }
#search { position: absolute; right: 5px; top: 9px; padding-left: 24px; }
#content.insearch #search, #content.insearch #noresults { background: url(data:image/gif;base64,R0lGODlhEAAQAPYAAP///wAAAPr6+pKSkoiIiO7u7sjIyNjY2J6engAAAI6OjsbGxjIyMlJSUuzs7KamppSUlPLy8oKCghwcHLKysqSkpJqamvT09Pj4+KioqM7OzkRERAwMDGBgYN7e3ujo6Ly8vCoqKjY2NkZGRtTU1MTExDw8PE5OTj4+PkhISNDQ0MrKylpaWrS0tOrq6nBwcKysrLi4uLq6ul5eXlxcXGJiYoaGhuDg4H5+fvz8/KKiohgYGCwsLFZWVgQEBFBQUMzMzDg4OFhYWBoaGvDw8NbW1pycnOLi4ubm5kBAQKqqqiQkJCAgIK6urnJyckpKSjQ0NGpqatLS0sDAwCYmJnx8fEJCQlRUVAoKCggICLCwsOTk5ExMTPb29ra2tmZmZmhoaNzc3KCgoBISEiIiIgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/hpDcmVhdGVkIHdpdGggYWpheGxvYWQuaW5mbwAh+QQJCAAAACwAAAAAEAAQAAAHaIAAgoMgIiYlg4kACxIaACEJCSiKggYMCRselwkpghGJBJEcFgsjJyoAGBmfggcNEx0flBiKDhQFlIoCCA+5lAORFb4AJIihCRbDxQAFChAXw9HSqb60iREZ1omqrIPdJCTe0SWI09GBACH5BAkIAAAALAAAAAAQABAAAAdrgACCgwc0NTeDiYozCQkvOTo9GTmDKy8aFy+NOBA7CTswgywJDTIuEjYFIY0JNYMtKTEFiRU8Pjwygy4ws4owPyCKwsMAJSTEgiQlgsbIAMrO0dKDGMTViREZ14kYGRGK38nHguHEJcvTyIEAIfkECQgAAAAsAAAAABAAEAAAB2iAAIKDAggPg4iJAAMJCRUAJRIqiRGCBI0WQEEJJkWDERkYAAUKEBc4Po1GiKKJHkJDNEeKig4URLS0ICImJZAkuQAhjSi/wQyNKcGDCyMnk8u5rYrTgqDVghgZlYjcACTA1sslvtHRgQAh+QQJCAAAACwAAAAAEAAQAAAHZ4AAgoOEhYaCJSWHgxGDJCQARAtOUoQRGRiFD0kJUYWZhUhKT1OLhR8wBaaFBzQ1NwAlkIszCQkvsbOHL7Y4q4IuEjaqq0ZQD5+GEEsJTDCMmIUhtgk1lo6QFUwJVDKLiYJNUd6/hoEAIfkECQgAAAAsAAAAABAAEAAAB2iAAIKDhIWGgiUlh4MRgyQkjIURGRiGGBmNhJWHm4uen4ICCA+IkIsDCQkVACWmhwSpFqAABQoQF6ALTkWFnYMrVlhWvIKTlSAiJiVVPqlGhJkhqShHV1lCW4cMqSkAR1ofiwsjJyqGgQAh+QQJCAAAACwAAAAAEAAQAAAHZ4AAgoOEhYaCJSWHgxGDJCSMhREZGIYYGY2ElYebi56fhyWQniSKAKKfpaCLFlAPhl0gXYNGEwkhGYREUywag1wJwSkHNDU3D0kJYIMZQwk8MjPBLx9eXwuETVEyAC/BOKsuEjYFhoEAIfkECQgAAAAsAAAAABAAEAAAB2eAAIKDhIWGgiUlh4MRgyQkjIURGRiGGBmNhJWHm4ueICImip6CIQkJKJ4kigynKaqKCyMnKqSEK05StgAGQRxPYZaENqccFgIID4KXmQBhXFkzDgOnFYLNgltaSAAEpxa7BQoQF4aBACH5BAkIAAAALAAAAAAQABAAAAdogACCg4SFggJiPUqCJSWGgkZjCUwZACQkgxGEXAmdT4UYGZqCGWQ+IjKGGIUwPzGPhAc0NTewhDOdL7Ykji+dOLuOLhI2BbaFETICx4MlQitdqoUsCQ2vhKGjglNfU0SWmILaj43M5oEAOwAAAAAAAAAAAA==) no-repeat center left; }
#full_list { padding: 0; list-style: none; margin-left: 0; margin-top: 80px; font-size: 1.1em; }
#full_list ul { padding: 0; }
#full_list li { padding: 0; margin: 0; list-style: none; }
#full_list li .item { padding: 5px 5px 5px 12px; }
#noresults { padding: 7px 12px; background: #fff; }
#content.insearch #noresults { margin-left: 7px; }
li.collapsed ul { display: none; }
li a.toggle { cursor: default; position: relative; left: -5px; top: 4px; text-indent: -999px; width: 10px; height: 9px; margin-left: -10px; display: block; float: left; background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAASCAYAAABb0P4QAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAK8AAACvABQqw0mAAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAAVdEVYdENyZWF0aW9uIFRpbWUAMy8xNC8wOeNZPpQAAAE2SURBVDiNrZTBccIwEEXfelIAHUA6CZ24BGaWO+FuzZAK4k6gg5QAdGAq+Bxs2Yqx7BzyL7Llp/VfzZeQhCTc/ezuGzKKnKSzpCxXJM8fwNXda3df5RZETlIt6YUzSQDs93sl8w3wBZxCCE10GM1OcWbWjB2mWgEH4Mfdyxm3PSepBHibgQE2wLe7r4HjEidpnXMYdQPKEMJcsZ4zs2POYQOcaPfwMVOo58zsAdMt18BuoVDPxUJRacELbXv3hUIX2vYmOUvi8C8ydz/ThjXrqKqqLbDIAdsCKBd+Wo7GWa7o9qzOQHVVVXeAbs+yHHCH4aTsaCOQqunmUy1yBUAXkdMIfMlgF5EXLo2OpV/c/Up7jG4hhHcYLgWzAZXUc2b2ixsfvc/RmNNfOXD3Q/oeL9axJE1yT9IOoUu6MGUkAAAAAElFTkSuQmCC) no-repeat bottom left; }
li.collapsed a.toggle { opacity: 0.5; cursor: default; background-position: top left; }
li { color: #888; cursor: pointer; }
li.deprecated { text-decoration: line-through; font-style: italic; }
li.odd { background: #f0f0f0; }
li.even { background: #fafafa; }
.item:hover { background: #ddd; }
li small:before { content: "("; }
li small:after { content: ")"; }
li small.search_info { display: none; }
a, a:visited { text-decoration: none; color: #05a; }
li.clicked > .item { background: #05a; color: #ccc; }
li.clicked > .item a, li.clicked > .item a:visited { color: #eee; }
li.clicked > .item a.toggle { opacity: 0.5; background-position: bottom right; }
li.collapsed.clicked a.toggle { background-position: top right; }
#search input { border: 1px solid #bbb; border-radius: 3px; }
#full_list_nav { margin-left: 10px; font-size: 0.9em; display: block; color: #aaa; }
#full_list_nav a, #nav a:visited { color: #358; }
#full_list_nav a:hover { background: transparent; color: #5af; }
#full_list_nav span:after { content: ' | '; }
#full_list_nav span:last-child:after { content: ''; }
#content h1 { margin-top: 0; }
li { white-space: nowrap; cursor: normal; }
li small { display: block; font-size: 0.8em; }
li small:before { content: ""; }
li small:after { content: ""; }
li small.search_info { display: none; }
#search { width: 170px; position: static; margin: 3px; margin-left: 10px; font-size: 0.9em; color: #888; padding-left: 0; padding-right: 24px; }
#content.insearch #search { background-position: center right; }
#search input { width: 110px; }
#full_list.insearch ul { display: block; }
#full_list.insearch .item { display: none; }
#full_list.insearch .found { display: block; padding-left: 11px !important; }
#full_list.insearch li a.toggle { display: none; }
#full_list.insearch li small.search_info { display: block; }

492
doc/css/style.css Normal file
View File

@@ -0,0 +1,492 @@
html {
width: 100%;
height: 100%;
}
body {
font-family: "Lucida Sans", "Lucida Grande", Verdana, Arial, sans-serif;
font-size: 13px;
width: 100%;
margin: 0;
padding: 0;
display: flex;
display: -webkit-flex;
display: -ms-flexbox;
}
#nav {
position: relative;
width: 100%;
height: 100%;
border: 0;
border-right: 1px dotted #eee;
overflow: auto;
}
.nav_wrap {
margin: 0;
padding: 0;
width: 20%;
height: 100%;
position: relative;
display: flex;
display: -webkit-flex;
display: -ms-flexbox;
flex-shrink: 0;
-webkit-flex-shrink: 0;
-ms-flex: 1 0;
}
#resizer {
position: absolute;
right: -5px;
top: 0;
width: 10px;
height: 100%;
cursor: col-resize;
z-index: 9999;
}
#main {
flex: 5 1;
-webkit-flex: 5 1;
-ms-flex: 5 1;
outline: none;
position: relative;
background: #fff;
padding: 1.2em;
padding-top: 0.2em;
}
@media (max-width: 920px) {
.nav_wrap { width: 100%; top: 0; right: 0; overflow: visible; position: absolute; }
#resizer { display: none; }
#nav {
z-index: 9999;
background: #fff;
display: none;
position: absolute;
top: 40px;
right: 12px;
width: 500px;
max-width: 80%;
height: 80%;
overflow-y: scroll;
border: 1px solid #999;
border-collapse: collapse;
box-shadow: -7px 5px 25px #aaa;
border-radius: 2px;
}
}
@media (min-width: 920px) {
body { height: 100%; overflow: hidden; }
#main { height: 100%; overflow: auto; }
#search { display: none; }
}
#main img { max-width: 100%; }
h1 { font-size: 25px; margin: 1em 0 0.5em; padding-top: 4px; border-top: 1px dotted #d5d5d5; }
h1.noborder { border-top: 0px; margin-top: 0; padding-top: 4px; }
h1.title { margin-bottom: 10px; }
h1.alphaindex { margin-top: 0; font-size: 22px; }
h2 {
padding: 0;
padding-bottom: 3px;
border-bottom: 1px #aaa solid;
font-size: 1.4em;
margin: 1.8em 0 0.5em;
position: relative;
}
h2 small { font-weight: normal; font-size: 0.7em; display: inline; position: absolute; right: 0; }
h2 small a {
display: block;
height: 20px;
border: 1px solid #aaa;
border-bottom: 0;
border-top-left-radius: 5px;
background: #f8f8f8;
position: relative;
padding: 2px 7px;
}
.clear { clear: both; }
.inline { display: inline; }
.inline p:first-child { display: inline; }
.docstring, .tags, #filecontents { font-size: 15px; line-height: 1.5145em; }
.docstring p > code, .docstring p > tt, .tags p > code, .tags p > tt {
color: #c7254e; background: #f9f2f4; padding: 2px 4px; font-size: 1em;
border-radius: 4px;
}
.docstring h1, .docstring h2, .docstring h3, .docstring h4 { padding: 0; border: 0; border-bottom: 1px dotted #bbb; }
.docstring h1 { font-size: 1.2em; }
.docstring h2 { font-size: 1.1em; }
.docstring h3, .docstring h4 { font-size: 1em; border-bottom: 0; padding-top: 10px; }
.summary_desc .object_link a, .docstring .object_link a {
font-family: monospace; font-size: 1.05em;
color: #05a; background: #EDF4FA; padding: 2px 4px; font-size: 1em;
border-radius: 4px;
}
.rdoc-term { padding-right: 25px; font-weight: bold; }
.rdoc-list p { margin: 0; padding: 0; margin-bottom: 4px; }
.summary_desc pre.code .object_link a, .docstring pre.code .object_link a {
padding: 0px; background: inherit; color: inherit; border-radius: inherit;
}
/* style for <table> */
#filecontents table, .docstring table { border-collapse: collapse; }
#filecontents table th, #filecontents table td,
.docstring table th, .docstring table td { border: 1px solid #ccc; padding: 8px; padding-right: 17px; }
#filecontents table tr:nth-child(odd),
.docstring table tr:nth-child(odd) { background: #eee; }
#filecontents table tr:nth-child(even),
.docstring table tr:nth-child(even) { background: #fff; }
#filecontents table th, .docstring table th { background: #fff; }
/* style for <ul> */
#filecontents li > p, .docstring li > p { margin: 0px; }
#filecontents ul, .docstring ul { padding-left: 20px; }
/* style for <dl> */
#filecontents dl, .docstring dl { border: 1px solid #ccc; }
#filecontents dt, .docstring dt { background: #ddd; font-weight: bold; padding: 3px 5px; }
#filecontents dd, .docstring dd { padding: 5px 0px; margin-left: 18px; }
#filecontents dd > p, .docstring dd > p { margin: 0px; }
.note {
color: #222;
margin: 20px 0;
padding: 10px;
border: 1px solid #eee;
border-radius: 3px;
display: block;
}
.docstring .note {
border-left-color: #ccc;
border-left-width: 5px;
}
.note.todo { background: #ffffc5; border-color: #ececaa; }
.note.returns_void { background: #efefef; }
.note.deprecated { background: #ffe5e5; border-color: #e9dada; }
.note.title.deprecated { background: #ffe5e5; border-color: #e9dada; }
.note.private { background: #ffffc5; border-color: #ececaa; }
.note.title { padding: 3px 6px; font-size: 0.9em; font-family: "Lucida Sans", "Lucida Grande", Verdana, Arial, sans-serif; display: inline; }
.summary_signature + .note.title { margin-left: 7px; }
h1 .note.title { font-size: 0.5em; font-weight: normal; padding: 3px 5px; position: relative; top: -3px; text-transform: capitalize; }
.note.title { background: #efefef; }
.note.title.constructor { color: #fff; background: #6a98d6; border-color: #6689d6; }
.note.title.writeonly { color: #fff; background: #45a638; border-color: #2da31d; }
.note.title.readonly { color: #fff; background: #6a98d6; border-color: #6689d6; }
.note.title.private { background: #d5d5d5; border-color: #c5c5c5; }
.note.title.not_defined_here { background: transparent; border: none; font-style: italic; }
.discussion .note { margin-top: 6px; }
.discussion .note:first-child { margin-top: 0; }
h3.inherited {
font-style: italic;
font-family: "Lucida Sans", "Lucida Grande", Verdana, Arial, sans-serif;
font-weight: normal;
padding: 0;
margin: 0;
margin-top: 12px;
margin-bottom: 3px;
font-size: 13px;
}
p.inherited {
padding: 0;
margin: 0;
margin-left: 25px;
}
.box_info dl {
margin: 0;
border: 0;
width: 100%;
font-size: 1em;
display: flex;
display: -webkit-flex;
display: -ms-flexbox;
}
.box_info dl dt {
flex-shrink: 0;
-webkit-flex-shrink: 1;
-ms-flex-shrink: 1;
width: 100px;
text-align: right;
font-weight: bold;
border: 1px solid #aaa;
border-width: 1px 0px 0px 1px;
padding: 6px 0;
padding-right: 10px;
}
.box_info dl dd {
flex-grow: 1;
-webkit-flex-grow: 1;
-ms-flex: 1;
max-width: 420px;
padding: 6px 0;
padding-right: 20px;
border: 1px solid #aaa;
border-width: 1px 1px 0 0;
overflow: hidden;
position: relative;
}
.box_info dl:last-child > * {
border-bottom: 1px solid #aaa;
}
.box_info dl:nth-child(odd) > * { background: #eee; }
.box_info dl:nth-child(even) > * { background: #fff; }
.box_info dl > * { margin: 0; }
ul.toplevel { list-style: none; padding-left: 0; font-size: 1.1em; }
.index_inline_list { padding-left: 0; font-size: 1.1em; }
.index_inline_list li {
list-style: none;
display: inline-block;
padding: 0 12px;
line-height: 30px;
margin-bottom: 5px;
}
dl.constants { margin-left: 10px; }
dl.constants dt { font-weight: bold; font-size: 1.1em; margin-bottom: 5px; }
dl.constants dd { width: 75%; white-space: pre; font-family: monospace; margin-bottom: 18px; }
dl.constants .docstring .note:first-child { margin-top: 5px; }
.summary_desc {
margin-left: 32px;
display: block;
font-family: sans-serif;
font-size: 1.1em;
margin-top: 8px;
line-height: 1.5145em;
margin-bottom: 0.8em;
}
.summary_desc tt { font-size: 0.9em; }
dl.constants .note { padding: 2px 6px; padding-right: 12px; margin-top: 6px; }
dl.constants .docstring { margin-left: 32px; font-size: 0.9em; font-weight: normal; }
dl.constants .tags { padding-left: 32px; font-size: 0.9em; line-height: 0.8em; }
dl.constants .discussion *:first-child { margin-top: 0; }
dl.constants .discussion *:last-child { margin-bottom: 0; }
.method_details { border-top: 1px dotted #ccc; margin-top: 25px; padding-top: 0; }
.method_details.first { border: 0; margin-top: 5px; }
.method_details.first h3.signature { margin-top: 1em; }
p.signature, h3.signature {
font-size: 1.1em; font-weight: normal; font-family: Monaco, Consolas, Courier, monospace;
padding: 6px 10px; margin-top: 1em;
background: #E8F4FF; border: 1px solid #d8d8e5; border-radius: 5px;
}
p.signature tt,
h3.signature tt { font-family: Monaco, Consolas, Courier, monospace; }
p.signature .overload,
h3.signature .overload { display: block; }
p.signature .extras,
h3.signature .extras { font-weight: normal; font-family: sans-serif; color: #444; font-size: 1em; }
p.signature .not_defined_here,
h3.signature .not_defined_here,
p.signature .aliases,
h3.signature .aliases { display: block; font-weight: normal; font-size: 0.9em; font-family: sans-serif; margin-top: 0px; color: #555; }
p.signature .aliases .names,
h3.signature .aliases .names { font-family: Monaco, Consolas, Courier, monospace; font-weight: bold; color: #000; font-size: 1.2em; }
.tags .tag_title { font-size: 1.05em; margin-bottom: 0; font-weight: bold; }
.tags .tag_title tt { color: initial; padding: initial; background: initial; }
.tags ul { margin-top: 5px; padding-left: 30px; list-style: square; }
.tags ul li { margin-bottom: 3px; }
.tags ul .name { font-family: monospace; font-weight: bold; }
.tags ul .note { padding: 3px 6px; }
.tags { margin-bottom: 12px; }
.tags .examples .tag_title { margin-bottom: 10px; font-weight: bold; }
.tags .examples .inline p { padding: 0; margin: 0; font-weight: bold; font-size: 1em; }
.tags .examples .inline p:before { content: "▸"; font-size: 1em; margin-right: 5px; }
.tags .overload .overload_item { list-style: none; margin-bottom: 25px; }
.tags .overload .overload_item .signature {
padding: 2px 8px;
background: #F1F8FF; border: 1px solid #d8d8e5; border-radius: 3px;
}
.tags .overload .signature { margin-left: -15px; font-family: monospace; display: block; font-size: 1.1em; }
.tags .overload .docstring { margin-top: 15px; }
.defines { display: none; }
#method_missing_details .notice.this { position: relative; top: -8px; color: #888; padding: 0; margin: 0; }
.showSource { font-size: 0.9em; }
.showSource a, .showSource a:visited { text-decoration: none; color: #666; }
#content a, #content a:visited { text-decoration: none; color: #05a; }
#content a:hover { background: #ffffa5; }
ul.summary {
list-style: none;
font-family: monospace;
font-size: 1em;
line-height: 1.5em;
padding-left: 0px;
}
ul.summary a, ul.summary a:visited {
text-decoration: none; font-size: 1.1em;
}
ul.summary li { margin-bottom: 5px; }
.summary .summary_signature {
padding: 4px 8px;
background: #f8f8f8;
border: 1px solid #f0f0f0;
border-radius: 5px;
}
.summary_signature:hover { background: #CFEBFF; border-color: #A4CCDA; cursor: pointer; }
ul.summary.compact li { display: inline-block; margin: 0px 5px 0px 0px; line-height: 2.6em;}
ul.summary.compact .summary_signature { padding: 5px 7px; padding-right: 4px; }
#content .summary_signature:hover a,
#content .summary_signature:hover a:visited {
background: transparent;
color: #049;
}
p.inherited a { font-family: monospace; font-size: 0.9em; }
p.inherited { word-spacing: 5px; font-size: 1.2em; }
p.children { font-size: 1.2em; }
p.children a { font-size: 0.9em; }
p.children strong { font-size: 0.8em; }
p.children strong.modules { padding-left: 5px; }
ul.fullTree { display: none; padding-left: 0; list-style: none; margin-left: 0; margin-bottom: 10px; }
ul.fullTree ul { margin-left: 0; padding-left: 0; list-style: none; }
ul.fullTree li { text-align: center; padding-top: 18px; padding-bottom: 12px; background: url(data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAAHtJREFUeNqMzrEJAkEURdGzuhgZbSoYWcAWoBVsB4JgZAGmphsZCZYzTQgWNCYrDN9RvMmHx+X916SUBFbo8CzD1idXrLErw1mQttgXtyrOcQ/Ny5p4Qh+2XqLYYazsPWNTiuMkRxa4vcV+evuNAUOLIx5+c2hyzv7hNQC67Q+/HHmlEwAAAABJRU5ErkJggg==) no-repeat top center; }
ul.fullTree li:first-child { padding-top: 0; background: transparent; }
ul.fullTree li:last-child { padding-bottom: 0; }
.showAll ul.fullTree { display: block; }
.showAll .inheritName { display: none; }
#search { position: absolute; right: 12px; top: 0px; z-index: 9000; }
#search a {
display: block; float: left;
padding: 4px 8px; text-decoration: none; color: #05a; fill: #05a;
border: 1px solid #d8d8e5;
border-bottom-left-radius: 3px; border-bottom-right-radius: 3px;
background: #F1F8FF;
box-shadow: -1px 1px 3px #ddd;
}
#search a:hover { background: #f5faff; color: #06b; fill: #06b; }
#search a.active {
background: #568; padding-bottom: 20px; color: #fff; fill: #fff;
border: 1px solid #457;
border-top-left-radius: 5px; border-top-right-radius: 5px;
}
#search a.inactive { color: #999; fill: #999; }
.inheritanceTree, .toggleDefines {
float: right;
border-left: 1px solid #aaa;
position: absolute; top: 0; right: 0;
height: 100%;
background: #f6f6f6;
padding: 5px;
min-width: 55px;
text-align: center;
}
#menu { font-size: 1.3em; color: #bbb; }
#menu .title, #menu a { font-size: 0.7em; }
#menu .title a { font-size: 1em; }
#menu .title { color: #555; }
#menu a, #menu a:visited { color: #333; text-decoration: none; border-bottom: 1px dotted #bbd; }
#menu a:hover { color: #05a; }
#footer { margin-top: 15px; border-top: 1px solid #ccc; text-align: center; padding: 7px 0; color: #999; }
#footer a, #footer a:visited { color: #444; text-decoration: none; border-bottom: 1px dotted #bbd; }
#footer a:hover { color: #05a; }
#listing ul.alpha { font-size: 1.1em; }
#listing ul.alpha { margin: 0; padding: 0; padding-bottom: 10px; list-style: none; }
#listing ul.alpha li.letter { font-size: 1.4em; padding-bottom: 10px; }
#listing ul.alpha ul { margin: 0; padding-left: 15px; }
#listing ul small { color: #666; font-size: 0.7em; }
li.r1 { background: #f0f0f0; }
li.r2 { background: #fafafa; }
#content ul.summary li.deprecated .summary_signature a,
#content ul.summary li.deprecated .summary_signature a:visited { text-decoration: line-through; font-style: italic; }
#toc {
position: relative;
float: right;
overflow-x: auto;
right: -3px;
margin-left: 20px;
margin-bottom: 20px;
padding: 20px; padding-right: 30px;
max-width: 300px;
z-index: 5000;
background: #fefefe;
border: 1px solid #ddd;
box-shadow: -2px 2px 6px #bbb;
}
#toc .title { margin: 0; }
#toc ol { padding-left: 1.8em; }
#toc li { font-size: 1.1em; line-height: 1.7em; }
#toc > ol > li { font-size: 1.1em; font-weight: bold; }
#toc ol > ol { font-size: 0.9em; }
#toc ol ol > ol { padding-left: 2.3em; }
#toc ol + li { margin-top: 0.3em; }
#toc.hidden { padding: 10px; background: #fefefe; box-shadow: none; }
#toc.hidden:hover { background: #fafafa; }
#filecontents h1 + #toc.nofloat { margin-top: 0; }
@media (max-width: 560px) {
#toc {
margin-left: 0;
margin-top: 16px;
float: none;
max-width: none;
}
}
/* syntax highlighting */
.source_code { display: none; padding: 3px 8px; border-left: 8px solid #ddd; margin-top: 5px; }
#filecontents pre.code, .docstring pre.code, .source_code pre { font-family: monospace; }
#filecontents pre.code, .docstring pre.code { display: block; }
.source_code .lines { padding-right: 12px; color: #555; text-align: right; }
#filecontents pre.code, .docstring pre.code,
.tags pre.example {
padding: 9px 14px;
margin-top: 4px;
border: 1px solid #e1e1e8;
background: #f7f7f9;
border-radius: 4px;
font-size: 1em;
overflow-x: auto;
line-height: 1.2em;
}
pre.code { color: #000; tab-size: 2; }
pre.code .info.file { color: #555; }
pre.code .val { color: #036A07; }
pre.code .tstring_content,
pre.code .heredoc_beg, pre.code .heredoc_end,
pre.code .qwords_beg, pre.code .qwords_end, pre.code .qwords_sep,
pre.code .words_beg, pre.code .words_end, pre.code .words_sep,
pre.code .qsymbols_beg, pre.code .qsymbols_end, pre.code .qsymbols_sep,
pre.code .symbols_beg, pre.code .symbols_end, pre.code .symbols_sep,
pre.code .tstring, pre.code .dstring { color: #036A07; }
pre.code .fid, pre.code .rubyid_new, pre.code .rubyid_to_s,
pre.code .rubyid_to_sym, pre.code .rubyid_to_f,
pre.code .dot + pre.code .id,
pre.code .rubyid_to_i pre.code .rubyid_each { color: #0085FF; }
pre.code .comment { color: #0066FF; }
pre.code .const, pre.code .constant { color: #585CF6; }
pre.code .label,
pre.code .symbol { color: #C5060B; }
pre.code .kw,
pre.code .rubyid_require,
pre.code .rubyid_extend,
pre.code .rubyid_include { color: #0000FF; }
pre.code .ivar { color: #318495; }
pre.code .gvar,
pre.code .rubyid_backref,
pre.code .rubyid_nth_ref { color: #6D79DE; }
pre.code .regexp, .dregexp { color: #036A07; }
pre.code a { border-bottom: 1px dotted #bbf; }
/* Color fix for links */
#content .summary_desc pre.code .id > .object_link a, /* identifier */
#content .docstring pre.code .id > .object_link a { color: #0085FF; }
#content .summary_desc pre.code .const > .object_link a, /* constant */
#content .docstring pre.code .const > .object_link a { color: #585CF6; }

307
doc/file.README.html Normal file
View File

@@ -0,0 +1,307 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
File: README
&mdash; Documentation by YARD 0.9.9
</title>
<link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
<link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
<script type="text/javascript" charset="utf-8">
pathId = "";
relpath = '';
</script>
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
</head>
<body>
<div class="nav_wrap">
<iframe id="nav" src="file_list.html?1"></iframe>
<div id="resizer"></div>
</div>
<div id="main" tabindex="-1">
<div id="header">
<div id="menu">
<a href="_index.html">Index</a> &raquo;
<span class="title">File: README</span>
</div>
<div id="search">
<a class="full_list_link" id="puppet_class_list_link"
href="puppet_class_list.html">
<svg width="24" height="24">
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
</svg>
</a>
</div>
<div class="clear"></div>
</div>
<div id="content"><div id='filecontents'>
<p>|Repo Name| version | Build
Status|
|---|---|---|---|
|<code>cd_nagios</code>| 0.0.0.6 | <a
href="https://jenkins.confdroid.com/buildStatus/icon?job=cd_nagios">{Build
Status</a>/]|</p>
<h3 id="label-Synopsis">Synopsis</h3>
<p>Nagios is a powerful open source software solution for monitoring your IT
environments.</p>
<p><code>cd_nagios</code> is a Puppet module allowing to fully automate the
setup &amp; configuration of the Nagios server, as well as actively adding
client hosts and services to the monitoring environment through PuppetDB.</p>
<h3 id="label-WARNING">WARNING</h3>
<p><code>**__!!! Attention: Never use this puppet module on systems which have
been previously configured manually. It is impossible to predict how and
what would have been configured, hence previuos configurations outside the
scope of this module may be overwritten! Automated configurations require a
test environment to verify that the module suits the purpose intended by
the user, as well as tune the parameters, before deploying into live
production!!! __**</code></p>
<h3 id="label-Table+of+Contents">Table of Contents</h3>
<ul><li>
<p><a href="#features">Features</a></p>
</li><li>
<p><a
href="https://gitlab.puppetsoft.com/12WW1160/cd_nagios/blob/master/REPOSTRUCTURE.md">Repo
Structure</a></p>
</li><li>
<p><a href="#dependencies">Dependencies</a></p>
</li><li>
<p><a href="#deployment">Deployment</a></p>
</li><li>
<p><a href="#native-puppet-deployment">native Puppet deployment</a></p>
</li><li>
<p><a href="#through-foreman">through Foreman</a></p>
</li><li>
<p><a href="#parameters">Parameters</a></p>
</li><li>
<p><a href="#mandatory-parameters">Mandatory Parameters</a></p>
</li><li>
<p><a href="#optional-parameters">Optional Parameters</a></p>
</li><li>
<p>[PuppetDB]</p>
</li><li>
<p><a href="#selinux">SELINUX</a></p>
</li><li>
<p><a href="#known-problems">Known Problems</a></p>
</li><li>
<p><a href="#support">Support</a></p>
</li><li>
<p><a href="#tests">Tests</a></p>
</li><li>
<p><a
href="https://gitlab.puppetsoft.com/12WW1160/cd_nagios/blob/master/CHANGELOG.md">Changelog</a></p>
</li><li>
<p><a href="https://confdroid.com/contact/">Contact Us</a></p>
</li><li>
<p><a href="#disclaimer">Disclaimer</a></p>
</li></ul>
<h3 id="label-Features">Features</h3>
<p>Installation:
* install httpd
* install server binaries on Nagios server
*
install client binaries on clients</p>
<p>Configuration
* configure all aspects of Nagios on server
* manage
directories (filesystem permissions, selinux )
* manage cgi.cfg through
parameters
* manage nagios users through external Puppet rules via define
*
configure NRPE on clients (optional)
* configure firewall (optional)
*
configure selinux policies (optional)</p>
<p>Service
* manage Nagios service on server
* manage NRPE service on clients
(optional)</p>
<h3 id="label-Repo+Structure">Repo Structure</h3>
<p>Repostructure has moved to REPOSTRUCTURE.md in repo.</p>
<h3 id="label-Dependencies">Dependencies</h3>
<p>All dependencies must be included in the catalogue.</p>
<ul><li>
<p><a
href="https://gitlab.puppetsoft.com/12WW1160/cd_resources">cd_resources</a>
for Yum repos.</p>
</li><li>
<p><a href="https://gitlab.puppetsoft.com/12WW1160/cd_apache">cd_apache</a>
for installing httpd</p>
</li><li>
<p><a
href="https://gitlab.puppetsoft.com/12WW1160/cd_firewall">cd_firewall</a>
or <a href="https://github.com/puppetlabs/puppetlabs-firewall">puppetlabs
firewall</a> (optional)</p>
</li><li>
<p><a href="https://gitlab.puppetsoft.com/12WW1160/cd_selinux">cd_selinux</a>
for selinux policy adjustments</p>
</li></ul>
<h3 id="label-Deployment">Deployment</h3>
<h5 id="label-native+Puppet+deployment">native Puppet deployment</h5>
<p>via site.pp or nodes.pp</p>
<pre class="code ruby"><code class="ruby">node &#39;example.example.net&#39; {
include cd_puppetdb
}</code></pre>
<h4 id="label-through+Foreman%3A">through Foreman:</h4>
<p>In order to apply parameters through Foreman,
<strong>cd_nagios::params</strong> must be added to the host or hostgroup
in question.</p>
<p>See <a
href="https://confdroid.com/2017/05/deploying-our-puppet-modules/">more
details about class deployment on Confdroid.com</a>.</p>
<h3 id="label-Parameters">Parameters</h3>
<p>The following parameters are editable via params.pp or through ENC
(<strong>recommended</strong>). Values changed will take immediate effect
at next puppet run. Services will be restarted where neccessary.</p>
<h4 id="label-Mandatory+Parameters">Mandatory Parameters</h4>
<p>The following parameters must be set to make the module logic work
properly:</p>
<ul><li>
<p><code>$ng_nagios_server</code> : Specify the FQDN of the nagios server
host. Must be a proper A-name, no CNAME i.e. on Loadbalancers. When the
FQDN matches the configured value, Nagios server components will be
installed and the clients will allow to be connected by that host. Impacts
also firewall ports (optional).</p>
</li></ul>
<h4 id="label-Optional+Parameters">Optional Parameters</h4>
<ul><li>
<p><code>$ng_include_nrpe</code> : Whether to include NRPE as means for the
Nagios server to connect to clients. Defaults to <code>true</code>.</p>
</li><li>
<p><code>$ng_include_fw</code> : Whether to include firewall management.
Requires <a
href="https://github.com/puppetlabs/puppetlabs-firewall">puppetlabs
firewall</a> or <a
href="https://gitlab.puppetsoft.com/12WW1160/cd_firewall">cd_firewall</a>,
which is a clone of the puppetlabs firewall but tested to be fully
functioning with all our features.</p>
</li></ul>
<p>See the <a href="https://confdroid.com/2017/07/cd_nagios-parameters/">full
list of all available parameters</a></p>
<h3 id="label-PuppetDB">PuppetDB</h3>
<p>A working instance of PuppetDBconnected to the Puppet master is required
for this to work. Installation and configuration of PuppetDB is out of
scope for this module, however <a
href="https://gitlab.puppetsoft.com/12WW1160/cd_puppetdb">cd_puppetdb</a>
is available to automate this task for you as well within a few minutes.</p>
<h3 id="label-SELINUX">SELINUX</h3>
<p>All files and directories are configured with correct selinux context. If
selinux is disabled, these contexts are ignored.</p>
<h3 id="label-Known+Problems">Known Problems</h3>
<h3 id="label-Support">Support</h3>
<ul><li>
<p>OS: CentOS 6, 7</p>
</li><li>
<p>Puppet 3.x</p>
</li></ul>
<h3 id="label-Tests">Tests</h3>
<ul><li>
<p>Puppet Lint</p>
</li><li>
<p>excluded tests:</p>
<ul><li>
<p><code>--no-class_inherits_from_params_class-check</code>:relavant only to
non-supported outdated puppet versions</p>
</li><li>
<p><code>--no-variable_scope-check</code>: not applicable as we are inheriting
parameters from params class. the lint check does not distinguish between
facts and inherited parameters.</p>
</li><li>
<p><code>--no-80chars-check</code>: it is not always possible to stay within
80 characters, although typically only occurring on the parameter vault
<code>params.pp</code>.</p>
</li><li>
<p><code>--no-arrow_alignment-check</code>: this check leads to actually not
having am easily readable arrow alignment, as this checks <code>per
block</code>, not per class.</p>
</li></ul>
</li><li>
<p>Puppet Parser</p>
</li><li>
<p>ERB Template Parser</p>
</li><li>
<p>Test for unwanted UTF8 files in the Puppet code as this causes problems
with PuppetDB (see tests/UTF_Files)</p>
</li></ul>
<h3 id="label-Contact+Us">Contact Us</h3>
<p><a href="https://confdroid.com/contact/">contact Us</a></p>
<h3 id="label-Disclaimer">Disclaimer</h3>
<p>ConfDroid as entity is entirely independent from Puppet. We provide custom
configuration modules, written for specific purposes and specific
environments.
The modules are tested and supported only as documented, and
require testing in designated environments (i.e. lab or development
environments) for parameter tuning etc. before deploying into production
environments.</p>
</div></div>
<div id="footer">
Generated on Thu Jul 20 15:47:41 2017 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.9 (ruby-2.0.0).
</div>
</div>
</body>
</html>

17
doc/frames.html Normal file
View File

@@ -0,0 +1,17 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Documentation by YARD 0.9.9</title>
</head>
<script type="text/javascript" charset="utf-8">
var match = unescape(window.location.hash).match(/^#!(.+)/);
var name = match ? match[1] : 'index.html';
name = name.replace(/^(\w+):\/\//, '').replace(/^\/\//, '');
window.top.location = name;
</script>
<noscript>
<h1>Oops!</h1>
<h2>YARD requires JavaScript!</h2>
</noscript>
</html>

307
doc/index.html Normal file
View File

@@ -0,0 +1,307 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
File: README
&mdash; Documentation by YARD 0.9.9
</title>
<link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
<link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
<script type="text/javascript" charset="utf-8">
pathId = "";
relpath = '';
</script>
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
</head>
<body>
<div class="nav_wrap">
<iframe id="nav" src="puppet_class_list.html?1"></iframe>
<div id="resizer"></div>
</div>
<div id="main" tabindex="-1">
<div id="header">
<div id="menu">
<a href="_index.html">Index</a> &raquo;
<span class="title">File: README</span>
</div>
<div id="search">
<a class="full_list_link" id="puppet_class_list_link"
href="puppet_class_list.html">
<svg width="24" height="24">
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
</svg>
</a>
</div>
<div class="clear"></div>
</div>
<div id="content"><div id='filecontents'>
<p>|Repo Name| version | Build
Status|
|---|---|---|---|
|<code>cd_nagios</code>| 0.0.0.6 | <a
href="https://jenkins.confdroid.com/buildStatus/icon?job=cd_nagios">{Build
Status</a>/]|</p>
<h3 id="label-Synopsis">Synopsis</h3>
<p>Nagios is a powerful open source software solution for monitoring your IT
environments.</p>
<p><code>cd_nagios</code> is a Puppet module allowing to fully automate the
setup &amp; configuration of the Nagios server, as well as actively adding
client hosts and services to the monitoring environment through PuppetDB.</p>
<h3 id="label-WARNING">WARNING</h3>
<p><code>**__!!! Attention: Never use this puppet module on systems which have
been previously configured manually. It is impossible to predict how and
what would have been configured, hence previuos configurations outside the
scope of this module may be overwritten! Automated configurations require a
test environment to verify that the module suits the purpose intended by
the user, as well as tune the parameters, before deploying into live
production!!! __**</code></p>
<h3 id="label-Table+of+Contents">Table of Contents</h3>
<ul><li>
<p><a href="#features">Features</a></p>
</li><li>
<p><a
href="https://gitlab.puppetsoft.com/12WW1160/cd_nagios/blob/master/REPOSTRUCTURE.md">Repo
Structure</a></p>
</li><li>
<p><a href="#dependencies">Dependencies</a></p>
</li><li>
<p><a href="#deployment">Deployment</a></p>
</li><li>
<p><a href="#native-puppet-deployment">native Puppet deployment</a></p>
</li><li>
<p><a href="#through-foreman">through Foreman</a></p>
</li><li>
<p><a href="#parameters">Parameters</a></p>
</li><li>
<p><a href="#mandatory-parameters">Mandatory Parameters</a></p>
</li><li>
<p><a href="#optional-parameters">Optional Parameters</a></p>
</li><li>
<p>[PuppetDB]</p>
</li><li>
<p><a href="#selinux">SELINUX</a></p>
</li><li>
<p><a href="#known-problems">Known Problems</a></p>
</li><li>
<p><a href="#support">Support</a></p>
</li><li>
<p><a href="#tests">Tests</a></p>
</li><li>
<p><a
href="https://gitlab.puppetsoft.com/12WW1160/cd_nagios/blob/master/CHANGELOG.md">Changelog</a></p>
</li><li>
<p><a href="https://confdroid.com/contact/">Contact Us</a></p>
</li><li>
<p><a href="#disclaimer">Disclaimer</a></p>
</li></ul>
<h3 id="label-Features">Features</h3>
<p>Installation:
* install httpd
* install server binaries on Nagios server
*
install client binaries on clients</p>
<p>Configuration
* configure all aspects of Nagios on server
* manage
directories (filesystem permissions, selinux )
* manage cgi.cfg through
parameters
* manage nagios users through external Puppet rules via define
*
configure NRPE on clients (optional)
* configure firewall (optional)
*
configure selinux policies (optional)</p>
<p>Service
* manage Nagios service on server
* manage NRPE service on clients
(optional)</p>
<h3 id="label-Repo+Structure">Repo Structure</h3>
<p>Repostructure has moved to REPOSTRUCTURE.md in repo.</p>
<h3 id="label-Dependencies">Dependencies</h3>
<p>All dependencies must be included in the catalogue.</p>
<ul><li>
<p><a
href="https://gitlab.puppetsoft.com/12WW1160/cd_resources">cd_resources</a>
for Yum repos.</p>
</li><li>
<p><a href="https://gitlab.puppetsoft.com/12WW1160/cd_apache">cd_apache</a>
for installing httpd</p>
</li><li>
<p><a
href="https://gitlab.puppetsoft.com/12WW1160/cd_firewall">cd_firewall</a>
or <a href="https://github.com/puppetlabs/puppetlabs-firewall">puppetlabs
firewall</a> (optional)</p>
</li><li>
<p><a href="https://gitlab.puppetsoft.com/12WW1160/cd_selinux">cd_selinux</a>
for selinux policy adjustments</p>
</li></ul>
<h3 id="label-Deployment">Deployment</h3>
<h5 id="label-native+Puppet+deployment">native Puppet deployment</h5>
<p>via site.pp or nodes.pp</p>
<pre class="code ruby"><code class="ruby">node &#39;example.example.net&#39; {
include cd_puppetdb
}</code></pre>
<h4 id="label-through+Foreman%3A">through Foreman:</h4>
<p>In order to apply parameters through Foreman,
<strong>cd_nagios::params</strong> must be added to the host or hostgroup
in question.</p>
<p>See <a
href="https://confdroid.com/2017/05/deploying-our-puppet-modules/">more
details about class deployment on Confdroid.com</a>.</p>
<h3 id="label-Parameters">Parameters</h3>
<p>The following parameters are editable via params.pp or through ENC
(<strong>recommended</strong>). Values changed will take immediate effect
at next puppet run. Services will be restarted where neccessary.</p>
<h4 id="label-Mandatory+Parameters">Mandatory Parameters</h4>
<p>The following parameters must be set to make the module logic work
properly:</p>
<ul><li>
<p><code>$ng_nagios_server</code> : Specify the FQDN of the nagios server
host. Must be a proper A-name, no CNAME i.e. on Loadbalancers. When the
FQDN matches the configured value, Nagios server components will be
installed and the clients will allow to be connected by that host. Impacts
also firewall ports (optional).</p>
</li></ul>
<h4 id="label-Optional+Parameters">Optional Parameters</h4>
<ul><li>
<p><code>$ng_include_nrpe</code> : Whether to include NRPE as means for the
Nagios server to connect to clients. Defaults to <code>true</code>.</p>
</li><li>
<p><code>$ng_include_fw</code> : Whether to include firewall management.
Requires <a
href="https://github.com/puppetlabs/puppetlabs-firewall">puppetlabs
firewall</a> or <a
href="https://gitlab.puppetsoft.com/12WW1160/cd_firewall">cd_firewall</a>,
which is a clone of the puppetlabs firewall but tested to be fully
functioning with all our features.</p>
</li></ul>
<p>See the <a href="https://confdroid.com/2017/07/cd_nagios-parameters/">full
list of all available parameters</a></p>
<h3 id="label-PuppetDB">PuppetDB</h3>
<p>A working instance of PuppetDBconnected to the Puppet master is required
for this to work. Installation and configuration of PuppetDB is out of
scope for this module, however <a
href="https://gitlab.puppetsoft.com/12WW1160/cd_puppetdb">cd_puppetdb</a>
is available to automate this task for you as well within a few minutes.</p>
<h3 id="label-SELINUX">SELINUX</h3>
<p>All files and directories are configured with correct selinux context. If
selinux is disabled, these contexts are ignored.</p>
<h3 id="label-Known+Problems">Known Problems</h3>
<h3 id="label-Support">Support</h3>
<ul><li>
<p>OS: CentOS 6, 7</p>
</li><li>
<p>Puppet 3.x</p>
</li></ul>
<h3 id="label-Tests">Tests</h3>
<ul><li>
<p>Puppet Lint</p>
</li><li>
<p>excluded tests:</p>
<ul><li>
<p><code>--no-class_inherits_from_params_class-check</code>:relavant only to
non-supported outdated puppet versions</p>
</li><li>
<p><code>--no-variable_scope-check</code>: not applicable as we are inheriting
parameters from params class. the lint check does not distinguish between
facts and inherited parameters.</p>
</li><li>
<p><code>--no-80chars-check</code>: it is not always possible to stay within
80 characters, although typically only occurring on the parameter vault
<code>params.pp</code>.</p>
</li><li>
<p><code>--no-arrow_alignment-check</code>: this check leads to actually not
having am easily readable arrow alignment, as this checks <code>per
block</code>, not per class.</p>
</li></ul>
</li><li>
<p>Puppet Parser</p>
</li><li>
<p>ERB Template Parser</p>
</li><li>
<p>Test for unwanted UTF8 files in the Puppet code as this causes problems
with PuppetDB (see tests/UTF_Files)</p>
</li></ul>
<h3 id="label-Contact+Us">Contact Us</h3>
<p><a href="https://confdroid.com/contact/">contact Us</a></p>
<h3 id="label-Disclaimer">Disclaimer</h3>
<p>ConfDroid as entity is entirely independent from Puppet. We provide custom
configuration modules, written for specific purposes and specific
environments.
The modules are tested and supported only as documented, and
require testing in designated environments (i.e. lab or development
environments) for parameter tuning etc. before deploying into production
environments.</p>
</div></div>
<div id="footer">
Generated on Thu Jul 20 15:47:41 2017 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.9 (ruby-2.0.0).
</div>
</div>
</body>
</html>

248
doc/js/app.js Normal file
View File

@@ -0,0 +1,248 @@
(function() {
var localStorage = {}, sessionStorage = {};
try { localStorage = window.localStorage; } catch (e) { }
try { sessionStorage = window.sessionStorage; } catch (e) { }
function createSourceLinks() {
$('.method_details_list .source_code').
before("<span class='showSource'>[<a href='#' class='toggleSource'>View source</a>]</span>");
$('.toggleSource').toggle(function() {
$(this).parent().nextAll('.source_code').slideDown(100);
$(this).text("Hide source");
},
function() {
$(this).parent().nextAll('.source_code').slideUp(100);
$(this).text("View source");
});
}
function createDefineLinks() {
var tHeight = 0;
$('.defines').after(" <a href='#' class='toggleDefines'>more...</a>");
$('.toggleDefines').toggle(function() {
tHeight = $(this).parent().prev().height();
$(this).prev().css('display', 'inline');
$(this).parent().prev().height($(this).parent().height());
$(this).text("(less)");
},
function() {
$(this).prev().hide();
$(this).parent().prev().height(tHeight);
$(this).text("more...");
});
}
function createFullTreeLinks() {
var tHeight = 0;
$('.inheritanceTree').toggle(function() {
tHeight = $(this).parent().prev().height();
$(this).parent().toggleClass('showAll');
$(this).text("(hide)");
$(this).parent().prev().height($(this).parent().height());
},
function() {
$(this).parent().toggleClass('showAll');
$(this).parent().prev().height(tHeight);
$(this).text("show all");
});
}
function searchFrameButtons() {
$('.full_list_link').click(function() {
toggleSearchFrame(this, $(this).attr('href'));
return false;
});
window.addEventListener('message', function(e) {
if (e.data === 'navEscape') {
$('#nav').slideUp(100);
$('#search a').removeClass('active inactive');
$(window).focus();
}
});
$(window).resize(function() {
if ($('#search:visible').length === 0) {
$('#nav').removeAttr('style');
$('#search a').removeClass('active inactive');
$(window).focus();
}
});
}
function toggleSearchFrame(id, link) {
var frame = $('#nav');
$('#search a').removeClass('active').addClass('inactive');
if (frame.attr('src') === link && frame.css('display') !== "none") {
frame.slideUp(100);
$('#search a').removeClass('active inactive');
}
else {
$(id).addClass('active').removeClass('inactive');
if (frame.attr('src') !== link) frame.attr('src', link);
frame.slideDown(100);
}
}
function linkSummaries() {
$('.summary_signature').click(function() {
document.location = $(this).find('a').attr('href');
});
}
function summaryToggle() {
$('.summary_toggle').click(function(e) {
e.preventDefault();
localStorage.summaryCollapsed = $(this).text();
$('.summary_toggle').each(function() {
$(this).text($(this).text() == "collapse" ? "expand" : "collapse");
var next = $(this).parent().parent().nextAll('ul.summary').first();
if (next.hasClass('compact')) {
next.toggle();
next.nextAll('ul.summary').first().toggle();
}
else if (next.hasClass('summary')) {
var list = $('<ul class="summary compact" />');
list.html(next.html());
list.find('.summary_desc, .note').remove();
list.find('a').each(function() {
$(this).html($(this).find('strong').html());
$(this).parent().html($(this)[0].outerHTML);
});
next.before(list);
next.toggle();
}
});
return false;
});
if (localStorage.summaryCollapsed == "collapse") {
$('.summary_toggle').first().click();
} else { localStorage.summaryCollapsed = "expand"; }
}
function generateTOC() {
if ($('#filecontents').length === 0) return;
var _toc = $('<ol class="top"></ol>');
var show = false;
var toc = _toc;
var counter = 0;
var tags = ['h2', 'h3', 'h4', 'h5', 'h6'];
var i;
if ($('#filecontents h1').length > 1) tags.unshift('h1');
for (i = 0; i < tags.length; i++) { tags[i] = '#filecontents ' + tags[i]; }
var lastTag = parseInt(tags[0][1], 10);
$(tags.join(', ')).each(function() {
if ($(this).parents('.method_details .docstring').length != 0) return;
if (this.id == "filecontents") return;
show = true;
var thisTag = parseInt(this.tagName[1], 10);
if (this.id.length === 0) {
var proposedId = $(this).attr('toc-id');
if (typeof(proposedId) != "undefined") this.id = proposedId;
else {
var proposedId = $(this).text().replace(/[^a-z0-9-]/ig, '_');
if ($('#' + proposedId).length > 0) { proposedId += counter; counter++; }
this.id = proposedId;
}
}
if (thisTag > lastTag) {
for (i = 0; i < thisTag - lastTag; i++) {
var tmp = $('<ol/>'); toc.append(tmp); toc = tmp;
}
}
if (thisTag < lastTag) {
for (i = 0; i < lastTag - thisTag; i++) toc = toc.parent();
}
var title = $(this).attr('toc-title');
if (typeof(title) == "undefined") title = $(this).text();
toc.append('<li><a href="#' + this.id + '">' + title + '</a></li>');
lastTag = thisTag;
});
if (!show) return;
html = '<div id="toc"><p class="title hide_toc"><a href="#"><strong>Table of Contents</strong></a></p></div>';
$('#content').prepend(html);
$('#toc').append(_toc);
$('#toc .hide_toc').toggle(function() {
$('#toc .top').slideUp('fast');
$('#toc').toggleClass('hidden');
$('#toc .title small').toggle();
}, function() {
$('#toc .top').slideDown('fast');
$('#toc').toggleClass('hidden');
$('#toc .title small').toggle();
});
}
function navResizeFn(e) {
if (e.which !== 1) {
navResizeFnStop();
return;
}
sessionStorage.navWidth = e.pageX.toString();
$('.nav_wrap').css('width', e.pageX);
$('.nav_wrap').css('-ms-flex', 'inherit');
}
function navResizeFnStop() {
$(window).unbind('mousemove', navResizeFn);
window.removeEventListener('message', navMessageFn, false);
}
function navMessageFn(e) {
if (e.data.action === 'mousemove') navResizeFn(e.data.event);
if (e.data.action === 'mouseup') navResizeFnStop();
}
function navResizer() {
$('#resizer').mousedown(function(e) {
e.preventDefault();
$(window).mousemove(navResizeFn);
window.addEventListener('message', navMessageFn, false);
});
$(window).mouseup(navResizeFnStop);
if (sessionStorage.navWidth) {
navResizeFn({which: 1, pageX: parseInt(sessionStorage.navWidth, 10)});
}
}
function navExpander() {
var done = false, timer = setTimeout(postMessage, 500);
function postMessage() {
if (done) return;
clearTimeout(timer);
var opts = { action: 'expand', path: pathId };
document.getElementById('nav').contentWindow.postMessage(opts, '*');
done = true;
}
window.addEventListener('message', function(event) {
if (event.data === 'navReady') postMessage();
return false;
}, false);
}
function mainFocus() {
var hash = window.location.hash;
if (hash !== '' && $(hash)[0]) {
$(hash)[0].scrollIntoView();
}
setTimeout(function() { $('#main').focus(); }, 10);
}
$(document).ready(function() {
navResizer();
navExpander();
createSourceLinks();
createDefineLinks();
createFullTreeLinks();
searchFrameButtons();
linkSummaries();
summaryToggle();
generateTOC();
mainFocus();
});
})();

216
doc/js/full_list.js Normal file
View File

@@ -0,0 +1,216 @@
(function() {
var $clicked = $(null);
var searchTimeout = null;
var searchCache = [];
var caseSensitiveMatch = false;
var ignoreKeyCodeMin = 8;
var ignoreKeyCodeMax = 46;
var commandKey = 91;
RegExp.escape = function(text) {
return text.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
}
function escapeShortcut() {
$(document).keydown(function(evt) {
if (evt.which == 27) {
window.parent.postMessage('navEscape', '*');
}
});
}
function navResizer() {
$(window).mousemove(function(e) {
window.parent.postMessage({
action: 'mousemove', event: {pageX: e.pageX, which: e.which}
}, '*');
}).mouseup(function(e) {
window.parent.postMessage({action: 'mouseup'}, '*');
});
window.parent.postMessage("navReady", "*");
}
function clearSearchTimeout() {
clearTimeout(searchTimeout);
searchTimeout = null;
}
function enableLinks() {
// load the target page in the parent window
$('#full_list li').on('click', function(evt) {
$('#full_list li').removeClass('clicked');
$clicked = $(this);
$clicked.addClass('clicked');
evt.stopPropagation();
if (evt.target.tagName === 'A') return true;
var elem = $clicked.find('> .item .object_link a')[0];
var e = evt.originalEvent;
var newEvent = new MouseEvent(evt.originalEvent.type);
newEvent.initMouseEvent(e.type, e.canBubble, e.cancelable, e.view, e.detail, e.screenX, e.screenY, e.clientX, e.clientY, e.ctrlKey, e.altKey, e.shiftKey, e.metaKey, e.button, e.relatedTarget);
elem.dispatchEvent(newEvent);
evt.preventDefault();
return false;
});
}
function enableToggles() {
// show/hide nested classes on toggle click
$('#full_list a.toggle').on('click', function(evt) {
evt.stopPropagation();
evt.preventDefault();
$(this).parent().parent().toggleClass('collapsed');
highlight();
});
}
function populateSearchCache() {
$('#full_list li .item').each(function() {
var $node = $(this);
var $link = $node.find('.object_link a');
if ($link.length > 0) {
searchCache.push({
node: $node,
link: $link,
name: $link.text(),
fullName: $link.attr('title').split(' ')[0]
});
}
});
}
function enableSearch() {
$('#search input').keyup(function(event) {
if (ignoredKeyPress(event)) return;
if (this.value === "") {
clearSearch();
} else {
performSearch(this.value);
}
});
$('#full_list').after("<div id='noresults' style='display:none'></div>");
}
function ignoredKeyPress(event) {
if (
(event.keyCode > ignoreKeyCodeMin && event.keyCode < ignoreKeyCodeMax) ||
(event.keyCode == commandKey)
) {
return true;
} else {
return false;
}
}
function clearSearch() {
clearSearchTimeout();
$('#full_list .found').removeClass('found').each(function() {
var $link = $(this).find('.object_link a');
$link.text($link.text());
});
$('#full_list, #content').removeClass('insearch');
$clicked.parents().removeClass('collapsed');
highlight();
}
function performSearch(searchString) {
clearSearchTimeout();
$('#full_list, #content').addClass('insearch');
$('#noresults').text('').hide();
partialSearch(searchString, 0);
}
function partialSearch(searchString, offset) {
var lastRowClass = '';
var i = null;
for (i = offset; i < Math.min(offset + 50, searchCache.length); i++) {
var item = searchCache[i];
var searchName = (searchString.indexOf('::') != -1 ? item.fullName : item.name);
var matchString = buildMatchString(searchString);
var matchRegexp = new RegExp(matchString, caseSensitiveMatch ? "" : "i");
if (searchName.match(matchRegexp) == null) {
item.node.removeClass('found');
item.link.text(item.link.text());
}
else {
item.node.addClass('found');
item.node.removeClass(lastRowClass).addClass(lastRowClass == 'r1' ? 'r2' : 'r1');
lastRowClass = item.node.hasClass('r1') ? 'r1' : 'r2';
item.link.html(item.name.replace(matchRegexp, "<strong>$&</strong>"));
}
}
if(i == searchCache.length) {
searchDone();
} else {
searchTimeout = setTimeout(function() {
partialSearch(searchString, i);
}, 0);
}
}
function searchDone() {
searchTimeout = null;
highlight();
if ($('#full_list li:visible').size() === 0) {
$('#noresults').text('No results were found.').hide().fadeIn();
} else {
$('#noresults').text('').hide();
}
$('#content').removeClass('insearch');
}
function buildMatchString(searchString, event) {
caseSensitiveMatch = searchString.match(/[A-Z]/) != null;
var regexSearchString = RegExp.escape(searchString);
if (caseSensitiveMatch) {
regexSearchString += "|" +
$.map(searchString.split(''), function(e) { return RegExp.escape(e); }).
join('.+?');
}
return regexSearchString;
}
function highlight() {
$('#full_list li:visible').each(function(n) {
$(this).removeClass('even odd').addClass(n % 2 == 0 ? 'odd' : 'even');
});
}
/**
* Expands the tree to the target element and its immediate
* children.
*/
function expandTo(path) {
var $target = $(document.getElementById('object_' + path));
$target.addClass('clicked');
$target.removeClass('collapsed');
$target.parentsUntil('#full_list', 'li').removeClass('collapsed');
if($target[0]) {
window.scrollTo(window.scrollX, $target.offset().top - 250);
highlight();
}
}
function windowEvents(event) {
var msg = event.data;
if (msg.action === "expand") {
expandTo(msg.path);
}
return false;
}
window.addEventListener("message", windowEvents, false);
$(document).ready(function() {
escapeShortcut();
navResizer();
enableLinks();
enableToggles();
populateSearchCache();
enableSearch();
});
})();

4
doc/js/jquery.js vendored Normal file

File diff suppressed because one or more lines are too long

124
doc/puppet_class_list.html Normal file
View File

@@ -0,0 +1,124 @@
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta charset="utf-8" />
<link rel="stylesheet" href="css/full_list.css" type="text/css" media="screen" charset="utf-8" />
<link rel="stylesheet" href="css/common.css" type="text/css" media="screen" charset="utf-8" />
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="js/full_list.js"></script>
<title>Puppet Class List</title>
<base id="base_target" target="_parent" />
</head>
<body>
<div id="content">
<div class="fixed_header">
<h1 id="full_list_header">Puppet Class List</h1>
<div id="full_list_nav">
<span><a target="_self" href="puppet_class_list.html">
Puppet Classes
</a></span>
<span><a target="_self" href="puppet_defined_type_list.html">
Defined Types
</a></span>
</div>
<div id="search">Search: <input type="text" /></div>
</div>
<ul id="full_list" class="puppet_class">
<li id="object_puppet_classes::cd_nagios" class="odd">
<div class="item">
<span class='object_link'><a href="puppet_classes/cd_nagios.html" title="puppet_classes::cd_nagios (puppet_class)">cd_nagios</a></span>
</div>
</li>
<li id="object_puppet_classes::cd_nagios::firewall::iptables" class="even">
<div class="item">
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Afirewall_3A_3Aiptables.html" title="puppet_classes::cd_nagios::firewall::iptables (puppet_class)">cd_nagios::firewall::iptables</a></span>
</div>
</li>
<li id="object_puppet_classes::cd_nagios::main::config" class="odd">
<div class="item">
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Amain_3A_3Aconfig.html" title="puppet_classes::cd_nagios::main::config (puppet_class)">cd_nagios::main::config</a></span>
</div>
</li>
<li id="object_puppet_classes::cd_nagios::main::dirs" class="even">
<div class="item">
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Amain_3A_3Adirs.html" title="puppet_classes::cd_nagios::main::dirs (puppet_class)">cd_nagios::main::dirs</a></span>
</div>
</li>
<li id="object_puppet_classes::cd_nagios::main::install" class="odd">
<div class="item">
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Amain_3A_3Ainstall.html" title="puppet_classes::cd_nagios::main::install (puppet_class)">cd_nagios::main::install</a></span>
</div>
</li>
<li id="object_puppet_classes::cd_nagios::main::user" class="even">
<div class="item">
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Amain_3A_3Auser.html" title="puppet_classes::cd_nagios::main::user (puppet_class)">cd_nagios::main::user</a></span>
</div>
</li>
<li id="object_puppet_classes::cd_nagios::params" class="odd">
<div class="item">
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Aparams.html" title="puppet_classes::cd_nagios::params (puppet_class)">cd_nagios::params</a></span>
</div>
</li>
<li id="object_puppet_classes::cd_nagios::selinux::config" class="even">
<div class="item">
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Aselinux_3A_3Aconfig.html" title="puppet_classes::cd_nagios::selinux::config (puppet_class)">cd_nagios::selinux::config</a></span>
</div>
</li>
<li id="object_puppet_classes::cd_nagios::server::access_rules" class="odd">
<div class="item">
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Aserver_3A_3Aaccess_rules.html" title="puppet_classes::cd_nagios::server::access_rules (puppet_class)">cd_nagios::server::access_rules</a></span>
</div>
</li>
<li id="object_puppet_classes::cd_nagios::server::files" class="even">
<div class="item">
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Aserver_3A_3Afiles.html" title="puppet_classes::cd_nagios::server::files (puppet_class)">cd_nagios::server::files</a></span>
</div>
</li>
<li id="object_puppet_classes::cd_nagios::server::service" class="odd">
<div class="item">
<span class='object_link'><a href="puppet_classes/cd_nagios_3A_3Aserver_3A_3Aservice.html" title="puppet_classes::cd_nagios::server::service (puppet_class)">cd_nagios::server::service</a></span>
</div>
</li>
</ul>
</div>
</body>
</html>

View File

@@ -0,0 +1,149 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Puppet Class: cd_nagios
&mdash; Documentation by YARD 0.9.9
</title>
<link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
<link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
<script type="text/javascript" charset="utf-8">
pathId = "puppet_classes::cd_nagios";
relpath = '../';
</script>
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
</head>
<body>
<div class="nav_wrap">
<iframe id="nav" src="../puppet_class_list.html?1"></iframe>
<div id="resizer"></div>
</div>
<div id="main" tabindex="-1">
<div id="header">
<div id="menu">
<a href="../_index.html">Index (c)</a> &raquo;
<span class='title'><span class='object_link'>Puppet Classes</span></span>
&raquo;
<span class="title">cd_nagios</span>
</div>
<div id="search">
<a class="full_list_link" id="puppet_class_list_link"
href="../puppet_class_list.html">
<svg width="24" height="24">
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
</svg>
</a>
</div>
<div class="clear"></div>
</div>
<div id="content"><h1>Puppet Class: cd_nagios</h1>
<div class="box_info">
<dl>
<dt>Defined in:</dt>
<dd>
manifests/init.pp
</dd>
</dl>
</div>
<h2>Summary</h2>
Class initialises the cd_nagios Module.
<h2>Overview</h2>
<div class="docstring">
<div class="discussion">
<p>cd_nagios::init.pp
Module name: cd_nagios
Author: Arne Teuke
(arne_teuke@confdroid.com)
License:
This file is part of cd_nagios.</p>
<p>cd_nagios is used for providing automatic configuration of Nagios
Copyright (C) 2017 confdroid (copyright@confdroid.com)
This program is
free software: you can redistribute it and/or modify
it under the terms of
the GNU General Public License as published by
the Free Software
Foundation, either version 3 of the License, or
(at your option) any later
version.</p>
<p>This program is distributed in the hope that it will be useful,
but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License
for more details.</p>
<p>You should have received a copy of the GNU General Public License
along
with this program. If not, see <a
href="http://www.gnu.org/licenses">www.gnu.org/licenses</a>/.</p>
</div>
</div>
<div class="tags">
</div><div class="method_details_list">
<table class="source_code">
<tr>
<td>
<pre class="lines">
23
24
25</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'manifests/init.pp', line 23</span>
class cd_nagios {
include cd_nagios::params
}</pre>
</td>
</tr>
</table>
</div>
</div>
<div id="footer">
Generated on Thu Jul 20 15:47:41 2017 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.9 (ruby-2.0.0).
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,217 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Puppet Class: cd_nagios::firewall::iptables
&mdash; Documentation by YARD 0.9.9
</title>
<link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
<link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
<script type="text/javascript" charset="utf-8">
pathId = "puppet_classes::cd_nagios::firewall::iptables";
relpath = '../';
</script>
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
</head>
<body>
<div class="nav_wrap">
<iframe id="nav" src="../puppet_class_list.html?1"></iframe>
<div id="resizer"></div>
</div>
<div id="main" tabindex="-1">
<div id="header">
<div id="menu">
<a href="../_index.html">Index (c)</a> &raquo;
<span class='title'><span class='object_link'>Puppet Classes</span></span>
&raquo;
<span class="title">cd_nagios::firewall::iptables</span>
</div>
<div id="search">
<a class="full_list_link" id="puppet_class_list_link"
href="../puppet_class_list.html">
<svg width="24" height="24">
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
</svg>
</a>
</div>
<div class="clear"></div>
</div>
<div id="content"><h1>Puppet Class: cd_nagios::firewall::iptables</h1>
<div class="box_info">
<dl>
<dt>Inherits:</dt>
<dd><span class='object_link'><a href="cd_nagios_3A_3Aparams.html" title="puppet_classes::cd_nagios::params (puppet_class)">cd_nagios::params</a></span></dd>
</dl>
<dl>
<dt>Defined in:</dt>
<dd>
manifests/firewall/iptables.pp
</dd>
</dl>
</div>
<h2>Summary</h2>
manage firewall settings through cd_firewall or puppetlabs-firewall
<h2>Overview</h2>
<div class="docstring">
<div class="discussion">
<p>cd_nagios::firewall::iptables.pp
Module name: cd_nagios
Author: Arne Teuke
(arne_teuke@ConfDroid.com)
License:
This file is part of cd_nagios.</p>
<p>cd_nagios is used for providing automatic configuration of
&lt;service /
purpose&gt;
Copyright (C) 2017 ConfDroid (copyright@ConfDroid.com)
This
program is free software: you can redistribute it and/or modify
it under
the terms of the GNU General Public License as published by
the Free
Software Foundation, either version 3 of the License, or
(at your option)
any later version.</p>
<p>This program is distributed in the hope that it will be useful,
but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License
for more details.</p>
<p>You should have received a copy of the GNU General Public License
along
with this program. If not, see <a
href="http://www.gnu.org/licenses">www.gnu.org/licenses</a>/.</p>
</div>
</div>
<div class="tags">
</div><div class="method_details_list">
<table class="source_code">
<tr>
<td>
<pre class="lines">
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'manifests/firewall/iptables.pp', line 24</span>
class cd_nagios::firewall::iptables (
) inherits cd_nagios::params {
if $::fqdn == $ng_nagios_server {
if $ng_use_https != true {
firewall { &quot;${ng_fw_order}${ng_http_port} port ${ng_http_port}&quot;:
proto =&gt; [&#39;tcp&#39;,&#39;udp&#39;],
dport =&gt; $ng_http_port,
action =&gt; &#39;accept&#39;,
}
}
if $ng_use_https == true {
firewall { &quot;${ng_fw_order}${ng_https_port} port ${ng_https_port}&quot;:
proto =&gt; [&#39;tcp&#39;,&#39;udp&#39;],
dport =&gt; $ng_https_port,
action =&gt; &#39;accept&#39;,
}
if $ng_http_https_fw == true {
firewall { &quot;${ng_fw_order}${ng_http_port} port ${ng_http_port}&quot;:
proto =&gt; [&#39;tcp&#39;,&#39;udp&#39;],
dport =&gt; $ng_http_port,
action =&gt; &#39;accept&#39;,
}
}
}
}
}</pre>
</td>
</tr>
</table>
</div>
</div>
<div id="footer">
Generated on Thu Jul 20 15:47:43 2017 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.9 (ruby-2.0.0).
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,197 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Puppet Class: cd_nagios::main::config
&mdash; Documentation by YARD 0.9.9
</title>
<link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
<link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
<script type="text/javascript" charset="utf-8">
pathId = "puppet_classes::cd_nagios::main::config";
relpath = '../';
</script>
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
</head>
<body>
<div class="nav_wrap">
<iframe id="nav" src="../puppet_class_list.html?1"></iframe>
<div id="resizer"></div>
</div>
<div id="main" tabindex="-1">
<div id="header">
<div id="menu">
<a href="../_index.html">Index (c)</a> &raquo;
<span class='title'><span class='object_link'>Puppet Classes</span></span>
&raquo;
<span class="title">cd_nagios::main::config</span>
</div>
<div id="search">
<a class="full_list_link" id="puppet_class_list_link"
href="../puppet_class_list.html">
<svg width="24" height="24">
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
</svg>
</a>
</div>
<div class="clear"></div>
</div>
<div id="content"><h1>Puppet Class: cd_nagios::main::config</h1>
<div class="box_info">
<dl>
<dt>Inherits:</dt>
<dd><span class='object_link'><a href="cd_nagios_3A_3Aparams.html" title="puppet_classes::cd_nagios::params (puppet_class)">cd_nagios::params</a></span></dd>
</dl>
<dl>
<dt>Defined in:</dt>
<dd>
manifests/main/config.pp
</dd>
</dl>
</div>
<h2>Summary</h2>
Class manages all aspects of configuring the module logic for
cd_nagios.
<h2>Overview</h2>
<div class="docstring">
<div class="discussion">
<p>cd_nagios::main::config.pp
Module name: cd_nagios
Author: Arne Teuke
(arne_teuke@ConfDroid.com)</p>
<h1 id="label-License%3A">License:</h1>
<p>This file is part of cd_nagios.</p>
<p>cd_nagios is used for providing automatic configuration of Nagios
Copyright (C) 2016 ConfDroid (copyright@ConfDroid.com)
This program is
free software: you can redistribute it and/or modify
it under the terms of
the GNU General Public License as published by
the Free Software
Foundation, either version 3 of the License, or
(at your option) any later
version.</p>
<p>This program is distributed in the hope that it will be useful,
but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License
for more details.</p>
<p>You should have received a copy of the GNU General Public License
along
with this program. If not, see <a
href="http://www.gnu.org/licenses">www.gnu.org/licenses</a>/.</p>
</div>
</div>
<div class="tags">
</div><div class="method_details_list">
<table class="source_code">
<tr>
<td>
<pre class="lines">
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'manifests/main/config.pp', line 24</span>
class cd_nagios::main::config (
) inherits cd_nagios::params {
# manage server configuration
if $::fqdn == $ng_nagios_server {
include cd_nagios::server::service
if $ng_include_fw == true {
include cd_nagios::firewall::iptables
}
if $ng_use_selinux_tools == true {
include cd_nagios::selinux::config
}
}
if $::fqdn != $ng_nagios_server {
include cd_nagios::client::target
}
}</pre>
</td>
</tr>
</table>
</div>
</div>
<div id="footer">
Generated on Thu Jul 20 15:47:43 2017 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.9 (ruby-2.0.0).
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,478 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Puppet Class: cd_nagios::main::dirs
&mdash; Documentation by YARD 0.9.9
</title>
<link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
<link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
<script type="text/javascript" charset="utf-8">
pathId = "puppet_classes::cd_nagios::main::dirs";
relpath = '../';
</script>
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
</head>
<body>
<div class="nav_wrap">
<iframe id="nav" src="../puppet_class_list.html?1"></iframe>
<div id="resizer"></div>
</div>
<div id="main" tabindex="-1">
<div id="header">
<div id="menu">
<a href="../_index.html">Index (c)</a> &raquo;
<span class='title'><span class='object_link'>Puppet Classes</span></span>
&raquo;
<span class="title">cd_nagios::main::dirs</span>
</div>
<div id="search">
<a class="full_list_link" id="puppet_class_list_link"
href="../puppet_class_list.html">
<svg width="24" height="24">
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
</svg>
</a>
</div>
<div class="clear"></div>
</div>
<div id="content"><h1>Puppet Class: cd_nagios::main::dirs</h1>
<div class="box_info">
<dl>
<dt>Inherits:</dt>
<dd><span class='object_link'><a href="cd_nagios_3A_3Aparams.html" title="puppet_classes::cd_nagios::params (puppet_class)">cd_nagios::params</a></span></dd>
</dl>
<dl>
<dt>Defined in:</dt>
<dd>
manifests/main/dirs.pp
</dd>
</dl>
</div>
<h2>Summary</h2>
Class manages all directories required for cd_nagios.
<h2>Overview</h2>
<div class="docstring">
<div class="discussion">
<p>cd_nagios::main::dirs.pp
Module name: cd_nagios
Author: Arne Teuke
(arne_teuke@ConfDroid.com)</p>
<h1 id="label-License%3A">License:</h1>
<p>This file is part of cd_nagios.</p>
<p>cd_nagios is used for providing automatic configuration of Nagios.
Copyright (C) 2016 ConfDroid (copyright@ConfDroid.com)
This program is
free software: you can redistribute it and/or modify
it under the terms of
the GNU General Public License as published by
the Free Software
Foundation, either version 3 of the License, or
(at your option) any later
version.</p>
<p>This program is distributed in the hope that it will be useful,
but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License
for more details.</p>
<p>You should have received a copy of the GNU General Public License
along
with this program. If not, see <a
href="http://www.gnu.org/licenses">www.gnu.org/licenses</a>/.</p>
</div>
</div>
<div class="tags">
</div><div class="method_details_list">
<table class="source_code">
<tr>
<td>
<pre class="lines">
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'manifests/main/dirs.pp', line 23</span>
class cd_nagios::main::dirs (
) inherits cd_nagios::params {
require cd_nagios::main::user
# main directory
file { $ng_main_dir:
ensure =&gt; directory,
path =&gt; $ng_main_dir,
owner =&gt; &#39;root&#39;,
group =&gt; &#39;root&#39;,
mode =&gt; &#39;0755&#39;,
selrange =&gt; s0,
selrole =&gt; object_r,
seltype =&gt; nagios_etc_t,
seluser =&gt; system_u,
}
# /usr/lib64/nagios dir required for plugins
file { $ng_lib_dir:
ensure =&gt; directory,
path =&gt; $ng_lib_dir,
owner =&gt; &#39;root&#39;,
group =&gt; &#39;root&#39;,
mode =&gt; &#39;0755&#39;,
selrange =&gt; s0,
selrole =&gt; object_r,
seltype =&gt; lib_t,
seluser =&gt; system_u,
}
# /var/spool/nagios
file { $ng_spool_dir:
ensure =&gt; directory,
path =&gt; $ng_spool_dir,
owner =&gt; $ng_user,
group =&gt; $ng_user,
mode =&gt; &#39;0755&#39;,
selrange =&gt; s0,
selrole =&gt; object_r,
seltype =&gt; nagios_spool_t,
seluser =&gt; system_u,
}
if $::fqdn == $ng_nagios_server {
# /etc/nagios/conf.d
file { $ng_conf_d_dir:
ensure =&gt; directory,
path =&gt; $ng_conf_d_dir,
owner =&gt; &#39;root&#39;,
group =&gt; $ng_user,
mode =&gt; &#39;0750&#39;,
selrange =&gt; s0,
selrole =&gt; object_r,
seltype =&gt; nagios_etc_t,
seluser =&gt; system_u,
}
# /etc/nagios/objects
file { $ng_objects_dir:
ensure =&gt; directory,
path =&gt; $ng_objects_dir,
owner =&gt; &#39;root&#39;,
group =&gt; $ng_user,
mode =&gt; &#39;0750&#39;,
selrange =&gt; s0,
selrole =&gt; object_r,
seltype =&gt; nagios_etc_t,
seluser =&gt; system_u,
}
# /etc/nagios/private
file { $ng_private_dir:
ensure =&gt; directory,
path =&gt; $ng_private_dir,
owner =&gt; &#39;root&#39;,
group =&gt; $ng_user,
mode =&gt; &#39;0750&#39;,
selrange =&gt; s0,
selrole =&gt; object_r,
seltype =&gt; nagios_etc_t,
seluser =&gt; system_u,
}
# include dir
file { $ng_usr_incl:
ensure =&gt; directory,
path =&gt; $ng_usr_incl,
owner =&gt; &#39;root&#39;,
group =&gt; &#39;root&#39;,
mode =&gt; &#39;0755&#39;,
selrange =&gt; s0,
selrole =&gt; object_r,
seltype =&gt; usr_t,
seluser =&gt; system_u,
}
# log dir
file { $ng_log_dir:
ensure =&gt; directory,
path =&gt; $ng_log_dir,
owner =&gt; $ng_user,
group =&gt; $ng_user,
mode =&gt; &#39;0750&#39;,
selrange =&gt; s0,
selrole =&gt; object_r,
seltype =&gt; nagios_log_t,
seluser =&gt; system_u,
}
# log archives
file { $ng_log_archives:
ensure =&gt; directory,
path =&gt; $ng_log_archives,
owner =&gt; $ng_user,
group =&gt; $ng_user,
mode =&gt; &#39;0750&#39;,
selrange =&gt; s0,
selrole =&gt; object_r,
seltype =&gt; nagios_log_t,
seluser =&gt; system_u,
}
# /usr/share/nagios
file { $ng_usr_share:
ensure =&gt; directory,
path =&gt; $ng_usr_share,
owner =&gt; &#39;root&#39;,
group =&gt; &#39;root&#39;,
mode =&gt; &#39;0755&#39;,
selrange =&gt; s0,
selrole =&gt; object_r,
seltype =&gt; usr_t,
seluser =&gt; system_u,
}
# /usr/share/nagios/html
file { $ng_share_html:
ensure =&gt; directory,
path =&gt; $ng_share_html,
owner =&gt; &#39;root&#39;,
group =&gt; &#39;root&#39;,
mode =&gt; &#39;0755&#39;,
selrange =&gt; s0,
selrole =&gt; object_r,
seltype =&gt; usr_t,
seluser =&gt; system_u,
}
}
}</pre>
</td>
</tr>
</table>
</div>
</div>
<div id="footer">
Generated on Thu Jul 20 15:47:43 2017 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.9 (ruby-2.0.0).
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,245 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Puppet Class: cd_nagios::main::install
&mdash; Documentation by YARD 0.9.9
</title>
<link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
<link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
<script type="text/javascript" charset="utf-8">
pathId = "puppet_classes::cd_nagios::main::install";
relpath = '../';
</script>
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
</head>
<body>
<div class="nav_wrap">
<iframe id="nav" src="../puppet_class_list.html?1"></iframe>
<div id="resizer"></div>
</div>
<div id="main" tabindex="-1">
<div id="header">
<div id="menu">
<a href="../_index.html">Index (c)</a> &raquo;
<span class='title'><span class='object_link'>Puppet Classes</span></span>
&raquo;
<span class="title">cd_nagios::main::install</span>
</div>
<div id="search">
<a class="full_list_link" id="puppet_class_list_link"
href="../puppet_class_list.html">
<svg width="24" height="24">
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
</svg>
</a>
</div>
<div class="clear"></div>
</div>
<div id="content"><h1>Puppet Class: cd_nagios::main::install</h1>
<div class="box_info">
<dl>
<dt>Inherits:</dt>
<dd><span class='object_link'><a href="cd_nagios_3A_3Aparams.html" title="puppet_classes::cd_nagios::params (puppet_class)">cd_nagios::params</a></span></dd>
</dl>
<dl>
<dt>Defined in:</dt>
<dd>
manifests/main/install.pp
</dd>
</dl>
</div>
<h2>Summary</h2>
Class manage all aspects of installing binaries required for
cd_nagios
<h2>Overview</h2>
<div class="docstring">
<div class="discussion">
<p>cd_nagios::main::install.pp
Module name: cd_nagios
Author: Arne Teuke
(arne_teuke@ConfDroid.com)</p>
<h1 id="label-License%3A">License:</h1>
<p>This file is part of cd_nagios.</p>
<p>cd_nagios is used for providing automatic configuration of Nagios.
Copyright (C) 2016 ConfDroid (copyright@ConfDroid.com)
This program is
free software: you can redistribute it and/or modify
it under the terms of
the GNU General Public License as published by
the Free Software
Foundation, either version 3 of the License, or
(at your option) any later
version.</p>
<p>This program is distributed in the hope that it will be useful,
but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License
for more details.</p>
<p>You should have received a copy of the GNU General Public License
along
with this program. If not, see <a
href="http://www.gnu.org/licenses">www.gnu.org/licenses</a>/.</p>
</div>
</div>
<div class="tags">
</div><div class="method_details_list">
<table class="source_code">
<tr>
<td>
<pre class="lines">
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'manifests/main/install.pp', line 24</span>
class cd_nagios::main::install (
) inherits cd_nagios::params {
require cd_resources
# if our FQDN matches the configured Nagios server FQDN, install both server-
# and client packages.
if $::fqdn == $ng_nagios_server {
# we&#39;ll need httpd installed
require cd_apache
package {$reqpackages_server:
ensure =&gt; $pkg_ensure,
}
package {$reqpackages_client:
ensure =&gt; $pkg_ensure,
}
# install NRPE if enabled
if $ng_include_nrpe == true {
package {$reqpackages_nrpe:
ensure =&gt; $pkg_ensure,
}
}
}
# if we are not the nagios server, install client packages
if $::fqdn != $ng_nagios_server {
package {$reqpackages_client:
ensure =&gt; $pkg_ensure,
}
# if we want o use NRPE, install it
if $ng_include_nrpe == true {
package {$reqpackages_nrpe:
ensure =&gt; $pkg_ensure,
}
}
}
}</pre>
</td>
</tr>
</table>
</div>
</div>
<div id="footer">
Generated on Thu Jul 20 15:47:43 2017 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.9 (ruby-2.0.0).
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,210 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Puppet Class: cd_nagios::main::user
&mdash; Documentation by YARD 0.9.9
</title>
<link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
<link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
<script type="text/javascript" charset="utf-8">
pathId = "puppet_classes::cd_nagios::main::user";
relpath = '../';
</script>
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
</head>
<body>
<div class="nav_wrap">
<iframe id="nav" src="../puppet_class_list.html?1"></iframe>
<div id="resizer"></div>
</div>
<div id="main" tabindex="-1">
<div id="header">
<div id="menu">
<a href="../_index.html">Index (c)</a> &raquo;
<span class='title'><span class='object_link'>Puppet Classes</span></span>
&raquo;
<span class="title">cd_nagios::main::user</span>
</div>
<div id="search">
<a class="full_list_link" id="puppet_class_list_link"
href="../puppet_class_list.html">
<svg width="24" height="24">
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
</svg>
</a>
</div>
<div class="clear"></div>
</div>
<div id="content"><h1>Puppet Class: cd_nagios::main::user</h1>
<div class="box_info">
<dl>
<dt>Inherits:</dt>
<dd><span class='object_link'><a href="cd_nagios_3A_3Aparams.html" title="puppet_classes::cd_nagios::params (puppet_class)">cd_nagios::params</a></span></dd>
</dl>
<dl>
<dt>Defined in:</dt>
<dd>
manifests/main/user.pp
</dd>
</dl>
</div>
<h2>Summary</h2>
Class manages service users for cd_nagios.
<h2>Overview</h2>
<div class="docstring">
<div class="discussion">
<p>cd_nagios::main::user.pp
Module name: cd_nagios
Author: Arne Teuke
(arne_teuke@ConfDroid.com)</p>
<h1 id="label-License%3A">License:</h1>
<p>This file is part of cd_nagios.</p>
<p>cd_nagios is used for providing automatic configuration of Nagios
Copyright (C) 2016 ConfDroid (copyright@ConfDroid.com)
This program is
free software: you can redistribute it and/or modify
it under the terms of
the GNU General Public License as published by
the Free Software
Foundation, either version 3 of the License, or
(at your option) any later
version.</p>
<p>This program is distributed in the hope that it will be useful,
but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License
for more details.</p>
<p>You should have received a copy of the GNU General Public License
along
with this program. If not, see <a
href="http://www.gnu.org/licenses">www.gnu.org/licenses</a>/.</p>
</div>
</div>
<div class="tags">
</div><div class="method_details_list">
<table class="source_code">
<tr>
<td>
<pre class="lines">
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'manifests/main/user.pp', line 23</span>
class cd_nagios::main::user (
) inherits cd_nagios::params {
if $::fqdn == $ng_nagios_server {
require cd_nagios::main::install
group { $ng_user:
ensure =&gt; present,
name =&gt; $ng_user,
gid =&gt; $ng_u_uid,
allowdupe =&gt; false,
}
user { $ng_user:
ensure =&gt; present,
name =&gt; $ng_user,
allowdupe =&gt; false,
comment =&gt; $ng_u_comment,
uid =&gt; $ng_u_uid,
gid =&gt; $ng_user,
groups =&gt; $ng_u_groups,
managehome =&gt; true,
home =&gt; $ng_user_home,
shell =&gt; $ng_user_shell,
require =&gt; Group[$ng_user],
}
}
}</pre>
</td>
</tr>
</table>
</div>
</div>
<div id="footer">
Generated on Thu Jul 20 15:47:43 2017 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.9 (ruby-2.0.0).
</div>
</div>
</body>
</html>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,199 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Puppet Class: cd_nagios::selinux::config
&mdash; Documentation by YARD 0.9.9
</title>
<link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
<link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
<script type="text/javascript" charset="utf-8">
pathId = "puppet_classes::cd_nagios::selinux::config";
relpath = '../';
</script>
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
</head>
<body>
<div class="nav_wrap">
<iframe id="nav" src="../puppet_class_list.html?1"></iframe>
<div id="resizer"></div>
</div>
<div id="main" tabindex="-1">
<div id="header">
<div id="menu">
<a href="../_index.html">Index (c)</a> &raquo;
<span class='title'><span class='object_link'>Puppet Classes</span></span>
&raquo;
<span class="title">cd_nagios::selinux::config</span>
</div>
<div id="search">
<a class="full_list_link" id="puppet_class_list_link"
href="../puppet_class_list.html">
<svg width="24" height="24">
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
</svg>
</a>
</div>
<div class="clear"></div>
</div>
<div id="content"><h1>Puppet Class: cd_nagios::selinux::config</h1>
<div class="box_info">
<dl>
<dt>Inherits:</dt>
<dd><span class='object_link'><a href="cd_nagios_3A_3Aparams.html" title="puppet_classes::cd_nagios::params (puppet_class)">cd_nagios::params</a></span></dd>
</dl>
<dl>
<dt>Defined in:</dt>
<dd>
manifests/selinux/config.pp
</dd>
</dl>
</div>
<h2>Summary</h2>
Class manages all aspects of configuring the module logic for
cd_nagios.
<h2>Overview</h2>
<div class="docstring">
<div class="discussion">
<p>cd_nagios::selinux::config.pp
Module name: cd_nagios
Author: Arne Teuke
(arne_teuke@ConfDroid.com)</p>
<h1 id="label-License%3A">License:</h1>
<p>This file is part of cd_nagios.</p>
<p>cd_nagios is used for providing automatic configuration of Nagios
Copyright (C) 2016 ConfDroid (copyright@ConfDroid.com)
This program is
free software: you can redistribute it and/or modify
it under the terms of
the GNU General Public License as published by
the Free Software
Foundation, either version 3 of the License, or
(at your option) any later
version.</p>
<p>This program is distributed in the hope that it will be useful,
but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License
for more details.</p>
<p>You should have received a copy of the GNU General Public License
along
with this program. If not, see <a
href="http://www.gnu.org/licenses">www.gnu.org/licenses</a>/.</p>
</div>
</div>
<div class="tags">
</div><div class="method_details_list">
<table class="source_code">
<tr>
<td>
<pre class="lines">
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'manifests/selinux/config.pp', line 24</span>
class cd_nagios::selinux::config (
) inherits cd_nagios::params {
if $ng_use_selinux_tools == true {
# sealert 093d6a07-03f5-4457-abaa-e6592fb01e05
exec { &#39;create_policy_taccgi&#39;:
command =&gt; template($ng_taccgi_erb),
path =&gt; [&#39;/usr/bin&#39;,&#39;/usr/sbin&#39;],
cwd =&gt; &#39;/tmp&#39;,
creates =&gt; &#39;/tmp/my-taccgi&#39;,
notify =&gt; Exec[&#39;semodule_taccgi&#39;],
}
exec { &#39;semodule_taccgi&#39;:
command =&gt; &#39;semodule -i my-taccgi.pp&#39;,
path =&gt; [&#39;/usr/bin&#39;,&#39;/usr/sbin&#39;],
cwd =&gt; &#39;/tmp&#39;,
require =&gt; Exec[&#39;create_policy_taccgi&#39;],
refreshonly =&gt; true,
}
}
}</pre>
</td>
</tr>
</table>
</div>
</div>
<div id="footer">
Generated on Thu Jul 20 15:47:43 2017 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.9 (ruby-2.0.0).
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,215 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Puppet Class: cd_nagios::server::access_rules
&mdash; Documentation by YARD 0.9.9
</title>
<link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
<link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
<script type="text/javascript" charset="utf-8">
pathId = "puppet_classes::cd_nagios::server::access_rules";
relpath = '../';
</script>
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
</head>
<body>
<div class="nav_wrap">
<iframe id="nav" src="../puppet_class_list.html?1"></iframe>
<div id="resizer"></div>
</div>
<div id="main" tabindex="-1">
<div id="header">
<div id="menu">
<a href="../_index.html">Index (c)</a> &raquo;
<span class='title'><span class='object_link'>Puppet Classes</span></span>
&raquo;
<span class="title">cd_nagios::server::access_rules</span>
</div>
<div id="search">
<a class="full_list_link" id="puppet_class_list_link"
href="../puppet_class_list.html">
<svg width="24" height="24">
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
</svg>
</a>
</div>
<div class="clear"></div>
</div>
<div id="content"><h1>Puppet Class: cd_nagios::server::access_rules</h1>
<div class="box_info">
<dl>
<dt>Inherits:</dt>
<dd><span class='object_link'><a href="cd_nagios_3A_3Aparams.html" title="puppet_classes::cd_nagios::params (puppet_class)">cd_nagios::params</a></span></dd>
</dl>
<dl>
<dt>Defined in:</dt>
<dd>
manifests/server/access_rules.pp
</dd>
</dl>
</div>
<h2>Summary</h2>
Class manages presennce of /etc/nagios/phtpasswd file.
<h2>Overview</h2>
<div class="docstring">
<div class="discussion">
<p>cd_nagios::server::access_rules.pp
Module name: cd_nagios
Author: Arne
Teuke (arne_teuke@ConfDroid.com)</p>
<h1 id="label-License%3A">License:</h1>
<p>This file is part of cd_nagios.</p>
<p>cd_nagios is used for providing automatic configuration of Nagios
Copyright (C) 2016 ConfDroid (copyright@ConfDroid.com)
This program is
free software: you can redistribute it and/or modify
it under the terms of
the GNU General Public License as published by
the Free Software
Foundation, either version 3 of the License, or
(at your option) any later
version.</p>
<p>This program is distributed in the hope that it will be useful,
but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License
for more details.</p>
<p>You should have received a copy of the GNU General Public License
along
with this program. If not, see <a
href="http://www.gnu.org/licenses">www.gnu.org/licenses</a>/.</p>
</div>
</div>
<div class="tags">
<div class="examples">
<p class="tag_title">Examples:</p>
<pre class="example code"><code>cd_nagios::server::access { &#39;example&#39;:
ng_htpasswd_user =&gt; &#39;example_user&#39;,
ng_htpasswd_password =&gt; &#39;example_password_encrypted&#39;,
}</code></pre>
</div>
</div><div class="method_details_list">
<table class="source_code">
<tr>
<td>
<pre class="lines">
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'manifests/server/access_rules.pp', line 28</span>
class cd_nagios::server::access_rules (
) inherits cd_nagios::params {
if $::fqdn == $ng_nagios_server {
# manage /etc/nagios/htpasswd file
concat { $ng_htpasswd_file:
ensure =&gt; present,
path =&gt; $ng_htpasswd_file,
owner =&gt; &#39;root&#39;,
group =&gt; &#39;apache&#39;,
mode =&gt; &#39;0640&#39;,
selrange =&gt; s0,
selrole =&gt; object_r,
seltype =&gt; nagios_etc_t,
seluser =&gt; system_u,
}
concat::fragment { &#39;create_header&#39;:
target =&gt; $ng_htpasswd_file,
content =&gt; template($ng_htpasswd_head),
notify =&gt; Service[$ng_service],
}
}
}</pre>
</td>
</tr>
</table>
</div>
</div>
<div id="footer">
Generated on Thu Jul 20 15:47:43 2017 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.9 (ruby-2.0.0).
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,206 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Puppet Class: cd_nagios::server::files
&mdash; Documentation by YARD 0.9.9
</title>
<link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
<link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
<script type="text/javascript" charset="utf-8">
pathId = "puppet_classes::cd_nagios::server::files";
relpath = '../';
</script>
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
</head>
<body>
<div class="nav_wrap">
<iframe id="nav" src="../puppet_class_list.html?1"></iframe>
<div id="resizer"></div>
</div>
<div id="main" tabindex="-1">
<div id="header">
<div id="menu">
<a href="../_index.html">Index (c)</a> &raquo;
<span class='title'><span class='object_link'>Puppet Classes</span></span>
&raquo;
<span class="title">cd_nagios::server::files</span>
</div>
<div id="search">
<a class="full_list_link" id="puppet_class_list_link"
href="../puppet_class_list.html">
<svg width="24" height="24">
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
</svg>
</a>
</div>
<div class="clear"></div>
</div>
<div id="content"><h1>Puppet Class: cd_nagios::server::files</h1>
<div class="box_info">
<dl>
<dt>Inherits:</dt>
<dd><span class='object_link'><a href="cd_nagios_3A_3Aparams.html" title="puppet_classes::cd_nagios::params (puppet_class)">cd_nagios::params</a></span></dd>
</dl>
<dl>
<dt>Defined in:</dt>
<dd>
manifests/server/files.pp
</dd>
</dl>
</div>
<h2>Summary</h2>
Class manages all configuration files required for cd_nagios.
<h2>Overview</h2>
<div class="docstring">
<div class="discussion">
<p>cd_nagios::server::files.pp
Module name: cd_nagios
Author: Arne Teuke
(arne_teuke@ConfDroid.com)</p>
<h1 id="label-License%3A">License:</h1>
<p>This file is part of cd_nagios.</p>
<p>cd_nagios is used for providing automatic configuration of Nagios
Copyright (C) 2016 ConfDroid (copyright@ConfDroid.com)
This program is
free software: you can redistribute it and/or modify
it under the terms of
the GNU General Public License as published by
the Free Software
Foundation, either version 3 of the License, or
(at your option) any later
version.</p>
<p>This program is distributed in the hope that it will be useful,
but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License
for more details.</p>
<p>You should have received a copy of the GNU General Public License
along
with this program. If not, see <a
href="http://www.gnu.org/licenses">www.gnu.org/licenses</a>/.</p>
</div>
</div>
<div class="tags">
</div><div class="method_details_list">
<table class="source_code">
<tr>
<td>
<pre class="lines">
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'manifests/server/files.pp', line 23</span>
class cd_nagios::server::files (
) inherits cd_nagios::params {
if $::fqdn == $ng_nagios_server {
require cd_nagios::main::dirs
# manage nagios.cfg
# manage cgi.cfg
file { $ng_cgi_cfg_file:
ensure =&gt; file,
path =&gt; $ng_cgi_cfg_file,
owner =&gt; &#39;root&#39;,
group =&gt; &#39;root&#39;,
mode =&gt; &#39;0644&#39;,
selrange =&gt; s0,
selrole =&gt; object_r,
seltype =&gt; nagios_etc_t,
seluser =&gt; system_u,
content =&gt; template($ng_cgi_cfg_erb),
notify =&gt; Service[$ng_service],
}
}
}</pre>
</td>
</tr>
</table>
</div>
</div>
<div id="footer">
Generated on Thu Jul 20 15:47:43 2017 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.9 (ruby-2.0.0).
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,184 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Puppet Class: cd_nagios::server::service
&mdash; Documentation by YARD 0.9.9
</title>
<link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
<link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
<script type="text/javascript" charset="utf-8">
pathId = "puppet_classes::cd_nagios::server::service";
relpath = '../';
</script>
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
</head>
<body>
<div class="nav_wrap">
<iframe id="nav" src="../puppet_class_list.html?1"></iframe>
<div id="resizer"></div>
</div>
<div id="main" tabindex="-1">
<div id="header">
<div id="menu">
<a href="../_index.html">Index (c)</a> &raquo;
<span class='title'><span class='object_link'>Puppet Classes</span></span>
&raquo;
<span class="title">cd_nagios::server::service</span>
</div>
<div id="search">
<a class="full_list_link" id="puppet_class_list_link"
href="../puppet_class_list.html">
<svg width="24" height="24">
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
</svg>
</a>
</div>
<div class="clear"></div>
</div>
<div id="content"><h1>Puppet Class: cd_nagios::server::service</h1>
<div class="box_info">
<dl>
<dt>Inherits:</dt>
<dd><span class='object_link'><a href="cd_nagios_3A_3Aparams.html" title="puppet_classes::cd_nagios::params (puppet_class)">cd_nagios::params</a></span></dd>
</dl>
<dl>
<dt>Defined in:</dt>
<dd>
manifests/server/service.pp
</dd>
</dl>
</div>
<h2>Summary</h2>
Class manages the service(s) for cd_nagios.
<h2>Overview</h2>
<div class="docstring">
<div class="discussion">
<p>cd_nagios::server::service.pp
Module name: cd_nagios
Author: Arne Teuke
(arne_teuke@ConfDroid.com)</p>
<h1 id="label-License%3A">License:</h1>
<p>This file is part of cd_nagios.</p>
<p>cd_nagios is used for providing automatic configuration of Nagios
Copyright (C) 2016 ConfDroid (copyright@ConfDroid.com)
This program is
free software: you can redistribute it and/or modify
it under the terms of
the GNU General Public License as published by
the Free Software
Foundation, either version 3 of the License, or
(at your option) any later
version.</p>
<p>This program is distributed in the hope that it will be useful,
but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License
for more details.</p>
<p>You should have received a copy of the GNU General Public License
along
with this program. If not, see <a
href="http://www.gnu.org/licenses">www.gnu.org/licenses</a>/.</p>
</div>
</div>
<div class="tags">
</div><div class="method_details_list">
<table class="source_code">
<tr>
<td>
<pre class="lines">
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'manifests/server/service.pp', line 23</span>
class cd_nagios::server::service (
) inherits cd_nagios::params {
if $::fqdn == $ng_nagios_server {
require cd_nagios::server::files
require cd_nagios::server::access_rules
service { $ng_service:
ensure =&gt; running,
hasstatus =&gt; true,
hasrestart =&gt; true,
enable =&gt; true,
}
}
}</pre>
</td>
</tr>
</table>
</div>
</div>
<div id="footer">
Generated on Thu Jul 20 15:47:43 2017 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.9 (ruby-2.0.0).
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,54 @@
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta charset="utf-8" />
<link rel="stylesheet" href="css/full_list.css" type="text/css" media="screen" charset="utf-8" />
<link rel="stylesheet" href="css/common.css" type="text/css" media="screen" charset="utf-8" />
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="js/full_list.js"></script>
<title>Defined Type List</title>
<base id="base_target" target="_parent" />
</head>
<body>
<div id="content">
<div class="fixed_header">
<h1 id="full_list_header">Defined Type List</h1>
<div id="full_list_nav">
<span><a target="_self" href="puppet_class_list.html">
Puppet Classes
</a></span>
<span><a target="_self" href="puppet_defined_type_list.html">
Defined Types
</a></span>
</div>
<div id="search">Search: <input type="text" /></div>
</div>
<ul id="full_list" class="puppet_defined_type">
<li id="object_puppet_defined_types::cd_nagios::server::access" class="odd">
<div class="item">
<span class='object_link'><a href="puppet_defined_types/cd_nagios_3A_3Aserver_3A_3Aaccess.html" title="puppet_defined_types::cd_nagios::server::access (puppet_defined_type)">cd_nagios::server::access</a></span>
</div>
</li>
</ul>
</div>
</body>
</html>

View File

@@ -0,0 +1,211 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Defined Type: cd_nagios::server::access
&mdash; Documentation by YARD 0.9.9
</title>
<link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
<link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
<script type="text/javascript" charset="utf-8">
pathId = "puppet_defined_types::cd_nagios::server::access";
relpath = '../';
</script>
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
</head>
<body>
<div class="nav_wrap">
<iframe id="nav" src="../puppet_defined_type_list.html?1"></iframe>
<div id="resizer"></div>
</div>
<div id="main" tabindex="-1">
<div id="header">
<div id="menu">
<a href="../_index.html">Index (c)</a> &raquo;
<span class='title'><span class='object_link'>Defined Types</span></span>
&raquo;
<span class="title">cd_nagios::server::access</span>
</div>
<div id="search">
<a class="full_list_link" id="puppet_class_list_link"
href="../puppet_class_list.html">
<svg width="24" height="24">
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
</svg>
</a>
</div>
<div class="clear"></div>
</div>
<div id="content"><h1>Defined Type: cd_nagios::server::access</h1>
<div class="box_info">
<dl>
<dt>Defined in:</dt>
<dd>
manifests/server/access.pp
</dd>
</dl>
</div>
<h2>Summary</h2>
Define manages user- and password rules for accessing nagios.
<h2>Overview</h2>
<div class="docstring">
<div class="discussion">
<p>cd_nagios::server::access.pp
Module name: cd_nagios
Author: Arne Teuke
(arne_teuke@ConfDroid.com)</p>
<h1 id="label-License%3A">License:</h1>
<p>This file is part of cd_nagios.</p>
<p>cd_nagios is used for providing automatic configuration of Nagios
Copyright (C) 2016 ConfDroid (copyright@ConfDroid.com)
This program is
free software: you can redistribute it and/or modify
it under the terms of
the GNU General Public License as published by
the Free Software
Foundation, either version 3 of the License, or
(at your option) any later
version.</p>
<p>This program is distributed in the hope that it will be useful,
but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License
for more details.</p>
<p>You should have received a copy of the GNU General Public License
along
with this program. If not, see <a
href="http://www.gnu.org/licenses">www.gnu.org/licenses</a>/.</p>
</div>
</div>
<div class="tags">
<p class="tag_title">Parameters:</p>
<ul class="param">
<li>
<span class='name'>ng_htpasswd_user</span>
<span class='type'>(<tt>Any</tt>)</span>
<em class="default">(defaults to: <tt>undef</tt>)</em>
</li>
<li>
<span class='name'>ng_htpasswd_password</span>
<span class='type'>(<tt>Any</tt>)</span>
<em class="default">(defaults to: <tt>undef</tt>)</em>
</li>
</ul>
</div><div class="method_details_list">
<table class="source_code">
<tr>
<td>
<pre class="lines">
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41</pre>
</td>
<td>
<pre class="code"><span class="info file"># File 'manifests/server/access.pp', line 23</span>
define cd_nagios::server::access (
$ng_htpasswd_user = undef,
$ng_htpasswd_password = undef,
) {
$ng_htpasswd_file = $::cd_nagios::params::ng_htpasswd_file
$ng_htpasswd_rule = $::cd_nagios::params::ng_htpasswd_rule
$ng_service = $::cd_nagios::params::ng_service
# create password rules
concat::fragment { $name:
target =&gt; $ng_htpasswd_file,
content =&gt; template($ng_htpasswd_rule),
notify =&gt; Service[$ng_service],
}
}</pre>
</td>
</tr>
</table>
</div>
</div>
<div id="footer">
Generated on Thu Jul 20 15:47:43 2017 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.9 (ruby-2.0.0).
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,100 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Top Level Namespace
&mdash; Documentation by YARD 0.9.9
</title>
<link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
<link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
<script type="text/javascript" charset="utf-8">
pathId = "";
relpath = '';
</script>
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
</head>
<body>
<div class="nav_wrap">
<iframe id="nav" src="puppet_class_list.html?1"></iframe>
<div id="resizer"></div>
</div>
<div id="main" tabindex="-1">
<div id="header">
<div id="menu">
<a href="_index.html">Index</a> &raquo;
<span class="title">Top Level Namespace</span>
</div>
<div id="search">
<a class="full_list_link" id="puppet_class_list_link"
href="puppet_class_list.html">
<svg width="24" height="24">
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
</svg>
</a>
</div>
<div class="clear"></div>
</div>
<div id="content"><h1>Top Level Namespace
</h1>
<div class="box_info">
</div>
</div>
<div id="footer">
Generated on Thu Jul 20 15:47:41 2017 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.9 (ruby-2.0.0).
</div>
</div>
</body>
</html>

137
manifests/client/target.pp Normal file
View File

@@ -0,0 +1,137 @@
## cd_nagios::client::target.pp
# Module name: nagios
# Author: Arne Teuke (arne_teuke@ConfDroid.com)
# License:
# This file is part of nagios.
#
# nagios is used for providing automatic configuration of Nagios targets.
# Copyright (C) 2016 ConfDroid (copyright@ConfDroid.com)
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# @summary CLass manages Nagios targets for cd_nagios.
###############################################################################
class cd_nagios::client::target (
) inherits cd_nagios::params {
if $::fqdn != $ng_nagios_server {
@@nagios_host { $::fqdn:
ensure => $ng_ping_ensure,
alias => $::hostname,
address => $::fqdn,
use => 'linux-server',
target => $ng_target_host,
hostgroups => 'linux-servers',
contacts => 'ops',
max_check_attempts => $max_check_attempts,
notification_period => '24x7',
owner => 'nagios',
group => 'nagios',
mode => '0664',
check_command => "check_ping!${ng_ping_warn}!${ng_ping_crit}",
notify => Service ['nagios'],
}
@@nagios_service { "root_partition_${::hostname}":
ensure => $ng_disk_ensure,
check_command => "check_nrpe!check_disk!${ng_disk_warn}!${ng_disk_crit}!/",
use => 'generic-service',
host_name => $::fqdn,
contacts => 'ops',
notification_period => '24x7',
service_description => "${::hostname}_root_partition",
servicegroups => 'linux-services',
target => $ng_target_service,
owner => 'nagios',
group => 'nagios',
mode => '0664',
}
@@nagios_service { "Swap_Usage_${::hostname}":
ensure => $ng_swap_ensure,
check_command => "check_nrpe!check_swap!${ng_swap_warn}!${ng_swap_crit}",
use => 'generic-service',
host_name => $::fqdn,
contacts => 'ops',
notification_period => '24x7',
service_description => "${::hostname}_swap_usage",
servicegroups => 'linux-services',
target => $ng_target_service,
owner => 'nagios',
group => 'nagios',
mode => '0664',
}
@@nagios_service { "Local_Users_${::hostname}":
ensure => $ng_users_ensure,
check_command => "check_nrpe!check_users!${ng_users_warn}!${ng_users_crit}",
use => 'generic-service',
host_name => $::fqdn,
contacts => 'ops',
notification_period => '24x7',
service_description => "${::hostname}_local_users",
servicegroups => 'linux-services',
target => $ng_target_service,
owner => 'nagios',
group => 'nagios',
mode => '0664',
}
@@nagios_service { "Total Processes_${::hostname}":
ensure => $ng_procs_tot_ens,
check_command => "check_nrpe!check_procs!${ng_procs_tot_warn}!${ng_procs_tot_crit}!${ng_procs_tot_param}",
use => 'generic-service',
host_name => $::fqdn,
contacts => 'ops',
notification_period => '24x7',
service_description => "${::hostname}_total_processes",
servicegroups => 'linux-services',
target => $ng_target_service,
owner => 'nagios',
group => 'nagios',
mode => '0664',
}
@@nagios_service { "Zombie Processes_${::hostname}":
ensure => $ng_procs_z_ensure,
check_command => "check_nrpe!check_procs!${ng_procs_z_warn}!${ng_procs_z_crit}!${ng_procs_z_param}",
use => 'generic-service',
host_name => $::fqdn,
contacts => 'ops',
notification_period => '24x7',
service_description => "${::hostname}_zombie_processes",
servicegroups => 'linux-services',
target => $ng_target_service,
owner => 'nagios',
group => 'nagios',
mode => '0664',
}
@@nagios_service { "Current_Load_${::hostname}":
ensure => $ng_load_ensure,
check_command => "check_nrpe!check_load!${ng_load_warn}!${ng_load_crit}",
use => 'generic-service',
host_name => $::fqdn,
contacts => 'ops',
notification_period => '24x7',
service_description => "${::hostname}_current_load",
servicegroups => 'linux-services',
target => $ng_target_service,
owner => 'nagios',
group => 'nagios',
mode => '0664',
}
}
}

View File

@@ -0,0 +1,57 @@
## cd_nagios::firewall::iptables.pp
# Module name: cd_nagios
# Author: Arne Teuke (arne_teuke@ConfDroid.com)
# License:
# This file is part of cd_nagios.
#
# cd_nagios is used for providing automatic configuration of
# <service / purpose>
# Copyright (C) 2017 ConfDroid (copyright@ConfDroid.com)
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# @summary manage firewall settings through cd_firewall or puppetlabs-firewall
###############################################################################
class cd_nagios::firewall::iptables (
) inherits cd_nagios::params {
if $::fqdn == $ng_nagios_server {
if $ng_use_https != true {
firewall { "${ng_fw_order}${ng_http_port} port ${ng_http_port}":
proto => ['tcp','udp'],
dport => $ng_http_port,
action => 'accept',
}
}
if $ng_use_https == true {
firewall { "${ng_fw_order}${ng_https_port} port ${ng_https_port}":
proto => ['tcp','udp'],
dport => $ng_https_port,
action => 'accept',
}
if $ng_http_https_fw == true {
firewall { "${ng_fw_order}${ng_http_port} port ${ng_http_port}":
proto => ['tcp','udp'],
dport => $ng_http_port,
action => 'accept',
}
}
}
}
}

25
manifests/init.pp Normal file
View File

@@ -0,0 +1,25 @@
## cd_nagios::init.pp
# Module name: cd_nagios
# Author: Arne Teuke (arne_teuke@confdroid.com)
# License:
# This file is part of cd_nagios.
#
# cd_nagios is used for providing automatic configuration of Nagios
# Copyright (C) 2017 confdroid (copyright@confdroid.com)
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# @summary Class initialises the cd_nagios Module.
##############################################################################
class cd_nagios {
include cd_nagios::params
}

46
manifests/main/config.pp Normal file
View File

@@ -0,0 +1,46 @@
## cd_nagios::main::config.pp
# Module name: cd_nagios
# Author: Arne Teuke (arne_teuke@ConfDroid.com)
# # License:
# This file is part of cd_nagios.
#
# cd_nagios is used for providing automatic configuration of Nagios
# Copyright (C) 2016 ConfDroid (copyright@ConfDroid.com)
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# @summary Class manages all aspects of configuring the module logic for
# cd_nagios.
##############################################################################
class cd_nagios::main::config (
) inherits cd_nagios::params {
# manage server configuration
if $::fqdn == $ng_nagios_server {
include cd_nagios::server::service
if $ng_include_fw == true {
include cd_nagios::firewall::iptables
}
if $ng_use_selinux_tools == true {
include cd_nagios::selinux::config
}
}
if $::fqdn != $ng_nagios_server {
include cd_nagios::client::target
}
}

186
manifests/main/dirs.pp Normal file
View File

@@ -0,0 +1,186 @@
## cd_nagios::main::dirs.pp
# Module name: cd_nagios
# Author: Arne Teuke (arne_teuke@ConfDroid.com)
# # License:
# This file is part of cd_nagios.
#
# cd_nagios is used for providing automatic configuration of Nagios.
# Copyright (C) 2016 ConfDroid (copyright@ConfDroid.com)
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# @summary Class manages all directories required for cd_nagios.
###############################################################################
class cd_nagios::main::dirs (
) inherits cd_nagios::params {
require cd_nagios::main::user
# main directory
file { $ng_main_dir:
ensure => directory,
path => $ng_main_dir,
owner => 'root',
group => 'root',
mode => '0755',
selrange => s0,
selrole => object_r,
seltype => nagios_etc_t,
seluser => system_u,
}
# /usr/lib64/nagios dir required for plugins
file { $ng_lib_dir:
ensure => directory,
path => $ng_lib_dir,
owner => 'root',
group => 'root',
mode => '0755',
selrange => s0,
selrole => object_r,
seltype => lib_t,
seluser => system_u,
}
# /var/spool/nagios
file { $ng_spool_dir:
ensure => directory,
path => $ng_spool_dir,
owner => $ng_user,
group => $ng_user,
mode => '0755',
selrange => s0,
selrole => object_r,
seltype => nagios_spool_t,
seluser => system_u,
}
if $::fqdn == $ng_nagios_server {
# /etc/nagios/conf.d
file { $ng_conf_d_dir:
ensure => directory,
path => $ng_conf_d_dir,
owner => 'root',
group => $ng_user,
mode => '0750',
selrange => s0,
selrole => object_r,
seltype => nagios_etc_t,
seluser => system_u,
}
# /etc/nagios/objects
file { $ng_objects_dir:
ensure => directory,
path => $ng_objects_dir,
owner => 'root',
group => $ng_user,
mode => '0750',
selrange => s0,
selrole => object_r,
seltype => nagios_etc_t,
seluser => system_u,
}
# /etc/nagios/private
file { $ng_private_dir:
ensure => directory,
path => $ng_private_dir,
owner => 'root',
group => $ng_user,
mode => '0750',
selrange => s0,
selrole => object_r,
seltype => nagios_etc_t,
seluser => system_u,
}
# include dir
file { $ng_usr_incl:
ensure => directory,
path => $ng_usr_incl,
owner => 'root',
group => 'root',
mode => '0755',
selrange => s0,
selrole => object_r,
seltype => usr_t,
seluser => system_u,
}
# log dir
file { $ng_log_dir:
ensure => directory,
path => $ng_log_dir,
owner => $ng_user,
group => $ng_user,
mode => '0750',
selrange => s0,
selrole => object_r,
seltype => nagios_log_t,
seluser => system_u,
}
# log archives
file { $ng_log_archives:
ensure => directory,
path => $ng_log_archives,
owner => $ng_user,
group => $ng_user,
mode => '0750',
selrange => s0,
selrole => object_r,
seltype => nagios_log_t,
seluser => system_u,
}
# /usr/share/nagios
file { $ng_usr_share:
ensure => directory,
path => $ng_usr_share,
owner => 'root',
group => 'root',
mode => '0755',
selrange => s0,
selrole => object_r,
seltype => usr_t,
seluser => system_u,
}
# /usr/share/nagios/html
file { $ng_share_html:
ensure => directory,
path => $ng_share_html,
owner => 'root',
group => 'root',
mode => '0755',
selrange => s0,
selrole => object_r,
seltype => usr_t,
seluser => system_u,
}
}
}

70
manifests/main/install.pp Normal file
View File

@@ -0,0 +1,70 @@
## cd_nagios::main::install.pp
# Module name: cd_nagios
# Author: Arne Teuke (arne_teuke@ConfDroid.com)
# # License:
# This file is part of cd_nagios.
#
# cd_nagios is used for providing automatic configuration of Nagios.
# Copyright (C) 2016 ConfDroid (copyright@ConfDroid.com)
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# @summary Class manage all aspects of installing binaries required for
# cd_nagios
###############################################################################
class cd_nagios::main::install (
) inherits cd_nagios::params {
require cd_resources
# if our FQDN matches the configured Nagios server FQDN, install both server-
# and client packages.
if $::fqdn == $ng_nagios_server {
# we'll need httpd installed
require cd_apache
package {$reqpackages_server:
ensure => $pkg_ensure,
}
package {$reqpackages_client:
ensure => $pkg_ensure,
}
# install NRPE if enabled
if $ng_include_nrpe == true {
package {$reqpackages_nrpe:
ensure => $pkg_ensure,
}
}
}
# if we are not the nagios server, install client packages
if $::fqdn != $ng_nagios_server {
package {$reqpackages_client:
ensure => $pkg_ensure,
}
# if we want o use NRPE, install it
if $ng_include_nrpe == true {
package {$reqpackages_nrpe:
ensure => $pkg_ensure,
}
}
}
}

52
manifests/main/user.pp Normal file
View File

@@ -0,0 +1,52 @@
## cd_nagios::main::user.pp
# Module name: cd_nagios
# Author: Arne Teuke (arne_teuke@ConfDroid.com)
# # License:
# This file is part of cd_nagios.
#
# cd_nagios is used for providing automatic configuration of Nagios
# Copyright (C) 2016 ConfDroid (copyright@ConfDroid.com)
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# @summary Class manages service users for cd_nagios.
#############################################################################
class cd_nagios::main::user (
) inherits cd_nagios::params {
if $::fqdn == $ng_nagios_server {
require cd_nagios::main::install
group { $ng_user:
ensure => present,
name => $ng_user,
gid => $ng_u_uid,
allowdupe => false,
}
user { $ng_user:
ensure => present,
name => $ng_user,
allowdupe => false,
comment => $ng_u_comment,
uid => $ng_u_uid,
gid => $ng_user,
groups => $ng_u_groups,
managehome => true,
home => $ng_user_home,
shell => $ng_user_shell,
require => Group[$ng_user],
}
}
}

347
manifests/params.pp Normal file
View File

@@ -0,0 +1,347 @@
## cd_nagios::params.pp
# Module name: cd_nagios
# Author: Arne Teuke (arne_teuke@ConfDroid.com)
# # License:
# This file is part of cd_nagios.
#
# cd_nagios is used for providing automatic configuration of Nagios.
# Copyright (C) 2016 ConfDroid (copyright@ConfDroid.com)
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# @summary Class holds all parameters for the cd_nagios module and is
# inherited by all classes except defines.
# @see https://confdroid.com/2017/07/nagios-cgi-cfg/
# @param [string] pkg_ensure
# which [package type](https://confdroid.com/2017/05/puppet-type-package/)
# to choose, i.e. `latest` or `present`.
# @param [string] ng_nagios_server Specify the FQDN of the nagios server host.
# Must be a proper A-name, no CNAME i.e. on Loadbalancers. When the FQDN
# matches the configured value, Nagios server components will be installed
# and the clients will allow to be connected by that host. Impacts also
# firewall ports (optional).
# @param [string] ng_nagios_ext_ip Specify the IP address of the
# nagios server. Required for NRPE configuration to allow the Nagios server
# to connect to NRPE, which as of now does not trust DNS names. Must be the
# public interface in case of NAT environments.
# @param [boolean] ng_include_nrpe Whether to include NRPE to allow
# Nagios to connect to clients
# @param [string] ng_ping_warn Default value for ping warning check. Can be
# overridden on host level.
# @param [string] ng_ping_crit Default value for ping critical check. Can be
# overridden on host level.
# @param [boolean] ng_ping_ensure Wheter to include or exclude the check.
# Can be overridden on host level.
# @param [string] ng_disk_warn Default value for disk space warning check.
# Can be overridden on host level.
# @param [string] ng_disk_crit Default value for disk space critical check
# Can be overridden on host level.
# @param [boolean] ng_disk_ensure Whether to include or exclude the check.
# Can be overridden on host level.
# @param [string] ng_swap_warn Default value for swap space warning check.
# Can be overridden on host level.
# @param [string] ng_swap_crit Default value for swap space critical check.
# Can be overridden on host level.
# @param [boolean] ng_swap_ensure Whether to include or exclude the check.
# Can be overridden on host level.
# @param [string] ng_users_warn Default value for user logins warning check.
# Can be overridden on host level.
# @param [string] ng_users_crit Default value for user logins critical check
# Can be overridden on host level.
# @param [boolean] ng_users_ensure Whether to include or exclude the check.
# Can be overridden on host level.
# @param [string] ng_procs_tot_warn Default warning for the total processes
# warning check. Can be overridden on host level.
# @param [string] ng_procs_tot_crit Default warning for the total processes
# critical check. Can be overridden on host level.
# @param [string] ng_procs_tot_param Default value for the process flags to be
# checked. Can be overridden on host level.
# @param [boolean] ng_procs_tot_ens Whether to include or exclude the check.
# Can be overridden on host level.
# @param [string] ng_procs_z_warn Default value for the zombie processes
# warning check. Can be overridden on host level.
# @param [string] ng_procs_z_crit Default value for the zombie processess
# critical check. Can be overridden on host level.
# @param [string] ng_procs_z_param Default value for the zombie processes flag.
# Can be overridden on host level.
# @param [boolean] ng_procs_z_ensure Whether to include or exclude the check.
# Can be overridden on host level.
# @param [string] ng_load_warn Default value for the load warning check.
# Can be overridden on host level.
# @param [string] ng_load_crit Default value for the load critical check.
# Can be overridden on host level.
# @param [boolean] ng_load_ensure Whether to include or exclude the load check.
# Can be overridden on host level.
# @param [boolean] ng_include_fw Whether to include firewall management.
# requires cd_firewall or puppetlabs-firewall module.
# @param [string] ng_fw_order Prefix for the port number to establish proper
# firewall rule ordering.
# @param [boolean] ng_use_https Whether to use https.
# @param [boolean] ng_http_https_fw Whether we want to forward http to https.
# only active if `ng_use_https` is set to `true`.
# @param [string] ng_http_port Specify the port to use for httpd. Used in
# templates and for firewall (Optional)
# @param [string] ng_https_port Specify the port to use for httpd. Used in
# templates and for firewall (Optional)
# @param [string] ng_user The name of the Nagios service user.
# @param [string] ng_user_home The home directory for the Nagios service user
# @param [string] ng_user_shell The shell for the Nagios service user, which
# never should be allowed to login.
# @param [string] ng_u_comment The comment for the Nagios service user for
# /etc/passwd. Shows up in email notifocations from the Nagios daemon.
# @param [string] ng_u_uid The UID for the Nagios service user. Important when
# using shared environments like NFS.
# @param [string] ng_u_groups The secondary groups for the Nagios service user.
# Must not contain the primary group.
# @param [string] ng_context_help whether or not a context-sensitive
# help icon will be displayed for most of the CGIs.
# @param [string] ng_pending_state what states should be displayed in the web
# interface for hosts/services that have not yet been checked
# @param [string] ng_use_auth whether or not the CGIs will use any
# authentication when displaying host and service information, as
# well as committing commands to Nagios for processing. This should **__not__**
# be set to 0.
# @param [string] ng_use_ssl_auth allows you to use x509 cert (SSL)
# authentication in the CGIs. This is an advanced option and should
# not be enabled unless you know what you're doing.
# @param [boolean] ng_enable_def_user Whether to enable a default user
# (**__not recommended__**).
# @param [string] ng_def_user_name default user name that can
# access pages without authentication. This allows people within a
# secure domain (i.e., behind a firewall) to see the current status
# without authenticating. Only actuve if `ng_enable_def_user` is set to `true`
# @param [string] ng_nagios_admin Specify the name of a nagios administration
# user here. Value will be used in cgi.cfg for all authorized commands and info,
# i.e. nagiosadmin. however, its stronlgly suggested to use a different name.
# Can be overridden per host / hostgroups, so allows flexibility and increased
# security. You can also add a comma-separated list of people in here instead,
# which then would function like a group instead a single user.
# @param [string] ng_sysinfo_auth comma-delimited list of all usernames that
# have access to viewing the Nagios process information as
# provided by the Extended Information CGI (extinfo.cgi).
# @param [string] ng_confinfo_auth comma-delimited list of all usernames that
# can view ALL configuration information (hosts, commands, etc).
# @param [string] ng_command_auth comma-delimited list of all usernames that
# can issue shutdown and restart commands to Nagios via the
# command CGI (cmd.cgi).
# @param [string] ng_hostview_auth comma-delimited lists of all usernames that
# can view information for all hosts
# @param [string] ng_serviceview_auth comma-delimited lists of all usernames
# that can view information for all services.
# @param [string] ng_host_cmd_auth comma-delimited lists of all usernames that
# can issue host related commands.
# @param [string] ng_svc_cmd_auth comma-delimited lists of all usernames that
# can issue service related commands.
# @param [string] ng_readonly_auth comma-delimited list of usernames that have
# read-only rights in the CGIs.
# @param [string] ng_statusmap_img specify an image to be used as a
# background in the statusmap CGI.
# @param [boolean] ng_use_colormap Whether to set values of background colors.
# @param [string] ng_colormap_red value for the `red` area of the color map.
# @param [string] ng_colormap_green value for the `green` area of the color map
# @param [string] ng_colormap_blue value for the `blue` area of the color map.
# @param [string] ng_statusmap_layout Value for the default statusmap layout.
# @param [string] ng_wrl_layout Value for the default statuswrl layout.
# @param [boolean] ng_incl_own_wrl Whether to include your own objects in the
# generated VRML world.
# @param [string] ng_statuswrl_include Specify your own wrl object to be
# included in the generated VRML world. Only active if `ng_incl_own_wrl`
# is set to `true`.
# @param [string] ng_ping_syntax what syntax should be used when
# attempting to ping a host from the WAP interface
# @param [string] ng_refresh_rate specify the refresh rate in seconds
# of various CGIs
# @param [string] ng_result_limit specify the default number of results
# displayed on the status.cgi.
# @param [string] ng_escape_html whether HTML tags in host and service
# status output is escaped in the web interface. If enabled,
# your plugin output will not be able to contain clickable links.
# @param [boolean] ng_use_sound whether to enable sound usage.
# @param [string] ng_host_unreachable soundfile for `host unreachable`
# Only active if `ng_use_sound` is set to `true`.
# @param [string] ng_host_down soundfile for `host down`
# Only active if `ng_use_sound` is set to `true`.
# @param [string] ng_svc_critical soundfile for `service critical`.
# Only active if `ng_use_sound` is set to `true`.
# @param [string] ng_svc_warn soundfile for `service warning`
# Only active if `ng_use_sound` is set to `true`.
# @param [string] ng_svc_unknown soundfile for `service unknown`
# Only active if `ng_use_sound` is set to `true`.
# @param [string] ng_normal_sound soundfile for `normal`
# Only active if `ng_use_sound` is set to `true`.
# @param [string] ng_action_url_target Specify target frames in which
# action URLs will open
# @param [string] ng_notes_url_target Specify target frames in which
# notes URLs will open
# @param [string] ng_lock_author_names whether users can change the author
# name when submitting comments, scheduling downtime.
# @param [boolean] ng_enable_splunk Whether to enable splunk integration.
# @param [string] ng_splunk_url the URL for your Splunk URL
# @param [string] ng_navbar_addresses allow navbar search queries IP addresses
# @param [string] ng_navbar_aliases allow navbar search for aliases
# @param [string] ng_ack_no_sticky Enabling ack_no_sticky will default the
# "Sticky Acknowledgement" to be unchecked.
# @param [string] ng_ack_no_send Enabling ack_no_send will default the
# "Send Notification" to be unchecked.
# @param [boolean] ng_use_selinux_tools Whether to enable selinux tools and
# policies. only effective if selinux is enabled.
###############################################################################
class cd_nagios::params (
$pkg_ensure = 'latest',
$ng_nagios_server = "nagios.${::domain}",
$ng_nagios_ext_ip = undef,
$ng_include_nrpe = true,
# firewall
$ng_include_fw = true,
$ng_use_https = true,
$ng_http_https_fw = true,
$ng_fw_order = '50',
$ng_http_port = '80',
$ng_https_port = '443',
# check command parameters
## ping
$ng_ping_warn = '100.0,20%',
$ng_ping_crit = '500.0,60%',
$ng_ping_ensure = 'present',
## disk
$ng_disk_warn = '20%',
$ng_disk_crit = '10%' ,
$ng_disk_ensure = 'present',
# swap
$ng_swap_warn = '20',
$ng_swap_crit = '10',
$ng_swap_ensure = 'present',
# users
$ng_users_warn = '20',
$ng_users_crit = '50',
$ng_users_ensure = 'present',
#total procs
$ng_procs_tot_warn = '330',
$ng_procs_tot_crit = '400',
$ng_procs_tot_param = 'RDST',
$ng_procs_tot_ens = 'present',
# zombie procs
$ng_procs_z_warn = '10',
$ng_procs_z_crit = '30',
$ng_procs_z_param = 'Z',
$ng_procs_z_ensure = 'present',
# load
$ng_load_warn = '5.00,4.00,3.00',
$ng_load_crit = '10.00,6.00,4.00',
$ng_load_ensure = 'present',
# user settings
$ng_user = 'nagios',
$ng_u_comment = 'Nagios service user',
$ng_u_uid = '1004',
$ng_user_home = '/var/spool/nagios',
$ng_u_groups = undef,
$ng_user_shell = '/bin/bash',
# cgi settings
$ng_context_help = '1',
$ng_pending_state = '1',
$ng_use_auth = '1',
$ng_use_ssl_auth = '0',
$ng_enable_def_user = false,
$ng_def_user_name = 'nagios_insecure',
$ng_nagios_admin = 'nagios_sec_adm',
$ng_sysinfo_auth = '',
$ng_confinfo_auth = '',
$ng_command_auth = '',
$ng_hostview_auth = '',
$ng_serviceview_auth = '',
$ng_host_cmd_auth = '',
$ng_svc_cmd_auth = '',
$ng_readonly_auth = '' ,
$ng_statusmap_img = 'smbackground.gd2',
$ng_use_colormap = false,
$ng_colormap_red = '255',
$ng_colormap_green = '255',
$ng_colormap_blue = '255',
$ng_statusmap_layout = '6',
$ng_wrl_layout = '4',
$ng_incl_own_wrl = false,
$ng_statuswrl_include = '',
$ng_ping_syntax = '/bin/ping -n -U -c 5 $HOSTADDRESS$',
$ng_refresh_rate = '90',
$ng_result_limit = '100',
$ng_escape_html = '1',
$ng_use_sound = false,
$ng_host_unreachable = 'hostdown.wav',
$ng_host_down = 'hostdown.wav',
$ng_svc_critical = 'critical.wav',
$ng_svc_warn = 'warning.wav',
$ng_svc_unknown = 'warning.wav',
$ng_normal_sound = 'noproblem.wav',
$ng_action_url_target = '_blank',
$ng_notes_url_target = '_blank',
$ng_lock_author_names = '1',
$ng_enable_splunk = false,
$ng_splunk_url = 'http://127.0.0.1:8000/',
$ng_navbar_addresses = '1',
$ng_navbar_aliases = '1',
$ng_ack_no_sticky = '0',
$ng_ack_no_send = '0',
# selinux
$ng_use_selinux_tools = true,
) {
# installation section
$reqpackages_server = $::operatingsystem ? {
/(?i-mx:centos|fedora|redhat)/ => ['nagios','nagios-devel']
}
$reqpackages_client = $::operatingsystem ? {
/(?i-mx:centos|fedora|redhat)/ => ['net-snmp-utils','nagios-plugins','nagios-plugins-all', 'nagios-plugins-nrpe', 'nagios-common']
}
$reqpackages_nrpe = $::operatingsystem ? {
/(?i-mx:centos|fedora|redhat)/ => ['nrpe']
}
# service
$ng_service = 'nagios'
# directories
$ng_main_dir = '/etc/nagios'
$ng_conf_d_dir = "${ng_main_dir}/conf.d"
$ng_objects_dir = "${ng_main_dir}/objects"
$ng_private_dir = "${ng_main_dir}/private"
$ng_usr_incl = '/usr/include/nagios'
$ng_lib_dir = '/usr/lib64/nagios'
$ng_log_dir = '/var/log/nagios'
$ng_log_archives = "${ng_log_dir}/archives"
$ng_spool_dir = '/var/spool/nagios'
$ng_usr_share = '/usr/share/nagios'
$ng_share_html = "${ng_usr_share}/html"
# files
$ng_main_config = "${ng_main_dir}/nagios.cfg"
$ng_cgi_cfg_file = "${ng_main_dir}/cgi.cfg"
$ng_cgi_cfg_erb = 'cd_nagios/nagios/cgi_cfg.erb'
$ng_htpasswd_file = "${ng_main_dir}/passwd"
$ng_htpasswd_head = 'cd_nagios/nagios/htpasswd_head.erb'
$ng_htpasswd_rule = 'cd_nagios/nagios/htpasswd_rule.erb'
$ng_taccgi_erb = 'cd_nagios/selinux/taccgi.erb'
# includes must be last
include cd_nagios::main::config
}

View File

@@ -0,0 +1,47 @@
## cd_nagios::selinux::config.pp
# Module name: cd_nagios
# Author: Arne Teuke (arne_teuke@ConfDroid.com)
# # License:
# This file is part of cd_nagios.
#
# cd_nagios is used for providing automatic configuration of Nagios
# Copyright (C) 2016 ConfDroid (copyright@ConfDroid.com)
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# @summary Class manages all aspects of configuring the module logic for
# cd_nagios.
##############################################################################
class cd_nagios::selinux::config (
) inherits cd_nagios::params {
if $ng_use_selinux_tools == true {
# sealert 093d6a07-03f5-4457-abaa-e6592fb01e05
exec { 'create_policy_taccgi':
command => template($ng_taccgi_erb),
path => ['/usr/bin','/usr/sbin'],
cwd => '/tmp',
creates => '/tmp/my-taccgi',
notify => Exec['semodule_taccgi'],
}
exec { 'semodule_taccgi':
command => 'semodule -i my-taccgi.pp',
path => ['/usr/bin','/usr/sbin'],
cwd => '/tmp',
require => Exec['create_policy_taccgi'],
refreshonly => true,
}
}
}

View File

@@ -0,0 +1,41 @@
## cd_nagios::server::access.pp
# Module name: cd_nagios
# Author: Arne Teuke (arne_teuke@ConfDroid.com)
# # License:
# This file is part of cd_nagios.
#
# cd_nagios is used for providing automatic configuration of Nagios
# Copyright (C) 2016 ConfDroid (copyright@ConfDroid.com)
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# @summary Define manages user- and password rules for accessing nagios.
##############################################################################
define cd_nagios::server::access (
$ng_htpasswd_user = undef,
$ng_htpasswd_password = undef,
) {
$ng_htpasswd_file = $::cd_nagios::params::ng_htpasswd_file
$ng_htpasswd_rule = $::cd_nagios::params::ng_htpasswd_rule
$ng_service = $::cd_nagios::params::ng_service
# create password rules
concat::fragment { $name:
target => $ng_htpasswd_file,
content => template($ng_htpasswd_rule),
notify => Service[$ng_service],
}
}

View File

@@ -0,0 +1,54 @@
## cd_nagios::server::access_rules.pp
# Module name: cd_nagios
# Author: Arne Teuke (arne_teuke@ConfDroid.com)
# # License:
# This file is part of cd_nagios.
#
# cd_nagios is used for providing automatic configuration of Nagios
# Copyright (C) 2016 ConfDroid (copyright@ConfDroid.com)
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# @summary Class manages presennce of /etc/nagios/phtpasswd file.
# @example
# cd_nagios::server::access { 'example':
# ng_htpasswd_user => 'example_user',
# ng_htpasswd_password => 'example_password_encrypted',
# }
##############################################################################
class cd_nagios::server::access_rules (
) inherits cd_nagios::params {
if $::fqdn == $ng_nagios_server {
# manage /etc/nagios/htpasswd file
concat { $ng_htpasswd_file:
ensure => present,
path => $ng_htpasswd_file,
owner => 'root',
group => 'apache',
mode => '0640',
selrange => s0,
selrole => object_r,
seltype => nagios_etc_t,
seluser => system_u,
}
concat::fragment { 'create_header':
target => $ng_htpasswd_file,
content => template($ng_htpasswd_head),
notify => Service[$ng_service],
}
}
}

50
manifests/server/files.pp Normal file
View File

@@ -0,0 +1,50 @@
## cd_nagios::server::files.pp
# Module name: cd_nagios
# Author: Arne Teuke (arne_teuke@ConfDroid.com)
# # License:
# This file is part of cd_nagios.
#
# cd_nagios is used for providing automatic configuration of Nagios
# Copyright (C) 2016 ConfDroid (copyright@ConfDroid.com)
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# @summary Class manages all configuration files required for cd_nagios.
##############################################################################
class cd_nagios::server::files (
) inherits cd_nagios::params {
if $::fqdn == $ng_nagios_server {
require cd_nagios::main::dirs
# manage nagios.cfg
# manage cgi.cfg
file { $ng_cgi_cfg_file:
ensure => file,
path => $ng_cgi_cfg_file,
owner => 'root',
group => 'root',
mode => '0644',
selrange => s0,
selrole => object_r,
seltype => nagios_etc_t,
seluser => system_u,
content => template($ng_cgi_cfg_erb),
notify => Service[$ng_service],
}
}
}

View File

@@ -0,0 +1,39 @@
## cd_nagios::server::service.pp
# Module name: cd_nagios
# Author: Arne Teuke (arne_teuke@ConfDroid.com)
# # License:
# This file is part of cd_nagios.
#
# cd_nagios is used for providing automatic configuration of Nagios
# Copyright (C) 2016 ConfDroid (copyright@ConfDroid.com)
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# @summary Class manages the service(s) for cd_nagios.
#############################################################################
class cd_nagios::server::service (
) inherits cd_nagios::params {
if $::fqdn == $ng_nagios_server {
require cd_nagios::server::files
require cd_nagios::server::access_rules
service { $ng_service:
ensure => running,
hasstatus => true,
hasrestart => true,
enable => true,
}
}
}

View File

@@ -0,0 +1,93 @@
###############################################################################
########## parameterized cgi.cfg created by Puppet ##########
########## manual changes will be overwritten !!! ##########
###############################################################################
########## full reference original file is available at ##########
########## https://confdroid.com/2017/07/nagios-cgi-cfg/ ##########
###############################################################################
main_config_file=<%= @ng_main_config %>
physical_html_path=<%= @ng_share_html %>
url_html_path=/nagios
show_context_help=<%= @ng_context_help %>
use_pending_states=<%= @ng_pending_state %>
use_authentication=<%= @ng_use_auth %>
use_ssl_authentication=<%= @ng_use_ssl_auth %>
<% if @ng_enable_def_user == true -%>
default_user_name=<%= @ng_def_user_name %>
<% else -%>
#default_user_name=guest
<% end -%>
authorized_for_system_information=<%= @ng_nagios_admin %>,<%= @ng_sysinfo_auth %>
authorized_for_configuration_information=<%= @ng_nagios_admin %>,<%= @ng_confinfo_auth %>
authorized_for_system_commands=<%= @ng_nagios_admin %>,<%= @ng_command_auth %>
authorized_for_all_services=<%= @ng_nagios_admin %>,<%= @ng_serviceview_auth %>
authorized_for_all_hosts=<%= @ng_nagios_admin %>,<%= @ng_hostview_auth %>
authorized_for_all_service_commands=<%= @ng_nagios_admin %>,<%= @ng_svc_cmd_auth %>
authorized_for_all_host_commands=<%= @ng_nagios_admin %>,<%= @ng_host_cmd_auth %>
authorized_for_read_only=<%= @ng_readonly_auth %>
statusmap_background_image=<%= @ng_statusmap_img %>
<% if @ng_use_colormap == true -%>
color_transparency_index_r=<%= @ng_colormap_red %>
color_transparency_index_g=<%= @ng_colormap_green %>
color_transparency_index_b=<%= @ng_colormap_blue %>
<% else -%>
#color_transparency_index_r=255
#color_transparency_index_g=255
#color_transparency_index_b=255
<% end -%>
default_statusmap_layout=<%= @ng_statusmap_layout%>
default_statuswrl_layout=<%= @ng_wrl_layout %>
<% if @ng_incl_own_wrl == true -%>
statuswrl_include=<%= @ng_statuswrl_include %>
<% else -%>
#statuswrl_include=myworld.wrl
<% end -%>
ping_syntax=<%= @ng_ping_syntax %>
refresh_rate=<%= @ng_refresh_rate %>
result_limit=1<%= @ng_result_limit %>
escape_html_tags=<%= @ng_escape_html %>
<% if @ng_use_sound == true -%>
host_unreachable_sound=<%= @ng_host_unreachable %>
host_down_sound=<%= @ng_host_down %>
service_critical_sound=<%= @ng_svc_critical %>
service_warning_sound=<%= @ng_svc_warn %>
service_unknown_sound=<%= @ng_svc_unknown %>
normal_sound=<%= @ng_normal_sound %>
<% else -%>
#host_unreachable_sound=hostdown.wav
#host_down_sound=hostdown.wav
#service_critical_sound=critical.wav
#service_warning_sound=warning.wav
#service_unknown_sound=warning.wav
#normal_sound=noproblem.wav
<% end -%>
action_url_target=<%= @ng_action_url_target %>
notes_url_target=<%= @ng_notes_url_target %>
lock_author_names=<%= @ng_lock_author_names %>
<% if @ng_enable_splunk -%>
enable_splunk_integration=1
splunk_url=<%= @ng_splunk_url %>
<% else -%>
enable_splunk_integration=0
#splunk_url=http://127.0.0.1:8000/
<% end -%>
navbar_search_for_addresses=<%= @ng_navbar_addresses %>
navbar_search_for_aliases=<%= @ng_navbar_aliases %>
ack_no_sticky=<%= @ng_ack_no_sticky %>
ack_no_send=<%= @ng_ack_no_send %>

View File

View File

@@ -0,0 +1 @@
<%= @ng_htpasswd_user %>:<%= @ng_htpasswd_password %>

View File

@@ -0,0 +1 @@
ausearch -c 'tac.cgi' --raw | audit2allow -M my-taccgi

7
tests/UTF_Files Normal file
View File

@@ -0,0 +1,7 @@
./.yardoc/object_types: data
./.yardoc/proxy_types: Applesoft BASIC program data
./.yardoc/complete: empty
./.yardoc/objects/root.dat: data
./doc/css/style.css: HTML document, UTF-8 Unicode text, with very long lines
./doc/js/jquery.js: HTML document, UTF-8 Unicode text, with very long lines
./templates/nagios/htpasswd_head.erb: empty