diff options
author | Holger Weiss <holger@zedat.fu-berlin.de> | 2013-10-04 22:56:26 (GMT) |
---|---|---|
committer | Holger Weiss <holger@zedat.fu-berlin.de> | 2013-10-04 22:56:26 (GMT) |
commit | 84c4a5d24cbef536b8248a3d8ff72bb2b4248c29 (patch) | |
tree | aa5eaf24f84315ea5fa143bf287c9fcf7857391f /web/content/doc/extra-opts.md | |
parent | 45d3e695be499cf9f9956c223883073fc20d48b4 (diff) | |
download | site-84c4a5d24cbef536b8248a3d8ff72bb2b4248c29.tar.gz |
Add test instance of the web site
Serve https://www.nagios-plugins.org:444/ from the "test" branch of this
repository.
Diffstat (limited to 'web/content/doc/extra-opts.md')
-rw-r--r-- | web/content/doc/extra-opts.md | 72 |
1 files changed, 0 insertions, 72 deletions
diff --git a/web/content/doc/extra-opts.md b/web/content/doc/extra-opts.md deleted file mode 100644 index 542c199..0000000 --- a/web/content/doc/extra-opts.md +++ /dev/null | |||
@@ -1,72 +0,0 @@ | |||
1 | title: Extra-Opts | ||
2 | parent: Documentation | ||
3 | --- | ||
4 | |||
5 | # Extra-Opts | ||
6 | |||
7 | Starting with the 1.4.12 release, Nagios C plugins support reading | ||
8 | configuration options from a configuration file. This needs to be enabled at | ||
9 | compile-time for now (`--enable-extra-opts`) and will be enabled by default in | ||
10 | the future. Perl plugins using the Nagios::Plugin module have this support | ||
11 | since version 0.16. | ||
12 | |||
13 | You can easily know if a plugin supports *extra-opts* by checking the `--help` | ||
14 | output for the `--extra-opts` option. Once compiled in, the `--extra-opts` | ||
15 | plugin option allows reading extra options from a config file. The syntax for | ||
16 | the command is: | ||
17 | |||
18 | --extra-opts=[section][@file] | ||
19 | |||
20 | Some examples: | ||
21 | |||
22 | * Read `special_opts` section of default config file: | ||
23 | |||
24 | ./check_stuff --extra-opts=special_opts | ||
25 | |||
26 | * Read `special_opts` section of `/etc/myconfig.ini`: | ||
27 | |||
28 | ./check_stuff --extra-opts=special_opts@/etc/myconfig.ini | ||
29 | |||
30 | * Read `check_stuff` section of `/etc/myconfig.ini`: | ||
31 | |||
32 | ./check_stuff --extra-opts=@/etc/myconfig.ini | ||
33 | |||
34 | * Read `check_stuff` section of default config file and use additional | ||
35 | arguments along with the other specified arguments (*extra-opts* arguments | ||
36 | are always processed first no matter where `--extra-opts` appears on the | ||
37 | command line): | ||
38 | |||
39 | ./check_stuff --extra-opts -jk --some-other-opt | ||
40 | |||
41 | The default nagios plugins file is used if no explicit filename is given. The | ||
42 | current standard locations checked are: | ||
43 | |||
44 | * `/etc/nagios/plugins.ini` | ||
45 | * `/usr/local/nagios/etc/plugins.ini` | ||
46 | * `/usr/local/etc/nagios/plugins.ini` | ||
47 | * `/etc/opt/nagios/plugins.ini` | ||
48 | * `/etc/nagios-plugins.ini` | ||
49 | * `/usr/local/etc/nagios-plugins.ini` | ||
50 | * `/etc/opt/nagios-plugins.ini` | ||
51 | |||
52 | To use a custom location, set a `NAGIOS_CONFIG_PATH` environment variable to | ||
53 | the set of directories that should be checked (this is a colon-separated list | ||
54 | just like `PATH`). The first `plugins.ini` or `nagios-plugins.ini` file found | ||
55 | in these directories will be used. | ||
56 | |||
57 | To specify an option without parameter, you can use a key without value, but | ||
58 | the equal sign must remain, for example: | ||
59 | |||
60 | allow-regex= | ||
61 | |||
62 | Also note that repeated keys are allowed within sections just like you can | ||
63 | repeat arguments on the command line. | ||
64 | |||
65 | The basic theory is that options specified in the configuration files are | ||
66 | substituted at the beginning of the command line. | ||
67 | |||
68 | The initial use case for this functionality is for hiding passwords, so you do | ||
69 | not have to define sensitive credentials in the Nagios configuration and these | ||
70 | options won't appear in the command line. | ||
71 | |||
72 | <!--% # vim:set filetype=markdown textwidth=78 joinspaces: # %--> | ||