]> gitweb.michael.orlitzky.com - nagios-mode.git/blob - README
b39a1b929fa9a4d4e1f6e9d7017e753407b3a358
[nagios-mode.git] / README
1 == What this is ==
2
3 Nagios-mode is an Emacs mode for editing Nagios configuration
4 files. Nagios is monitoring software that is configured via plain-text
5 (*.cfg) files. Those configuration files have a C-like syntax, and a
6 bunch of special keywords. Witin Emacs, nagios-mode will apply syntax
7 highlighting to them, possibly alerting you to the fact that you have
8 done something wrong, and making your buffers look pretty in any case.
9
10
11 == How to install it ==
12
13 Stick nagios-mode.el somewhere, and add that place to your Emacs load
14 path. For example,
15
16 (setq load-path
17 (append (list "~/.home/emacs/modes/nagios-mode/")
18 load-path))
19
20 is how I do it. With that in your load path, you just have to add
21 nagios-mode to your auto-load list,
22
23 (autoload 'nagios-mode "nagios-mode" nil t)
24
25 And tell Emacs to use it automatically when editing *.cfg files,
26
27 (setq auto-mode-alist
28 (append (list '("\\.cfg$" . nagios-mode))
29 auto-mode-alist))
30
31 which works great so long as you don't work with any other *.cfg files
32 that have a different syntax.
33
34
35 == How it works ==
36
37 The macros and object definitions are parsed from the Nagios source
38 code. Object definitions are found within xdata/xodtemplate.h, while
39 the macros are cleverly hidden within include/macros.h. Once they have
40 been parsed, they are cut and pasted in to nagios-mode.el.
41
42 The directives are a bit tricker. They too are parsed from the Nagios
43 source (xdata/xodtemplate.c), but not all of the names map nicely to
44 internal C variables, so there's no explicit list of them. Instead we
45 try to piece together the valid names based on what Nagios's config
46 parser is looking for. It's possible that some have been overlooked.
47
48 The helper scripts for this can be found in the "utils" directory.
49
50
51 == Bugs et cetera ==
52
53 Send all bug reports, feature requests, and unprompted criticism to
54 michael@orlitzky.com.