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'] = [
51 #'ip ::1/128 fc00::/7 fe80::/10 10.0.0.0/8 127.0.0.0/8 169.254.0.0/16 172.16.0.0/12 192.168.0.0/16',
54 default['nagios']['web']['Order'] = 'Allow,Deny' # e.g. 'Deny,Allow'
55 default['nagios']['web']['Deny'] = [] # ['From All']
56 default['nagios']['web']['Allow'] = [
62 ## AuthType: 'none'|'Basic'|'Kerberos'
63 default['nagios']['web']['AuthType'] = 'Basic'
64 ### if AuthType == Basic
65 default['nagios']['web']['mod_auth_basic']['AuthUserFile'] = node.value_for_platform_family(
66 'debian' => '/etc/nagios3/htpasswd.users',
67 'rhel' => '/etc/nagios/passwd'
69 ### if AuthType == Kerberos
70 default['nagios']['web']['mod_auth_kerb']['KrbAuthRealms'] = 'LOCALDOMAIN'
71 default['nagios']['web']['mod_auth_kerb']['KrbServiceName'] = 'HTTP'
72 default['nagios']['web']['mod_auth_kerb']['Krb5Keytab'] = '/etc/krb5.keytab'
73 default['nagios']['web']['mod_auth_kerb']['KrbMethodNegotiate'] = 'on'
74 default['nagios']['web']['mod_auth_kerb']['KrbMethodK5Passwd'] = 'off'
77 ## default template base
78 default['nagios']['objects']['default_contact_groups'] = 'admins'
79 default['nagios']['objects']['check_ldap'] = {
80 'base' => 'dc=example,dc=com',
83 default['nagios']['objects']['commands'] = []
84 default['nagios']['objects']['hosts'] = []
85 default['nagios']['objects']['hostgroups'] = []
86 default['nagios']['objects']['hostdependencies'] = []
87 default['nagios']['objects']['hostescalations'] = []
88 default['nagios']['objects']['hostextinfos'] = []
89 default['nagios']['objects']['services'] = []
90 default['nagios']['objects']['servicegroups'] = []
91 default['nagios']['objects']['servicedependencies'] = []
92 default['nagios']['objects']['serviceescalations'] = []
93 default['nagios']['objects']['serviceextinfos'] = []
94 default['nagios']['objects']['contacts'] = []
95 default['nagios']['objects']['contactgroups'] = []
96 default['nagios']['objects']['timeperiods'] = []
98 # for check_ganglia_metric
99 default['nagios']['NagAconda']['version'] = '0.1.4'
100 #default['nagios']['NagAconda']['version'] = '0.2.1'
101 default['nagios']['check_ganglia_metric']['enabled'] = false
102 default['nagios']['check_ganglia_metric']['gmetad_host'] = 'localhost'
106 default['nagios']['check_nrpe']['nossl'] = false
108 default['nagios']['nrpe']['default'] = {
109 # expanded in the `/etc/default/nagios-nrpe-server`
110 #'NRPE_OPTS' => '"-n"', # new env. var. e.g. Ubuntu 18.04
111 #'DAEMON_OPTS' => '"--no-ssl"', # old env. var. e.g. Debian 8
115 default['nagios']['nrpe']['allowed_hosts'] = '127.0.0.1'
116 default['nagios']['nrpe']['with_smartmontools'] = false
117 default['nagios']['nrpe']['check_mem.pl'] = {
120 'extra_opts' => '-u', # -u|f, -C
122 default['nagios']['nrpe']['check_load'] = {
124 'crit' => '30,25,20',
126 default['nagios']['nrpe']['check_total_procs'] = {
131 default['nagios']['nrpe']["check_disk#{num}"] = {
139 default['nagios']['nrpe']["check_smart#{num}"] = {
140 'device' => '/dev/sda',
143 default['nagios']['nrpe']['check_dig'] = {
144 'host' => '127.0.0.1',
145 'lookup' => 'host-a.example.com',
147 default['nagios']['nrpe']['check_dig_in'] = {
148 'host' => '127.0.0.1',
149 'lookup' => 'host-b.example.com',
151 default['nagios']['nrpe']['check_dig_ex'] = {
152 'host' => '127.0.0.1',
153 'lookup' => 'www.google.com',
155 default['nagios']['nrpe']['check_logs']['log_files'] = [
158 'file_name' => '/var/log/messages',
159 'reg_exp' => '(WARNING|CRITICAL)',
160 'lines' => 2, #optional number of output lines after match
161 'new_line_reg_exp' => '^', #optional new line regex to stop output lines
162 'seek_file_suffix' => '2' #optional seek file suffix