-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
81 lines (64 loc) · 3.58 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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
README for mkncf
modified by: Job Snijders <[email protected]>
author of mkncf-0.4: Alexander Schreiber <[email protected]>
Copyright (C) 2011 by Job Snijders <[email protected]>
Copyright (C) 2003 by Alexander Schreiber <[email protected]>
mkncf - MaKe Nagios Configuration Files
---------------------------------------
The basic idea of mkncf is to simplify the maintenance of Nagios configuration
files. So, instead of copy-pasting and old section and editing it to add
a new host or service, you add/edit a single line in a definition file,
type "make", reload Nagios and are done. How does that sound? ;-)
Basic concept:
--------------
Currently, mkncf generates the following files for Nagios:
- hosts.cfg - the host configuration (which hosts are to be monitored),
- services.cfg - the services configuration (which services should be
monitored),
- hostextinfo.cfg - extended host info (icons for the web interface, longer
descriptions of host, ...)
These are generated from several files:
- hosts.cfg is generated from
- hosts.base - this file is included at the head of the newly generated
hosts.cfg and basically contains the default host entry
template,
- hosts.def - contains the hosts definitions: host_name, IP address,
(list of) parent node(s), short description; one line
per host, entries separated by semicolons,
- hostextinfo.cfg is generated from
- hostextinfo.def - contains the extended host information: host_name,
URL to host page, basename (dir/filename without
extension) to image file (is supposed to exist
as .gif, .gd2, .jpg), the x/y coordinates for the
status map display and the host description for it
- services.cfg is generated from
- services.base - this file is included at the head of the newly generated
services.cfg and basically contains the default service
entry template,
- services_contacts.def - service contact information: whom to pester in
case of trouble, uses the contact definitions
from Nagios,
- services_checks.def - service check definitions: name and definition
for service checks, name cannot contain spaces
- services.def - which services to check on each host, one line per host
Consistency and error checking
------------------------------
mkncf performs basic consistency checks while loading the .def files and
generating the .cfg files, but before writing anything out. So, if you
messed up your .def files, chances are that mkncf will the most obvious
errors (like missing definitions) and will _not_ produce fucked up
.cfg files for Nagios. The consistency checks are basically aimed at
catching missing configuration entries or catching very obviously invalid
values (like using letters as pixel positions).
It is , however, strongly recommend to use the provided Makefile for mkncf,
espcially the "check" target to use Nagios to validate your generated
.cfg files.
IPv6 / Dual Stack support
-------------------------
This version of mkncf is meant to be run in conjunction with nagios3 and
the "Add IPv6 address to host definition" patch which can be found here:
http://exchange.nagios.org/directory/Patches/Nagios/Add-IPv6-address-to-host-definition/details
or here: http://snijders-it.nl/stuff/nagios-3.2.3-ipv6.patch
License:
--------
This software is distributed under the GNU General Public License (GPL).