cloud-mu 2.1.0beta → 3.0.0beta

Sign up to get free protection for your applications and to get access to all the features.
Files changed (291) hide show
  1. checksums.yaml +5 -5
  2. data/Berksfile +4 -5
  3. data/Berksfile.lock +179 -0
  4. data/README.md +1 -6
  5. data/ansible/roles/geerlingguy.firewall/templates/firewall.bash.j2 +0 -0
  6. data/ansible/roles/mu-installer/README.md +33 -0
  7. data/ansible/roles/mu-installer/defaults/main.yml +2 -0
  8. data/ansible/roles/mu-installer/handlers/main.yml +2 -0
  9. data/ansible/roles/mu-installer/meta/main.yml +60 -0
  10. data/ansible/roles/mu-installer/tasks/main.yml +13 -0
  11. data/ansible/roles/mu-installer/tests/inventory +2 -0
  12. data/ansible/roles/mu-installer/tests/test.yml +5 -0
  13. data/ansible/roles/mu-installer/vars/main.yml +2 -0
  14. data/bin/mu-adopt +125 -0
  15. data/bin/mu-aws-setup +4 -4
  16. data/bin/mu-azure-setup +265 -0
  17. data/bin/mu-azure-tests +43 -0
  18. data/bin/mu-cleanup +20 -8
  19. data/bin/mu-configure +224 -98
  20. data/bin/mu-deploy +8 -3
  21. data/bin/mu-gcp-setup +16 -8
  22. data/bin/mu-gen-docs +92 -8
  23. data/bin/mu-load-config.rb +52 -12
  24. data/bin/mu-momma-cat +36 -0
  25. data/bin/mu-node-manage +34 -27
  26. data/bin/mu-self-update +2 -2
  27. data/bin/mu-ssh +12 -8
  28. data/bin/mu-upload-chef-artifacts +11 -4
  29. data/bin/mu-user-manage +3 -0
  30. data/cloud-mu.gemspec +8 -11
  31. data/cookbooks/firewall/libraries/helpers_iptables.rb +2 -2
  32. data/cookbooks/firewall/metadata.json +1 -1
  33. data/cookbooks/firewall/recipes/default.rb +5 -9
  34. data/cookbooks/mu-firewall/attributes/default.rb +2 -0
  35. data/cookbooks/mu-firewall/metadata.rb +1 -1
  36. data/cookbooks/mu-glusterfs/templates/default/mu-gluster-client.erb +0 -0
  37. data/cookbooks/mu-master/Berksfile +2 -2
  38. data/cookbooks/mu-master/files/default/check_mem.pl +0 -0
  39. data/cookbooks/mu-master/files/default/cloudamatic.png +0 -0
  40. data/cookbooks/mu-master/metadata.rb +5 -4
  41. data/cookbooks/mu-master/recipes/389ds.rb +1 -1
  42. data/cookbooks/mu-master/recipes/basepackages.rb +30 -10
  43. data/cookbooks/mu-master/recipes/default.rb +59 -7
  44. data/cookbooks/mu-master/recipes/firewall-holes.rb +1 -1
  45. data/cookbooks/mu-master/recipes/init.rb +65 -47
  46. data/cookbooks/mu-master/recipes/{eks-kubectl.rb → kubectl.rb} +4 -10
  47. data/cookbooks/mu-master/recipes/sssd.rb +2 -1
  48. data/cookbooks/mu-master/recipes/update_nagios_only.rb +6 -6
  49. data/cookbooks/mu-master/templates/default/web_app.conf.erb +2 -2
  50. data/cookbooks/mu-master/templates/mods/ldap.conf.erb +4 -0
  51. data/cookbooks/mu-php54/Berksfile +1 -2
  52. data/cookbooks/mu-php54/metadata.rb +4 -5
  53. data/cookbooks/mu-php54/recipes/default.rb +1 -1
  54. data/cookbooks/mu-splunk/templates/default/splunk-init.erb +0 -0
  55. data/cookbooks/mu-tools/Berksfile +3 -2
  56. data/cookbooks/mu-tools/files/default/Mu_CA.pem +33 -0
  57. data/cookbooks/mu-tools/libraries/helper.rb +20 -8
  58. data/cookbooks/mu-tools/metadata.rb +5 -2
  59. data/cookbooks/mu-tools/recipes/apply_security.rb +2 -3
  60. data/cookbooks/mu-tools/recipes/eks.rb +1 -1
  61. data/cookbooks/mu-tools/recipes/gcloud.rb +5 -30
  62. data/cookbooks/mu-tools/recipes/nagios.rb +1 -1
  63. data/cookbooks/mu-tools/recipes/rsyslog.rb +1 -0
  64. data/cookbooks/mu-tools/recipes/selinux.rb +19 -0
  65. data/cookbooks/mu-tools/recipes/split_var_partitions.rb +0 -1
  66. data/cookbooks/mu-tools/recipes/windows-client.rb +256 -122
  67. data/cookbooks/mu-tools/resources/disk.rb +3 -1
  68. data/cookbooks/mu-tools/templates/amazon/sshd_config.erb +1 -1
  69. data/cookbooks/mu-tools/templates/default/etc_hosts.erb +1 -1
  70. data/cookbooks/mu-tools/templates/default/{kubeconfig.erb → kubeconfig-eks.erb} +0 -0
  71. data/cookbooks/mu-tools/templates/default/kubeconfig-gke.erb +27 -0
  72. data/cookbooks/mu-tools/templates/windows-10/sshd_config.erb +137 -0
  73. data/cookbooks/mu-utility/recipes/nat.rb +4 -0
  74. data/extras/alpha.png +0 -0
  75. data/extras/beta.png +0 -0
  76. data/extras/clean-stock-amis +2 -2
  77. data/extras/generate-stock-images +131 -0
  78. data/extras/git-fix-permissions-hook +0 -0
  79. data/extras/image-generators/AWS/centos6.yaml +17 -0
  80. data/extras/image-generators/{aws → AWS}/centos7-govcloud.yaml +0 -0
  81. data/extras/image-generators/{aws → AWS}/centos7.yaml +0 -0
  82. data/extras/image-generators/{aws → AWS}/rhel7.yaml +0 -0
  83. data/extras/image-generators/{aws → AWS}/win2k12.yaml +0 -0
  84. data/extras/image-generators/{aws → AWS}/win2k16.yaml +0 -0
  85. data/extras/image-generators/{aws → AWS}/windows.yaml +0 -0
  86. data/extras/image-generators/{gcp → Google}/centos6.yaml +1 -0
  87. data/extras/image-generators/Google/centos7.yaml +18 -0
  88. data/extras/python_rpm/build.sh +0 -0
  89. data/extras/release.png +0 -0
  90. data/extras/ruby_rpm/build.sh +0 -0
  91. data/extras/ruby_rpm/muby.spec +1 -1
  92. data/install/README.md +43 -5
  93. data/install/deprecated-bash-library.sh +0 -0
  94. data/install/installer +1 -1
  95. data/install/jenkinskeys.rb +0 -0
  96. data/install/mu-master.yaml +55 -0
  97. data/modules/mommacat.ru +41 -7
  98. data/modules/mu.rb +444 -149
  99. data/modules/mu/adoption.rb +500 -0
  100. data/modules/mu/cleanup.rb +235 -158
  101. data/modules/mu/cloud.rb +675 -138
  102. data/modules/mu/clouds/aws.rb +156 -24
  103. data/modules/mu/clouds/aws/alarm.rb +4 -14
  104. data/modules/mu/clouds/aws/bucket.rb +60 -18
  105. data/modules/mu/clouds/aws/cache_cluster.rb +8 -20
  106. data/modules/mu/clouds/aws/collection.rb +12 -22
  107. data/modules/mu/clouds/aws/container_cluster.rb +209 -118
  108. data/modules/mu/clouds/aws/database.rb +120 -45
  109. data/modules/mu/clouds/aws/dnszone.rb +7 -18
  110. data/modules/mu/clouds/aws/endpoint.rb +5 -15
  111. data/modules/mu/clouds/aws/firewall_rule.rb +144 -72
  112. data/modules/mu/clouds/aws/folder.rb +4 -11
  113. data/modules/mu/clouds/aws/function.rb +6 -16
  114. data/modules/mu/clouds/aws/group.rb +4 -12
  115. data/modules/mu/clouds/aws/habitat.rb +11 -13
  116. data/modules/mu/clouds/aws/loadbalancer.rb +40 -28
  117. data/modules/mu/clouds/aws/log.rb +5 -13
  118. data/modules/mu/clouds/aws/msg_queue.rb +9 -24
  119. data/modules/mu/clouds/aws/nosqldb.rb +4 -12
  120. data/modules/mu/clouds/aws/notifier.rb +6 -13
  121. data/modules/mu/clouds/aws/role.rb +69 -40
  122. data/modules/mu/clouds/aws/search_domain.rb +17 -20
  123. data/modules/mu/clouds/aws/server.rb +184 -94
  124. data/modules/mu/clouds/aws/server_pool.rb +33 -38
  125. data/modules/mu/clouds/aws/storage_pool.rb +5 -12
  126. data/modules/mu/clouds/aws/user.rb +59 -33
  127. data/modules/mu/clouds/aws/userdata/linux.erb +18 -30
  128. data/modules/mu/clouds/aws/userdata/windows.erb +9 -9
  129. data/modules/mu/clouds/aws/vpc.rb +214 -145
  130. data/modules/mu/clouds/azure.rb +978 -44
  131. data/modules/mu/clouds/azure/container_cluster.rb +413 -0
  132. data/modules/mu/clouds/azure/firewall_rule.rb +500 -0
  133. data/modules/mu/clouds/azure/habitat.rb +167 -0
  134. data/modules/mu/clouds/azure/loadbalancer.rb +205 -0
  135. data/modules/mu/clouds/azure/role.rb +211 -0
  136. data/modules/mu/clouds/azure/server.rb +810 -0
  137. data/modules/mu/clouds/azure/user.rb +257 -0
  138. data/modules/mu/clouds/azure/userdata/README.md +4 -0
  139. data/modules/mu/clouds/azure/userdata/linux.erb +137 -0
  140. data/modules/mu/clouds/azure/userdata/windows.erb +275 -0
  141. data/modules/mu/clouds/azure/vpc.rb +782 -0
  142. data/modules/mu/clouds/cloudformation.rb +12 -9
  143. data/modules/mu/clouds/cloudformation/firewall_rule.rb +5 -13
  144. data/modules/mu/clouds/cloudformation/server.rb +10 -1
  145. data/modules/mu/clouds/cloudformation/server_pool.rb +1 -0
  146. data/modules/mu/clouds/cloudformation/vpc.rb +0 -2
  147. data/modules/mu/clouds/google.rb +554 -117
  148. data/modules/mu/clouds/google/bucket.rb +173 -32
  149. data/modules/mu/clouds/google/container_cluster.rb +1112 -157
  150. data/modules/mu/clouds/google/database.rb +24 -47
  151. data/modules/mu/clouds/google/firewall_rule.rb +344 -89
  152. data/modules/mu/clouds/google/folder.rb +156 -79
  153. data/modules/mu/clouds/google/group.rb +272 -82
  154. data/modules/mu/clouds/google/habitat.rb +177 -52
  155. data/modules/mu/clouds/google/loadbalancer.rb +9 -34
  156. data/modules/mu/clouds/google/role.rb +1211 -0
  157. data/modules/mu/clouds/google/server.rb +491 -227
  158. data/modules/mu/clouds/google/server_pool.rb +233 -48
  159. data/modules/mu/clouds/google/user.rb +479 -125
  160. data/modules/mu/clouds/google/userdata/linux.erb +3 -3
  161. data/modules/mu/clouds/google/userdata/windows.erb +9 -9
  162. data/modules/mu/clouds/google/vpc.rb +381 -223
  163. data/modules/mu/config.rb +689 -214
  164. data/modules/mu/config/bucket.rb +1 -1
  165. data/modules/mu/config/cache_cluster.rb +1 -1
  166. data/modules/mu/config/cache_cluster.yml +0 -4
  167. data/modules/mu/config/container_cluster.rb +18 -9
  168. data/modules/mu/config/database.rb +6 -23
  169. data/modules/mu/config/firewall_rule.rb +9 -15
  170. data/modules/mu/config/folder.rb +22 -21
  171. data/modules/mu/config/habitat.rb +22 -21
  172. data/modules/mu/config/loadbalancer.rb +2 -2
  173. data/modules/mu/config/role.rb +9 -40
  174. data/modules/mu/config/server.rb +26 -5
  175. data/modules/mu/config/server_pool.rb +1 -1
  176. data/modules/mu/config/storage_pool.rb +2 -2
  177. data/modules/mu/config/user.rb +4 -0
  178. data/modules/mu/config/vpc.rb +350 -110
  179. data/modules/mu/defaults/{amazon_images.yaml → AWS.yaml} +37 -39
  180. data/modules/mu/defaults/Azure.yaml +17 -0
  181. data/modules/mu/defaults/Google.yaml +24 -0
  182. data/modules/mu/defaults/README.md +1 -1
  183. data/modules/mu/deploy.rb +168 -125
  184. data/modules/mu/groomer.rb +2 -1
  185. data/modules/mu/groomers/ansible.rb +104 -32
  186. data/modules/mu/groomers/chef.rb +96 -44
  187. data/modules/mu/kittens.rb +20602 -0
  188. data/modules/mu/logger.rb +38 -11
  189. data/modules/mu/master.rb +90 -8
  190. data/modules/mu/master/chef.rb +2 -3
  191. data/modules/mu/master/ldap.rb +0 -1
  192. data/modules/mu/master/ssl.rb +250 -0
  193. data/modules/mu/mommacat.rb +917 -513
  194. data/modules/scratchpad.erb +1 -1
  195. data/modules/tests/super_complex_bok.yml +0 -0
  196. data/modules/tests/super_simple_bok.yml +0 -0
  197. data/roles/mu-master.json +2 -1
  198. data/spec/azure_creds +5 -0
  199. data/spec/mu.yaml +56 -0
  200. data/spec/mu/clouds/azure_spec.rb +164 -27
  201. data/spec/spec_helper.rb +5 -0
  202. data/test/clean_up.py +0 -0
  203. data/test/exec_inspec.py +0 -0
  204. data/test/exec_mu_install.py +0 -0
  205. data/test/exec_retry.py +0 -0
  206. data/test/smoke_test.rb +0 -0
  207. metadata +90 -118
  208. data/cookbooks/mu-jenkins/Berksfile +0 -14
  209. data/cookbooks/mu-jenkins/CHANGELOG.md +0 -13
  210. data/cookbooks/mu-jenkins/LICENSE +0 -37
  211. data/cookbooks/mu-jenkins/README.md +0 -105
  212. data/cookbooks/mu-jenkins/attributes/default.rb +0 -42
  213. data/cookbooks/mu-jenkins/files/default/cleanup_deploy_config.xml +0 -73
  214. data/cookbooks/mu-jenkins/files/default/deploy_config.xml +0 -44
  215. data/cookbooks/mu-jenkins/metadata.rb +0 -21
  216. data/cookbooks/mu-jenkins/recipes/default.rb +0 -195
  217. data/cookbooks/mu-jenkins/recipes/node-ssh-config.rb +0 -54
  218. data/cookbooks/mu-jenkins/recipes/public_key.rb +0 -24
  219. data/cookbooks/mu-jenkins/templates/default/example_job.config.xml.erb +0 -24
  220. data/cookbooks/mu-jenkins/templates/default/org.jvnet.hudson.plugins.SSHBuildWrapper.xml.erb +0 -14
  221. data/cookbooks/mu-jenkins/templates/default/ssh_config.erb +0 -6
  222. data/cookbooks/nagios/Berksfile +0 -11
  223. data/cookbooks/nagios/CHANGELOG.md +0 -589
  224. data/cookbooks/nagios/CONTRIBUTING.md +0 -11
  225. data/cookbooks/nagios/LICENSE +0 -37
  226. data/cookbooks/nagios/README.md +0 -328
  227. data/cookbooks/nagios/TESTING.md +0 -2
  228. data/cookbooks/nagios/attributes/config.rb +0 -171
  229. data/cookbooks/nagios/attributes/default.rb +0 -228
  230. data/cookbooks/nagios/chefignore +0 -102
  231. data/cookbooks/nagios/definitions/command.rb +0 -33
  232. data/cookbooks/nagios/definitions/contact.rb +0 -33
  233. data/cookbooks/nagios/definitions/contactgroup.rb +0 -33
  234. data/cookbooks/nagios/definitions/host.rb +0 -33
  235. data/cookbooks/nagios/definitions/hostdependency.rb +0 -33
  236. data/cookbooks/nagios/definitions/hostescalation.rb +0 -34
  237. data/cookbooks/nagios/definitions/hostgroup.rb +0 -33
  238. data/cookbooks/nagios/definitions/nagios_conf.rb +0 -38
  239. data/cookbooks/nagios/definitions/resource.rb +0 -33
  240. data/cookbooks/nagios/definitions/service.rb +0 -33
  241. data/cookbooks/nagios/definitions/servicedependency.rb +0 -33
  242. data/cookbooks/nagios/definitions/serviceescalation.rb +0 -34
  243. data/cookbooks/nagios/definitions/servicegroup.rb +0 -33
  244. data/cookbooks/nagios/definitions/timeperiod.rb +0 -33
  245. data/cookbooks/nagios/libraries/base.rb +0 -314
  246. data/cookbooks/nagios/libraries/command.rb +0 -91
  247. data/cookbooks/nagios/libraries/contact.rb +0 -230
  248. data/cookbooks/nagios/libraries/contactgroup.rb +0 -112
  249. data/cookbooks/nagios/libraries/custom_option.rb +0 -36
  250. data/cookbooks/nagios/libraries/data_bag_helper.rb +0 -23
  251. data/cookbooks/nagios/libraries/default.rb +0 -90
  252. data/cookbooks/nagios/libraries/host.rb +0 -412
  253. data/cookbooks/nagios/libraries/hostdependency.rb +0 -181
  254. data/cookbooks/nagios/libraries/hostescalation.rb +0 -173
  255. data/cookbooks/nagios/libraries/hostgroup.rb +0 -119
  256. data/cookbooks/nagios/libraries/nagios.rb +0 -282
  257. data/cookbooks/nagios/libraries/resource.rb +0 -59
  258. data/cookbooks/nagios/libraries/service.rb +0 -455
  259. data/cookbooks/nagios/libraries/servicedependency.rb +0 -215
  260. data/cookbooks/nagios/libraries/serviceescalation.rb +0 -195
  261. data/cookbooks/nagios/libraries/servicegroup.rb +0 -144
  262. data/cookbooks/nagios/libraries/timeperiod.rb +0 -160
  263. data/cookbooks/nagios/libraries/users_helper.rb +0 -54
  264. data/cookbooks/nagios/metadata.rb +0 -25
  265. data/cookbooks/nagios/recipes/_load_databag_config.rb +0 -153
  266. data/cookbooks/nagios/recipes/_load_default_config.rb +0 -241
  267. data/cookbooks/nagios/recipes/apache.rb +0 -48
  268. data/cookbooks/nagios/recipes/default.rb +0 -204
  269. data/cookbooks/nagios/recipes/nginx.rb +0 -82
  270. data/cookbooks/nagios/recipes/pagerduty.rb +0 -143
  271. data/cookbooks/nagios/recipes/server_package.rb +0 -40
  272. data/cookbooks/nagios/recipes/server_source.rb +0 -164
  273. data/cookbooks/nagios/templates/default/apache2.conf.erb +0 -96
  274. data/cookbooks/nagios/templates/default/cgi.cfg.erb +0 -266
  275. data/cookbooks/nagios/templates/default/commands.cfg.erb +0 -13
  276. data/cookbooks/nagios/templates/default/contacts.cfg.erb +0 -37
  277. data/cookbooks/nagios/templates/default/hostgroups.cfg.erb +0 -25
  278. data/cookbooks/nagios/templates/default/hosts.cfg.erb +0 -15
  279. data/cookbooks/nagios/templates/default/htpasswd.users.erb +0 -6
  280. data/cookbooks/nagios/templates/default/nagios.cfg.erb +0 -22
  281. data/cookbooks/nagios/templates/default/nginx.conf.erb +0 -62
  282. data/cookbooks/nagios/templates/default/pagerduty.cgi.erb +0 -185
  283. data/cookbooks/nagios/templates/default/resource.cfg.erb +0 -27
  284. data/cookbooks/nagios/templates/default/servicedependencies.cfg.erb +0 -15
  285. data/cookbooks/nagios/templates/default/servicegroups.cfg.erb +0 -14
  286. data/cookbooks/nagios/templates/default/services.cfg.erb +0 -14
  287. data/cookbooks/nagios/templates/default/templates.cfg.erb +0 -31
  288. data/cookbooks/nagios/templates/default/timeperiods.cfg.erb +0 -13
  289. data/extras/image-generators/aws/centos6.yaml +0 -18
  290. data/modules/mu/defaults/google_images.yaml +0 -16
  291. data/roles/mu-master-jenkins.json +0 -24
@@ -1,11 +0,0 @@
1
- If you would like to contribute, please open a pull request here on
2
- Github.
3
-
4
- Please do not modify the version number in the metadata.rb. Also please
5
- do not update the CHANGELOG.md. Not all changes to the cookbook may
6
- be merged and released in the same versions. I will handle the version
7
- updates during the release process.
8
-
9
- If your change adds new attributes, data bags, or other features
10
- please document how to use the change in the cookbook's README.md file.
11
- Otherwise no one will know how to use your work.
@@ -1,37 +0,0 @@
1
- Through accessing, reading, or utilizing this software in any manner whatsoever
2
- or through any means whatsoever, whether the access, reading or use is either
3
- solely looking at this software or this software has been integrated into any
4
- derivative work, the party accessing, reading, or utilizing the software
5
- directly or indirectly agrees to abide by the following license.
6
-
7
- The eGlobalTech Cloud Automation Platform is the Copyright (c) 2014 of Global
8
- Tech Inc. All rights reserved.
9
-
10
- Redistribution and use in source and binary forms, with or without
11
- modification, are permitted provided that the following conditions are met:
12
-
13
- 1. Redistributions of source code must retain the above copyright notice, this
14
- list of conditions and the following disclaimer.
15
-
16
- 2. Redistributions in binary form must reproduce the above copyright notice,
17
- this list of conditions and the following disclaimer in the documentation
18
- and/or other materials provided with the distribution.
19
-
20
- 3. Neither the name of the copyright holder nor the names of its contributors
21
- may be used to endorse or promote products derived from this software without
22
- specific prior written permission.
23
-
24
- Global Tech, Inc. is the co-owner of any derivative works created with this
25
- software.
26
-
27
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
28
- ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
29
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
30
- DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
31
- FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
32
- DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
33
- SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
34
- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
35
- OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
36
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37
-
@@ -1,328 +0,0 @@
1
- # nagios cookbook
2
-
3
- [![Join the chat at https://gitter.im/schubergphilis/nagios](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/schubergphilis/nagios?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Build Status](https://travis-ci.org/schubergphilis/nagios.svg)](https://travis-ci.org/schubergphilis/nagios) [![Cookbook Version](https://img.shields.io/cookbook/v/nagios.svg)](https://supermarket.chef.io/cookbooks/nagios)
4
-
5
- Installs and configures Nagios server. Chef nodes are automatically discovered using search, and Nagios host groups are created based on Chef roles and optionally environments as well.
6
-
7
- ## Requirements
8
-
9
- ### Chef
10
-
11
- Chef version 12.1+ is required
12
-
13
- Because of the heavy use of search, this recipe will not work with Chef Solo, as it cannot do any searches without a server.
14
-
15
- This cookbook relies heavily on multiple data bags. See **Data Bag** below.
16
-
17
- The system running this cookbooks should have a role named 'monitoring' so that NRPE clients can authorize monitoring from that system. This role name is configurable via an attribute. See **Attributes** below.
18
-
19
- The functionality that was previously in the nagios::client recipe has been moved to its own NRPE cookbook at <https://github.com/schubergphilis/nrpe>
20
-
21
- ### Platform
22
-
23
- - Debian 7+
24
- - Ubuntu 12.04+
25
- - Red Hat Enterprise Linux (CentOS/Amazon/Scientific/Oracle) 5.X, 6.X
26
-
27
- **Notes**: This cookbook has been tested on the listed platforms. It may work on other platforms with or without modification.
28
-
29
- ### Cookbooks
30
-
31
- - apache2 2.0 or greater
32
- - build-essential
33
- - chef_nginx
34
- - nginx_simplecgi
35
- - php
36
- - yum-epel
37
-
38
- ## Attributes
39
-
40
- ### config
41
-
42
- [The config file](https://github.com/schubergphilis/nagios/blob/master/attributes/config.rb) contains the Nagios configuration options. Consult the [nagios documentation](http://nagios.sourceforge.net/docs/3_0/configmain.html) for available settings and allowed options. Configuration entries of which multiple entries are allowed, need to be specified as an Array.
43
-
44
- Example: `default['nagios']['conf']['cfg_dir'] = [ '/etc/nagios/conf.d' , '/usr/local/nagios/conf.d' ]`
45
-
46
- ### default
47
- * `node['nagios']['user']` - Nagios user, default 'nagios'.
48
- * `node['nagios']['group']` - Nagios group, default 'nagios'.
49
- * `node['nagios']['plugin_dir']` - location where Nagios plugins go, default '/usr/lib/nagios/plugins'.
50
- * `node['nagios']['multi_environment_monitoring']` - Chef server will monitor hosts in all environments, not just its own, default 'false'
51
- * `node['nagios']['monitored_environments']` - If multi_environment_monitoring is 'true' nagios will monitor nodes in all environments. If monitored_environments is defined then nagios will monitor only hosts in the list of environments defined. For ex: ['prod', 'beta'] will monitor only hosts in 'prod' and 'beta' chef_environments. Defaults to '[]' - and all chef environments will be monitored by default.
52
- * `node['nagios']['monitoring_interface']` - If set, will use the specified interface for all nagios monitoring network traffic. Defaults to `nil`
53
- * `node['nagios']['exclude_tag_host']` - If set, hosts tagged with this value will be excluded from nagios monitoring. Defaults to ''
54
-
55
- * `node['nagios']['server']['install_method']` - whether to install from package or source. Default chosen by platform based on known packages available for Nagios: debian/ubuntu 'package', redhat/centos/fedora/scientific: source
56
- * `node['nagios']['server']['install_yum-epel']` - whether to install the EPEL repo or not (only applies to RHEL platform family). The default value is `true`. Set this to `false` if you do not wish to install the EPEL RPM; in this scenario you will need to make the relevant packages available via another method e.g. local repo, or install from source.
57
- * `node['nagios']['server']['service_name']` - name of the service used for Nagios, default chosen by platform, debian/ubuntu "nagios3", redhat family "nagios", all others, "nagios"
58
- * `node['nagios']['home']` - Nagios main home directory, default "/usr/lib/nagios3"
59
- * `node['nagios']['conf_dir']` - location where main Nagios config lives, default "/etc/nagios3"
60
- * `node['nagios']['resource_dir']` - location for recources, default "/etc/nagios3"
61
- * `node['nagios']['config_dir']` - location where included configuration files live, default "/etc/nagios3/conf.d"
62
- * `node['nagios']['log_dir']` - location of Nagios logs, default "/var/log/nagios3"
63
- * `node['nagios']['cache_dir']` - location of cached data, default "/var/cache/nagios3"
64
- * `node['nagios']['state_dir']` - Nagios runtime state information, default "/var/lib/nagios3"
65
- * `node['nagios']['run_dir']` - where pidfiles are stored, default "/var/run/nagios3"
66
- * `node['nagios']['docroot']` - Nagios webui docroot, default "/usr/share/nagios3/htdocs"
67
- * `node['nagios']['enable_ssl']` - boolean for whether Nagios web server should be https, default false
68
- * `node['nagios']['ssl_cert_file']` = Location of SSL Certificate File. default "/etc/nagios3/certificates/nagios-server.pem"
69
- * `node['nagios']['ssl_cert_chain_file']` = Optional location of SSL Intermediate Certificate File. No default.
70
- * `node['nagios']['ssl_cert_key']` = Location of SSL Certificate Key. default "/etc/nagios3/certificates/nagios-server.pem"
71
- * `node['nagios']['http_port']` - port that the Apache/Nginx virtual site should listen on, determined whether ssl is enabled (443 if so, otherwise 80). Note: You will also need to configure the listening port for either NGINX or Apache within those cookbooks.
72
- * `node['nagios']['server_name']` - common name to use in a server cert, default "nagios"
73
- * `node['nagios']['server']['server_alias']` - alias name for the webserver for use with Apache. Defaults to nil
74
- * `node['nagios']['ssl_req']` - info to use in a cert, default `/C=US/ST=Several/L=Locality/O=Example/OU=Operations/CN=#{node['nagios']['server_name']}/emailAddress=ops@#{node['nagios']['server_name']}`
75
-
76
- * `node['nagios']['server']['url']` - url to download the server source from if installing from source
77
- * `node['nagios']['server']['version']` - version of the server source to download
78
- * `node['nagios']['server']['checksum']` - checksum of the source files
79
- * `node['nagios']['server']['patch_url']` - url to download patches from if installing from source
80
- * `node['nagios']['server']['patches']` - array of patch filenames to apply if installing from source
81
- * `node['nagios']['url']` - URL to host Nagios from - defaults to nil and instead uses FQDN
82
-
83
- * `node['nagios']['conf']['enable_notifications']` - set to 1 to enable notification.
84
- * `node['nagios']['conf']['interval_length']` - minimum interval. Defaults to '1'.
85
- * `node['nagios']['conf']['use_timezone']` - set the timezone for nagios AND apache. Defaults to UTC.
86
-
87
- * `node['nagios']['check_external_commands']`
88
- * `node['nagios']['default_contact_groups']`
89
- * `node['nagios']['default_user_name']` - Specify a defaut guest user to allow page access without authentication. **Only** use this if nagios is running behind a secure webserver and users have been authenticated in some manner. You'll likely want to change `node['nagios']['server_auth_require']` to `all granted`. Defaults to `nil`.
90
- * `node['nagios']['sysadmin_email']` - default notification email.
91
- * `node['nagios']['sysadmin_sms_email']` - default notification sms.
92
- * `node['nagios']['server_auth_method']` - authentication with the server can be done with openid (using `apache2::mod_auth_openid`), cas (using `apache2::mod_auth_cas`),ldap (using `apache2::mod_authnz_ldap`), or htauth (basic). The default is htauth. "openid" will utilize openid authentication, "cas" will utilize cas authentication, "ldap" will utilize LDAP authentication, and any other value will use htauth (basic).
93
- * `node['nagios']['cas_login_url']` - login url for cas if using cas authentication.
94
- * `node['nagios']['cas_validate_url']` - validation url for cas if using cas authentication.
95
- * `node['nagios']['cas_validate_server']` - whether to validate the server cert. Defaults to off.
96
- * `node['nagios']['cas_root_proxy_url']` - if set, sets the url that the cas server redirects to after auth.
97
- * `node['nagios']['ldap_bind_dn']` - DN used to bind to the server when searching for ldap entries.
98
- * `node['nagios']['ldap_bind_password']` - bind password used with the DN provided for searching ldap.
99
- * `node['nagios']['ldap_url']` - ldap url and search parameters.
100
- * `node['nagios']['ldap_authoritative']` - accepts "on" or "off". controls other authentication modules from authenticating the user if this one fails.
101
- * `node['nagios']['ldap_group_attribute']` - Set the Apache AuthLDAPGroupAttribute directive to a non-default value.
102
- * `node['nagios']['ldap_group_attribute_is_dn']` - accepts "on" or "off". Set the Apache AuthLDAPGroupAttributeIsDN directive. Apache's default behavior is currently "on."
103
- * `node['nagios']['ldap_verify_cert']` - accepts "on" or "off". Set the Apache mod_ldap LDAPVerifyServerCert directive. Apache's default behavior is currently "on."
104
- * `node['nagios']['ldap_trusted_mode']` - Set the Apache mod_ldap LDAPTrustedMode directive.
105
- * `node['nagios']['ldap_trusted_global_cert']` - Set the Apache mod_ldap LDAPTrustedGlobalCert directive.
106
- * `node['nagios']['users_databag']` - the databag containing users to search for. defaults to users
107
- * `node['nagios']['users_databag_group']` - users databag group considered Nagios admins. defaults to sysadmin
108
- * `node['nagios']['services_databag']` - the databag containing services to search for. defaults to nagios_services
109
- * `node['nagios']['servicegroups_databag']` - the databag containing servicegroups to search for. defaults to nagios_servicegroups
110
- * `node['nagios']['templates_databag']` - the databag containing templates to search for. defaults to nagios_templates
111
- * `node['nagios']['hostgroups_databag']` - the databag containing hostgroups to search for. defaults to nagios_hostgroups
112
- * `node['nagios']['hosttemplates_databag']` - the databag containing host templates to search for. defaults to nagios_hosttemplates
113
- * `node['nagios']['eventhandlers_databag']` - the databag containing eventhandlers to search for. defaults to nagios_eventhandlers
114
- * `node['nagios']['unmanagedhosts_databag']` - the databag containing unmanagedhosts to search for. defaults to nagios_unmanagedhosts
115
- * `node['nagios']['serviceescalations_databag']` - the databag containing serviceescalations to search for. defaults to nagios_serviceescalations
116
- * `node['nagios']['hostescalations_databag']` - the databag containing hostescalations to search for. defaults to nagios_hostescalations
117
- * `node['nagios']['contacts_databag']` - the databag containing contacts to search for. defaults to nagios_contacts
118
- * `node['nagios']['contactgroups_databag']` - the databag containing contactgroups to search for. defaults to nagios_contactgroups
119
- * `node['nagios']['servicedependencies_databag']` - the databag containing servicedependencies to search for. defaults to nagios_servicedependencies
120
- * `node['nagios']['host_name_attribute']` - node attribute to use for naming the host. Must be unique across monitored nodes. Defaults to hostname
121
- * `node['nagios']['regexp_matching']` - Attribute to enable [regexp matching](http://nagios.sourceforge.net/docs/3_0/configmain.html#use_regexp_matching). Defaults to 0.
122
- * `node['nagios']['large_installation_tweaks']` - Attribute to enable [large installation tweaks](http://nagios.sourceforge.net/docs/3_0/largeinstalltweaks.html). Defaults to 0.
123
- * `node['nagios']['templates']` - These set directives in the default host template. Unless explicitly overridden, they will be inherited by the host definitions for each discovered node and `nagios_unmanagedhosts` data bag. For more information about these directives, see the Nagios documentation for [host definitions](http://nagios.sourceforge.net/docs/3_0/objectdefinitions.html#host).
124
- * `node['nagios']['hosts_template']` - Host template you want to inherit properties/variables from, default 'server'. For more information, see the nagios doc on [Object Inheritance](http://nagios.sourceforge.net/docs/3_0/objectinheritance.html).
125
- * `node['nagios']['brokers']` - Hash of broker modules to include in the config. Hash key is the path to the broker module, the value is any parameters to pass to it.
126
-
127
-
128
- * `node['nagios']['default_host']['flap_detection']` - Defaults to `true`.
129
- * `node['nagios']['default_host']['process_perf_data']` - Defaults to `false`.
130
- * `node['nagios']['default_host']['check_period']` - Defaults to `'24x7'`.
131
- * `node['nagios']['default_host']['check_interval']` - In seconds. Must be divisible by `node['nagios']['interval_length']`. Defaults to `15`.
132
- * `node['nagios']['default_host']['retry_interval']` - In seconds. Must be divisible by `node['nagios']['interval_length']`. Defaults to `15`.
133
- * `node['nagios']['default_host']['max_check_attempts']` - Defaults to `1`.
134
- * `node['nagios']['default_host']['check_command']` - Defaults to the pre-defined command `'check-host-alive'`.
135
- * `node['nagios']['default_host']['notification_interval']` - In seconds. Must be divisible by `node['nagios']['interval_length']`. Defaults to `300`.
136
- * `node['nagios']['default_host']['notification_options']` - Defaults to `'d,u,r'`.
137
- * `node['nagios']['default_host']['action_url']` - Defines a action url. Defaults to `nil`.
138
-
139
- * `node['nagios']['default_service']['process_perf_data']` - Defaults to `false`.
140
- * `node['nagios']['default_service']['action_url']` - Defines a action url. Defaults to `nil`.
141
-
142
- * `node['nagios']['server']['web_server']` - web server to use. supports Apache or Nginx, default "apache"
143
- * `node['nagios']['server']['nginx_dispatch']` - nginx dispatch method. supports cgi or php, default "cgi"
144
- * `node['nagios']['server']['stop_apache']` - stop apache service if using nginx, default false
145
- * `node['nagios']['server']['redirect_root']` - if using Apache, should http://server/ redirect to http://server/nagios3 automatically, default false
146
- * `node['nagios']['server']['normalize_hostname']` - If set to true, normalize all hostnames in hosts.cfg to lowercase. Defaults to false.
147
-
148
- These are nagios cgi.config options.
149
-
150
- * `node['nagios']['cgi']['show_context_help']` - Defaults to 1
151
- * `node['nagios']['cgi']['authorized_for_system_information']` - Defaults to '*'
152
- * `node['nagios']['cgi']['authorized_for_configuration_information']` - Defaults to '*'
153
- * `node['nagios']['cgi']['authorized_for_system_commands']` - Defaults to '*'
154
- * `node['nagios']['cgi']['authorized_for_all_services']` - Defaults to '*'
155
- * `node['nagios']['cgi']['authorized_for_all_hosts']` - Defaults to '*'
156
- * `node['nagios']['cgi']['authorized_for_all_service_commands']` - Defaults to '*'
157
- * `node['nagios']['cgi']['authorized_for_all_host_commands']` - Defaults to '*'
158
- * `node['nagios']['cgi']['default_statusmap_layout']` - Defaults to 5
159
- * `node['nagios']['cgi']['default_statuswrl_layout']` - Defaults to 4
160
- * `node['nagios']['cgi']['result_limit']` - Defaults to 100
161
- * `node['nagios']['cgi']['escape_html_tags']` - Defaults to 0
162
- * `node['nagios']['cgi']['action_url_target']` - Defaults to '_blank'
163
- * `node['nagios']['cgi']['notes_url_target']` - Defaults to '_blank'
164
- * `node['nagios']['cgi']['lock_author_names']` - Defaults to 1
165
-
166
-
167
- Recipes
168
- -------
169
-
170
- ## Recipes
171
-
172
- ### default
173
-
174
- Includes the correct client installation recipe based on platform, either `nagios::server_package` or `nagios::server_source`.
175
-
176
- The server recipe sets up Apache as the web front end by default. This recipe also does a number of searches to dynamically build the hostgroups to monitor, hosts that belong to them and admins to notify of events/alerts.
177
-
178
- Searches are confined to the node's `chef_environment` unless multi-environment monitoring is enabled.
179
-
180
- The recipe does the following:
181
-
182
- 1. Searches for users in 'users' databag belonging to a 'sysadmin' group, and authorizes them to access the Nagios web UI and also to receive notification e-mails.
183
- 2. Searches all available roles/environments and builds a list which will become the Nagios hostgroups.
184
- 3. Places nodes in Nagios hostgroups by role / environment membership.
185
- 4. Installs various packages required for the server.
186
- 5. Sets up configuration directories.
187
- 6. Moves the package-installed Nagios configuration to a 'dist' directory.
188
- 7. Disables the 000-default VirtualHost present on Debian/Ubuntu Apache2 package installations.
189
- 8. Templates configuration files for services, contacts, contact groups, templates, hostgroups and hosts.
190
- 9. Enables the Nagios web UI.
191
- 10. Starts the Nagios server service
192
-
193
- ### server_package
194
-
195
- Installs the Nagios server from packages. Default for Debian / Ubuntu systems.
196
-
197
- ### server_source
198
-
199
- Installs the Nagios server from source. Default for Red Hat / Fedora based systems as native packages for Nagios are not available in the default repositories.
200
-
201
- ### pagerduty
202
-
203
- Installs pagerduty plugin for nagios. If you only have a single pagerduty key, you can simply set a `node['nagios']['pagerduty_key']` attribute on your server. For multiple pagerduty key configuration see Pager Duty under Data Bags.
204
-
205
- This recipe was written based on the [Nagios Integration Guide](http://www.pagerduty.com/docs/guides/nagios-integration-guide) from PagerDuty which explains how to get an API key for your Nagios server.
206
-
207
- ## Data Bags
208
-
209
- [See Wiki for more databag information](https://github.com/schubergphilis/nagios/wiki/config)
210
-
211
- ### Pager Duty
212
-
213
- You can define pagerduty contacts and keys by creating nagios_pagerduty data bags that contain the contact and the relevant key. Setting admin_contactgroup to "true" will add this pagerduty contact to the admin contact group created by this cookbook.
214
-
215
- ```javascript
216
- {
217
- "id": "pagerduty_critical",
218
- "admin_contactgroup": "true",
219
- "key": "a33e5ef0ac96772fbd771ddcccd3ccd0"
220
- }
221
- ```
222
-
223
- You can add these contacts to any contactgroups you create.
224
-
225
- ## Monitoring Role
226
-
227
- Create a role to use for the monitoring server. The role name should match the value of the attribute "`node['nrpe']['server_role']`" on your clients. By default, this is '`monitoring`'. For example:
228
-
229
- ```ruby
230
- # roles/monitoring.rb
231
- name 'monitoring'
232
- description 'Monitoring server'
233
- run_list(
234
- 'recipe[nagios::default]'
235
- )
236
-
237
- default_attributes(
238
- 'nagios' => {
239
- 'server_auth_method' => 'htauth'
240
- }
241
- )
242
- ```
243
-
244
- ```bash
245
- $ knife role from file monitoring.rb
246
- ```
247
-
248
- ## Usage
249
-
250
- ### server setup
251
-
252
- Create a role named '`monitoring`', and add the nagios server recipe to the `run_list`. See **Monitoring Role** above for an example.
253
-
254
- Apply the nrpe cookbook to nodes in order to install the NRPE client
255
-
256
- By default the Nagios server will only monitor systems in its same environment. To change this set the `multi_environment_monitoring` attribute. See **Attributes**
257
-
258
- Create data bag items in the `users` data bag for each administer you would like to be able to login to the Nagios server UI. Pay special attention to the method you would like to use to authorization users (openid or htauth). See **Users** and **Atttributes**
259
-
260
- At this point you now have a minimally functional Nagios server, however the server will lack any service checks outside of the single Nagios Server health check.
261
-
262
- ### defining checks
263
-
264
- NRPE commands are defined in recipes using the nrpe_check LWRP provider in the nrpe cookbooks. For base system monitoring such as load, ssh, memory, etc you may want to create a cookbook in your environment that defines each monitoring command via the LWRP.
265
-
266
- With NRPE commands created using the LWRP you will need to define Nagios services to use those commands. These services are defined using the `nagios_services` data bag and applied to roles and/or environments. See **Services**
267
-
268
- ### enabling notifications
269
-
270
- You need to set `default['nagios']['notifications_enabled'] = 1` attribute on your Nagios server to enable email notifications.
271
-
272
- For email notifications to work an appropriate mail program package and local MTA need to be installed so that /usr/bin/mail or /bin/mail is available on the system.
273
-
274
- Example:
275
-
276
- Include [postfix cookbook](https://github.com/opscode-cookbooks/postfix) to be installed on your Nagios server node.
277
-
278
- Add override_attributes to your `monitoring` role:
279
-
280
- ```ruby
281
- # roles/monitoring.rb
282
- name 'monitoring'
283
- description 'Monitoring Server'
284
- run_list(
285
- 'recipe[nagios:default]',
286
- 'recipe[postfix]'
287
- )
288
-
289
- override_attributes(
290
- 'nagios' => { 'notifications_enabled' => '1' },
291
- 'postfix' => { 'myhostname':'your_hostname', 'mydomain':'example.com' }
292
- )
293
-
294
- default_attributes(
295
- 'nagios' => { 'server_auth_method' => 'htauth' }
296
- )
297
- ```
298
-
299
- ```bash
300
- $ knife role from file monitoring.rb
301
- ```
302
-
303
- ## License & Authors
304
-
305
- - Author:: Joshua Sierles [joshua@37signals.com](mailto:joshua@37signals.com)
306
- - Author:: Nathan Haneysmith [nathan@chef.io](mailto:nathan@chef.io)
307
- - Author:: Joshua Timberman [joshua@chef.io](mailto:joshua@chef.io)
308
- - Author:: Seth Chisamore [schisamo@chef.io](mailto:schisamo@chef.io)
309
- - Author:: Tim Smith [tsmith@chef.io](mailto:tsmith@chef.io)
310
-
311
- ```text
312
- Copyright 2009, 37signals
313
- Copyright 2009-2017, Chef Software, Inc
314
- Copyright 2012, Webtrends Inc.
315
- Copyright 2013-2014, Limelight Networks, Inc.
316
-
317
- Licensed under the Apache License, Version 2.0 (the "License");
318
- you may not use this file except in compliance with the License.
319
- You may obtain a copy of the License at
320
-
321
- http://www.apache.org/licenses/LICENSE-2.0
322
-
323
- Unless required by applicable law or agreed to in writing, software
324
- distributed under the License is distributed on an "AS IS" BASIS,
325
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
326
- See the License for the specific language governing permissions and
327
- limitations under the License.
328
- ```
@@ -1,2 +0,0 @@
1
- Please refer to
2
- https://github.com/chef-cookbooks/community_cookbook_documentation/blob/master/TESTING.MD
@@ -1,171 +0,0 @@
1
- #
2
- # Author:: Sander Botman <sbotman@schubergphilis.com>
3
- # Cookbook Name:: nagios
4
- # Attributes:: config
5
- #
6
- # Copyright 2015, Sander Botman
7
- #
8
- # Licensed under the Apache License, Version 2.0 (the "License");
9
- # you may not use this file except in compliance with the License.
10
- # You may obtain a copy of the License at
11
- #
12
- # http://www.apache.org/licenses/LICENSE-2.0
13
- #
14
- # Unless required by applicable law or agreed to in writing, software
15
- # distributed under the License is distributed on an "AS IS" BASIS,
16
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
- # See the License for the specific language governing permissions and
18
- # limitations under the License.
19
- #
20
- #
21
- # This class holds all nagios configuration options.
22
- #
23
-
24
- default['nagios']['conf']['log_file'] = "#{node['nagios']['log_dir']}/#{node['nagios']['server']['name']}.log"
25
- default['nagios']['conf']['cfg_dir'] = node['nagios']['config_dir']
26
- default['nagios']['conf']['object_cache_file'] = "#{node['nagios']['cache_dir']}/objects.cache"
27
- default['nagios']['conf']['precached_object_file'] = "#{node['nagios']['cache_dir']}/objects.precache"
28
- default['nagios']['conf']['resource_file'] = "#{node['nagios']['resource_dir']}/resource.cfg"
29
- default['nagios']['conf']['temp_file'] = "#{node['nagios']['cache_dir']}/#{node['nagios']['server']['name']}.tmp"
30
- default['nagios']['conf']['temp_path'] = '/tmp'
31
- default['nagios']['conf']['status_file'] = "#{node['nagios']['cache_dir']}/status.dat"
32
- default['nagios']['conf']['status_update_interval'] = '10'
33
- default['nagios']['conf']['nagios_user'] = node['nagios']['user']
34
- default['nagios']['conf']['nagios_group'] = node['nagios']['group']
35
- default['nagios']['conf']['enable_notifications'] = '1'
36
- default['nagios']['conf']['execute_service_checks'] = '1'
37
- default['nagios']['conf']['accept_passive_service_checks'] = '1'
38
- default['nagios']['conf']['execute_host_checks'] = '1'
39
- default['nagios']['conf']['accept_passive_host_checks'] = '1'
40
- default['nagios']['conf']['enable_event_handlers'] = '1'
41
- default['nagios']['conf']['log_rotation_method'] = 'd'
42
- default['nagios']['conf']['log_archive_path'] = "#{node['nagios']['log_dir']}/archives"
43
- default['nagios']['conf']['check_external_commands'] = '1'
44
- default['nagios']['conf']['command_check_interval'] = '-1'
45
- default['nagios']['conf']['command_file'] = "#{node['nagios']['state_dir']}/rw/#{node['nagios']['server']['name']}.cmd"
46
- default['nagios']['conf']['external_command_buffer_slots'] = '4096' # Deprecated, Starting with Nagios Core 4, this variable has no effect.
47
- default['nagios']['conf']['check_for_updates'] = '0'
48
- default['nagios']['conf']['lock_file'] = "#{node['nagios']['run_dir']}/#{node['nagios']['server']['vname']}.pid"
49
- default['nagios']['conf']['retain_state_information'] = '1'
50
- default['nagios']['conf']['state_retention_file'] = "#{node['nagios']['state_dir']}/retention.dat"
51
- default['nagios']['conf']['retention_update_interval'] = '60'
52
- default['nagios']['conf']['use_retained_program_state'] = '1'
53
- default['nagios']['conf']['use_retained_scheduling_info'] = '1'
54
- default['nagios']['conf']['use_syslog'] = '1'
55
- default['nagios']['conf']['log_notifications'] = '1'
56
- default['nagios']['conf']['log_service_retries'] = '1'
57
- default['nagios']['conf']['log_host_retries'] = '1'
58
- default['nagios']['conf']['log_event_handlers'] = '1'
59
- default['nagios']['conf']['log_initial_states'] = '0'
60
- default['nagios']['conf']['log_external_commands'] = '1'
61
- default['nagios']['conf']['log_passive_checks'] = '1'
62
- default['nagios']['conf']['sleep_time'] = '1' # Deprecated, Starting with Nagios Core 4, this variable has no effect.
63
- default['nagios']['conf']['service_inter_check_delay_method'] = 's'
64
- default['nagios']['conf']['max_service_check_spread'] = '5'
65
- default['nagios']['conf']['service_interleave_factor'] = 's'
66
- default['nagios']['conf']['max_concurrent_checks'] = '0'
67
- default['nagios']['conf']['check_result_reaper_frequency'] = '10'
68
- default['nagios']['conf']['max_check_result_reaper_time'] = '30'
69
- default['nagios']['conf']['check_result_path'] = "#{node['nagios']['state_dir']}/spool/checkresults"
70
- default['nagios']['conf']['max_check_result_file_age'] = '3600'
71
- default['nagios']['conf']['host_inter_check_delay_method'] = 's'
72
- default['nagios']['conf']['max_host_check_spread'] = '5'
73
- default['nagios']['conf']['interval_length'] = '1'
74
- default['nagios']['conf']['auto_reschedule_checks'] = '0'
75
- default['nagios']['conf']['auto_rescheduling_interval'] = '30'
76
- default['nagios']['conf']['auto_rescheduling_window'] = '180'
77
- default['nagios']['conf']['use_aggressive_host_checking'] = '0'
78
- default['nagios']['conf']['translate_passive_host_checks'] = '0'
79
- default['nagios']['conf']['passive_host_checks_are_soft'] = '0'
80
- default['nagios']['conf']['enable_predictive_host_dependency_checks'] = '1'
81
- default['nagios']['conf']['enable_predictive_service_dependency_checks'] = '1'
82
- default['nagios']['conf']['cached_host_check_horizon'] = '15'
83
- default['nagios']['conf']['cached_service_check_horizon'] = '15'
84
- default['nagios']['conf']['use_large_installation_tweaks'] = '0'
85
- default['nagios']['conf']['enable_environment_macros'] = '1'
86
- default['nagios']['conf']['enable_flap_detection'] = '1'
87
- default['nagios']['conf']['low_service_flap_threshold'] = '5.0'
88
- default['nagios']['conf']['high_service_flap_threshold'] = '20.0'
89
- default['nagios']['conf']['low_host_flap_threshold'] = '5.0'
90
- default['nagios']['conf']['high_host_flap_threshold'] = '20.0'
91
- default['nagios']['conf']['soft_state_dependencies'] = '0'
92
- default['nagios']['conf']['service_check_timeout'] = '60'
93
- default['nagios']['conf']['host_check_timeout'] = '30'
94
- default['nagios']['conf']['event_handler_timeout'] = '30'
95
- default['nagios']['conf']['notification_timeout'] = '30'
96
- default['nagios']['conf']['ocsp_timeout'] = '5'
97
- default['nagios']['conf']['ochp_timeout'] = '5'
98
- default['nagios']['conf']['perfdata_timeout'] = '5'
99
- default['nagios']['conf']['obsess_over_services'] = '0'
100
- default['nagios']['conf']['obsess_over_hosts'] = '0'
101
- default['nagios']['conf']['process_performance_data'] = '0'
102
- default['nagios']['conf']['check_for_orphaned_services'] = '1'
103
- default['nagios']['conf']['check_for_orphaned_hosts'] = '1'
104
- default['nagios']['conf']['check_service_freshness'] = '1'
105
- default['nagios']['conf']['service_freshness_check_interval'] = '60'
106
- default['nagios']['conf']['check_host_freshness'] = '0'
107
- default['nagios']['conf']['host_freshness_check_interval'] = '60'
108
- default['nagios']['conf']['additional_freshness_latency'] = '15'
109
- default['nagios']['conf']['enable_embedded_perl'] = '1'
110
- default['nagios']['conf']['use_embedded_perl_implicitly'] = '1'
111
- default['nagios']['conf']['date_format'] = 'iso8601'
112
- default['nagios']['conf']['use_timezone'] = 'UTC'
113
- default['nagios']['conf']['illegal_object_name_chars'] = '`~!$%^&*|\'"<>?,()='
114
- default['nagios']['conf']['illegal_macro_output_chars'] = '`~$&|\'"<>#'
115
- default['nagios']['conf']['use_regexp_matching'] = '0'
116
- default['nagios']['conf']['use_true_regexp_matching'] = '0'
117
- default['nagios']['conf']['admin_email'] = node['nagios']['sysadmin_email']
118
- default['nagios']['conf']['admin_pager'] = node['nagios']['sysadmin_sms_email']
119
- default['nagios']['conf']['event_broker_options'] = '-1'
120
- default['nagios']['conf']['retained_host_attribute_mask'] = '0'
121
- default['nagios']['conf']['retained_service_attribute_mask'] = '0'
122
- default['nagios']['conf']['retained_process_host_attribute_mask'] = '0'
123
- default['nagios']['conf']['retained_process_service_attribute_mask'] = '0'
124
- default['nagios']['conf']['retained_contact_host_attribute_mask'] = '0'
125
- default['nagios']['conf']['retained_contact_service_attribute_mask'] = '0'
126
- default['nagios']['conf']['daemon_dumps_core'] = '0'
127
- default['nagios']['conf']['debug_file'] = "#{node['nagios']['state_dir']}/#{node['nagios']['server']['name']}.debug"
128
- default['nagios']['conf']['debug_level'] = '0'
129
- default['nagios']['conf']['debug_verbosity'] = '1'
130
- default['nagios']['conf']['max_debug_file_size'] = '1000000'
131
-
132
- default['nagios']['conf']['cfg_file'] = nil
133
- default['nagios']['conf']['query_socket'] = nil
134
- default['nagios']['conf']['check_workers'] = nil
135
- default['nagios']['conf']['log_current_states'] = nil
136
- default['nagios']['conf']['bare_update_check'] = nil
137
- default['nagios']['conf']['global_host_event_handler'] = nil
138
- default['nagios']['conf']['global_service_event_handler'] = nil
139
- default['nagios']['conf']['free_child_process_memory'] = nil
140
- default['nagios']['conf']['ocsp_command'] = nil
141
- default['nagios']['conf']['ochp_command'] = nil
142
- default['nagios']['conf']['host_perfdata_command'] = nil
143
- default['nagios']['conf']['service_perfdata_command'] = nil
144
- default['nagios']['conf']['host_perfdata_file'] = nil
145
- default['nagios']['conf']['service_perfdata_file'] = nil
146
- default['nagios']['conf']['host_perfdata_file_template'] = nil
147
- default['nagios']['conf']['service_perfdata_file_template'] = nil
148
- default['nagios']['conf']['host_perfdata_file_mode'] = nil
149
- default['nagios']['conf']['service_perfdata_file_mode'] = nil
150
- default['nagios']['conf']['host_perfdata_file_processing_interval'] = nil
151
- default['nagios']['conf']['service_perfdata_file_processing_interval'] = nil
152
- default['nagios']['conf']['host_perfdata_file_processing_command'] = nil
153
- default['nagios']['conf']['service_perfdata_file_processing_command'] = nil
154
- default['nagios']['conf']['broker_module'] = nil
155
-
156
- if node['nagios']['server']['install_method'] == 'source' ||
157
- (node['platform_family'] == 'rhel' && node['platform_version'].to_i >= 6) ||
158
- (node['platform'] == 'debian' && node['platform_version'].to_i >= 7) ||
159
- (node['platform'] == 'ubuntu' && node['platform_version'].to_f >= 14.04)
160
- default['nagios']['conf']['allow_empty_hostgroup_assignment'] = '1'
161
- default['nagios']['conf']['service_check_timeout_state'] = 'c'
162
- end
163
-
164
- case node['platform_family']
165
- when 'debian'
166
- default['nagios']['conf']['p1_file'] = "#{node['nagios']['home']}/p1.pl"
167
- when 'rhel', 'fedora'
168
- default['nagios']['conf']['p1_file'] = '/usr/sbin/p1.pl'
169
- else
170
- default['nagios']['conf']['p1_file'] = "#{node['nagios']['home']}/p1.pl"
171
- end