OSDN Git Service

608004e66409b60591a7736496d6261a3d2661d6
[metasearch/grid-chef-repo.git] / cookbooks / nagios-grid / README.md
1 nagios-grid Cookbook
2 ====================
3
4 This cookbook provides some recipes for Nagios setup.
5
6 ## Contents
7
8 - [Requirements](#requirements)
9 - [Attributes](#attributes)
10 - [Usage](#usage)
11         - [nagios-grid::default](#nagios-griddefault)
12         - [nagios-grid::nagios-base](#nagios-gridnagios-base)
13         - [nagios-grid::nagios-nrpe-server](#nagios-gridnagios-nrpe-server)
14 - [License and Authors](#license-and-authors)
15         - [Plugins](#plugins)
16
17 ## Requirements
18
19 None.
20
21 ## Attributes
22
23 |Key|Type|Description, example|Default|
24 |:--|:--|:--|:--|
25 |`['nagios']['base_cfg_dir']`|String|base conf. directory.|`'base'`|
26 |`['nagios']['site_cfg_dir']`|String|site conf. directory.|`'site'`|
27 |`['nagios']['autostart']`|Boolean||`true`|
28 |`['nagios']['autoreload']`|Boolean||`true`|
29 |`['nagios']['with_pnp4nagios']`|Boolean||`false`|
30 |`['nagios']['check_external_commands']`|String|check_external_commands property in nagios.cfg|`'0'`|
31 |`['nagios']['command_file']`|String|command_file property in nagios.cfg|see default.rb|
32 |`['nagios']['use_regexp_matching']`|String|use_regexp_matching property in nagios.cfg|`'0'`|
33 |`['nagios']['cgi']['authorized_for_system_information']`|String|CGI authorization property.|`'nagiosadmin'`|
34 |`['nagios']['cgi']['authorized_for_configuration_information']`|String|CGI authorization property.|`'nagiosadmin'`|
35 |`['nagios']['cgi']['authorized_for_system_commands']`|String|CGI authorization property.|`'nagiosadmin'`|
36 |`['nagios']['cgi']['authorized_for_all_services']`|String|CGI authorization property.|`'nagiosadmin'`|
37 |`['nagios']['cgi']['authorized_for_all_hosts']`|String|CGI authorization property.|`'nagiosadmin'`|
38 |`['nagios']['cgi']['authorized_for_all_service_commands']`|String|CGI authorization property.|`'nagiosadmin'`|
39 |`['nagios']['cgi']['authorized_for_all_host_commands']`|String|CGI authorization property.|`'nagiosadmin'`|
40 |`['nagios']['cgi']['result_limit']`|String|result set limitation.|`'100'`|
41 |`['nagios']['cgi']['use_authentication']`|String||`'1'`|
42 |`['nagios']['web']['Require']`|Array|Apache >= 2.3|`['all granted',]`|
43 |`['nagios']['web']['Order']`|String|Apache < 2.3|`'Allow,Deny'`|
44 |`['nagios']['web']['Deny']`|Array|Apache < 2.3|`[]`|
45 |`['nagios']['web']['Allow']`|Array|Apache < 2.3|`['From All',]`|
46 |`['nagios']['web']['AuthType']`|String|'none' or 'Basic' or 'Kerberos'|`'Basic'`|
47 |`['nagios']['web']['mod_auth_basic']['AuthUserFile']`|String||see default.rb|
48 |`['nagios']['web']['mod_auth_kerb']['KrbAuthRealms']`|String||`'LOCALDOMAIN'`|
49 |`['nagios']['web']['mod_auth_kerb']['KrbServiceName']`|String||`'HTTP'`|
50 |`['nagios']['web']['mod_auth_kerb']['Krb5Keytab']`|String||`'/etc/krb5.keytab'`|
51 |`['nagios']['web']['mod_auth_kerb']['KrbMethodNegotiate']`|String||`'on'`|
52 |`['nagios']['web']['mod_auth_kerb']['KrbMethodK5Passwd']`|String||`'off'`|
53 |`['nagios']['objects']['default_contact_groups']`|String||`'admins'`|
54 |`['nagios']['objects']['check_ldap']['base']`|String||`'dc=example,dc=com'`|
55 |`['nagios']['objects']['commands']`|Array|for full customization.|`[]`|
56 |`['nagios']['objects']['hosts']`|Array|for full customization.|`[]`|
57 |`['nagios']['objects']['hostgroups']`|Array|for full customization.|`[]`|
58 |`['nagios']['objects']['hostdependencies']`|Array|for full customization.|`[]`|
59 |`['nagios']['objects']['hostescalations']`|Array|for full customization.|`[]`|
60 |`['nagios']['objects']['hostextinfos']`|Array|for full customization.|`[]`|
61 |`['nagios']['objects']['services']`|Array|for full customization.|`[]`|
62 |`['nagios']['objects']['servicegroups']`|Array|for full customization.|`[]`|
63 |`['nagios']['objects']['servicedependencies']`|Array|for full customization.|`[]`|
64 |`['nagios']['objects']['serviceescalations']`|Array|for full customization.|`[]`|
65 |`['nagios']['objects']['serviceextinfos']`|Array|for full customization.|`[]`|
66 |`['nagios']['objects']['contacts']`|Array|for full customization.|`[]`|
67 |`['nagios']['objects']['contactgroups']`|Array|for full customization.|`[]`|
68 |`['nagios']['objects']['timeperiods']`|Array|for full customization.|`[]`|
69 |`['nagios']['NagAconda']['version']`|String|for check_ganglia_metric|`'0.1.4'`|
70 |`['nagios']['check_ganglia_metric']['enabled']`|Boolean||`false`|
71 |`['nagios']['check_ganglia_metric']['gmetad_host']`|String||`'localhost'`|
72 |`['nagios']['nrpe']['allowed_hosts']`|String||`'127.0.0.1'`|
73 |`['nagios']['nrpe']['with_smartmontools']`|Boolean||`false`|
74 |`['nagios']['nrpe']['check_total_procs']['warn']`|String||`'100'`|
75 |`['nagios']['nrpe']['check_total_procs']['crit']`|String||`'200'`|
76 |`['nagios']['nrpe']['check_disk#{(0..3)}']['warn']`|String||`'20%'`|
77 |`['nagios']['nrpe']['check_disk#{(0..3)}']['crit']`|String||`'10%'`|
78 |`['nagios']['nrpe']['check_disk#{(0..3)}']['path']`|String||`'/'`|
79 |`['nagios']['nrpe']['check_disk#{(0..3)}']['extra_opts']`|String||`''`|
80 |`['nagios']['nrpe']['check_smart#{(0..3)}']['device']`|String||`'/dev/sda'`|
81 |`['nagios']['nrpe']['check_dig']['host']`|String||`'127.0.0.1'`|
82 |`['nagios']['nrpe']['check_dig']['lookup']`|String||`'host-a.example.com'`|
83 |`['nagios']['nrpe']['check_dig_in']['host']`|String||`'127.0.0.1'`|
84 |`['nagios']['nrpe']['check_dig_in']['lookup']`|String||`'host-b.example.com'`|
85 |`['nagios']['nrpe']['check_dig_ex']['host']`|String||`'127.0.0.1'`|
86 |`['nagios']['nrpe']['check_dig_ex']['lookup']`|String||`'www.google.com'`|
87 |`['nagios']['nrpe']['check_logs']['log_files']`|Array|see default.rb|`[]`|
88
89 ## Usage
90
91 ### nagios-grid::default
92 - does nothing.
93
94 ### nagios-grid::nagios-base
95 - Nagios base installation.
96
97 ### nagios-grid::nagios-nrpe-server
98 - installs Nagios NRPE Server.
99
100 ## License and Authors
101
102 - Author:: whitestar at osdn.jp
103
104 ```text
105 Copyright 2016-2018, whitestar
106
107 Licensed under the Apache License, Version 2.0 (the "License");
108 you may not use this file except in compliance with the License.
109 You may obtain a copy of the License at
110
111     http://www.apache.org/licenses/LICENSE-2.0
112
113 Unless required by applicable law or agreed to in writing, software
114 distributed under the License is distributed on an "AS IS" BASIS,
115 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
116 See the License for the specific language governing permissions and
117 limitations under the License.
118 ```
119
120 ### Plugins
121
122 - check_logs.pl: Copyright (c) 2005 Serge Sergeev, 
123 - check_mem.pl: Copyright (c) 2011 justin at techadvise.com, The MIT License (MIT)
124 - check_smart.pl: This script was created under contract for the US Government and is therefore Public Domain.