2 # Cookbook Name:: nagios-grid
5 # Copyright 2016, whitestar
7 # Licensed under the Apache License, Version 2.0 (the "License");
8 # you may not use this file except in compliance with the License.
9 # You may obtain a copy of the License at
11 # http://www.apache.org/licenses/LICENSE-2.0
13 # Unless required by applicable law or agreed to in writing, software
14 # distributed under the License is distributed on an "AS IS" BASIS,
15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 # See the License for the specific language governing permissions and
17 # limitations under the License.
20 default['nagios']['base_cfg_dir'] = 'base'
21 default['nagios']['site_cfg_dir'] = 'site'
22 default['nagios']['autostart'] = true
23 default['nagios']['autoreload'] = true
24 default['nagios']['with_pnp4nagios'] = false
27 default['nagios']['check_external_commands'] = '0'
28 default['nagios']['command_file'] = node.value_for_platform_family(
29 'debian' => '/var/lib/nagios3/rw/nagios.cmd',
30 'rhel' => '/var/spool/nagios/cmd/nagios.cmd'
32 default['nagios']['use_regexp_matching'] = '0'
35 default['nagios']['cgi'] = {
36 'authorized_for_system_information' => 'nagiosadmin',
37 'authorized_for_configuration_information' => 'nagiosadmin',
38 'authorized_for_system_commands' => 'nagiosadmin',
39 'authorized_for_all_services' => 'nagiosadmin',
40 'authorized_for_all_hosts' => 'nagiosadmin',
41 'authorized_for_all_service_commands' => 'nagiosadmin',
42 'authorized_for_all_host_commands' => 'nagiosadmin',
43 'result_limit' => '100',
48 default['nagios']['web']['Require'] = [
52 default['nagios']['web']['Order'] = 'Allow,Deny' # e.g. 'Deny,Allow'
53 default['nagios']['web']['Deny'] = [] # ['From All']
54 default['nagios']['web']['Allow'] = [
60 ## AuthType: 'none'|'Basic'|'Kerberos'
61 default['nagios']['web']['AuthType'] = 'Basic'
62 ### if AuthType == Basic
63 default['nagios']['web']['mod_auth_basic']['AuthUserFile'] = node.value_for_platform_family(
64 'debian' => '/etc/nagios3/htpasswd.users',
65 'rhel' => '/etc/nagios/passwd'
67 ### if AuthType == Kerberos
68 default['nagios']['web']['mod_auth_kerb']['KrbAuthRealms'] = 'LOCALDOMAIN'
69 default['nagios']['web']['mod_auth_kerb']['KrbServiceName'] = 'HTTP'
70 default['nagios']['web']['mod_auth_kerb']['Krb5Keytab'] = '/etc/krb5.keytab'
71 default['nagios']['web']['mod_auth_kerb']['KrbMethodNegotiate'] = 'on'
72 default['nagios']['web']['mod_auth_kerb']['KrbMethodK5Passwd'] = 'off'
75 ## default template base
76 default['nagios']['objects']['default_contact_groups'] = 'admins'
77 default['nagios']['objects']['check_ldap'] = {
78 'base' => 'dc=example,dc=com',
81 default['nagios']['objects']['commands'] = []
82 default['nagios']['objects']['hosts'] = []
83 default['nagios']['objects']['hostgroups'] = []
84 default['nagios']['objects']['hostdependencies'] = []
85 default['nagios']['objects']['hostescalations'] = []
86 default['nagios']['objects']['hostextinfos'] = []
87 default['nagios']['objects']['services'] = []
88 default['nagios']['objects']['servicegroups'] = []
89 default['nagios']['objects']['servicedependencies'] = []
90 default['nagios']['objects']['serviceescalations'] = []
91 default['nagios']['objects']['serviceextinfos'] = []
92 default['nagios']['objects']['contacts'] = []
93 default['nagios']['objects']['contactgroups'] = []
94 default['nagios']['objects']['timeperiods'] = []
96 # for check_ganglia_metric
97 default['nagios']['NagAconda']['version'] = '0.1.4'
98 #default['nagios']['NagAconda']['version'] = '0.2.1'
99 default['nagios']['check_ganglia_metric']['enabled'] = false
100 default['nagios']['check_ganglia_metric']['gmetad_host'] = 'localhost'
104 default['nagios']['check_nrpe']['nossl'] = false
106 default['nagios']['nrpe']['default'] = {
107 # expanded in the `/etc/default/nagios-nrpe-server`
108 #'NRPE_OPTS' => '"-n"', # new env. var. e.g. Ubuntu 18.04
109 #'DAEMON_OPTS' => '"--no-ssl"', # old env. var. e.g. Debian 8
113 default['nagios']['nrpe']['allowed_hosts'] = '127.0.0.1'
114 default['nagios']['nrpe']['with_smartmontools'] = false
115 default['nagios']['nrpe']['check_mem.pl'] = {
118 'extra_opts' => '-u', # -u|f, -C
120 default['nagios']['nrpe']['check_load'] = {
122 'crit' => '30,25,20',
124 default['nagios']['nrpe']['check_total_procs'] = {
129 default['nagios']['nrpe']["check_disk#{num}"] = {
137 default['nagios']['nrpe']["check_smart#{num}"] = {
138 'device' => '/dev/sda',
141 default['nagios']['nrpe']['check_dig'] = {
142 'host' => '127.0.0.1',
143 'lookup' => 'host-a.example.com',
145 default['nagios']['nrpe']['check_dig_in'] = {
146 'host' => '127.0.0.1',
147 'lookup' => 'host-b.example.com',
149 default['nagios']['nrpe']['check_dig_ex'] = {
150 'host' => '127.0.0.1',
151 'lookup' => 'www.google.com',
153 default['nagios']['nrpe']['check_logs']['log_files'] = [
156 'file_name' => '/var/log/messages',
157 'reg_exp' => '(WARNING|CRITICAL)',
158 'lines' => 2, #optional number of output lines after match
159 'new_line_reg_exp' => '^', #optional new line regex to stop output lines
160 'seek_file_suffix' => '2' #optional seek file suffix