source: nscp/trunk/docs/CheckHelpers/index.html @ 7da80b5

Last change on this file since 7da80b5 was 7da80b5, checked in by Michael Medin <michael@…>, 8 years ago

2005-05-23 MickeM

+ Added obfuscated password support
+ Added some more debug info on commands (returncode, and input args)
+ Added some more comments ot the NSC.ini
+ Added central password "override"
+ Added central "host override"
+ Fixed bug with external commands always getting WARNING state

2005-05-22 MickeM

+ Added debug outout for command
+ Added timestamps for log-to-file (date_mask to configure format)
+ Added support for "no password" with check_nt
+ Added log of bad password on NSClient requests.

  • Some threading issues fixed (I hate threading :)
  • Property mode set to 100644
File size: 6.0 KB
Line 
1<html>
2
3<head>
4<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
5<meta http-equiv="Content-Language" content="en-us">
6<title>CheckDisk</title>
7<link rel="stylesheet" type="text/css" href="../nscplus.css">
8<base target="_self">
9</head>
10
11<body>
12
13<div id="content" class="documentContent">
14        <h1>CheckHelpers.dll</h1>
15        <p>The CheckHelpers module has various helper function to alter other checks
16        in various ways. This module does not check anything by it self.</p>
17        <table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" id="table4">
18                <tr>
19                        <th valign="top">Command </th>
20                        <th valign="top">Description </th>
21                </tr>
22                <tr>
23                        <td valign="top">CheckAlwaysOK</td>
24                        <td valign="top">Alter the return code of another check to always return
25                        OK.</td>
26                </tr>
27                <tr>
28                        <td valign="top">CheckAlwaysCRITICAL</td>
29                        <td valign="top">Alter the return code of another check to always return
30                        CRITICAL.</td>
31                </tr>
32                <tr>
33                        <td valign="top">CheckAlwaysWARNING</td>
34                        <td valign="top">Alter the return code of another check to always return
35                        WARNING.</td>
36                </tr>
37                <tr>
38                        <td valign="top">CheckMultiple</td>
39                        <td valign="top">Runs multiple checks and returns the worst state. Useful
40                        for minimizing network traffic and command definitions.</td>
41                </tr>
42        </table>
43        <h2>Configuration</h2>
44        <p><i>This module has no configuration directives.</i></p>
45        <h2>CheckAlwaysOK</h2>
46        <p>Runs another check and alters the return state to always return OK.</p>
47        <table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" id="table5">
48                <tr>
49                        <th valign="top">Option </th>
50                        <th valign="top">Values </th>
51                        <th valign="top">Description </th>
52                </tr>
53                <tr>
54                        <td valign="top"><i>None</i></td>
55                        <td valign="top"><i>None</i></td>
56                        <td valign="top"><i>None</i></td>
57                </tr>
58        </table>
59        <p>This command has no options instead everything is inject as a new command.
60        Notice that this command does not alter the return string so if a check (as
61        most do) prints WARNING that will still remain, only the return state is altered.
62        The return state is what Nagios will use to determine state.</p>
63        <h3>Examples</h3>
64        <div class="example">
65                <ul>
66                        <li>
67                        <p>Run the sample check from CheckDisk but alter the return state. Notice
68                        that WARNING is still printed, yet Nagios will interpret this as an
69                        OK state.</p>
70                        <p><code>CheckAlwaysOK CheckFileSize ShowAll MaxWarn=1024M MaxCrit=4096M
71                        File:WIN=c:\WINDOWS\*.*</code></p>
72                        <p><code>WARNING: WIN: 2G (2325339822B)|WIN=2325339822;1073741824;4294967296</code></p>
73                        </li>
74                </ul>
75        </div>
76        <h2>CheckAlwaysCRITICAL</h2>
77        <p>Runs another check and alters the return state to always return CRITICAL.</p>
78        <table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" id="table5">
79                <tr>
80                        <th valign="top">Option </th>
81                        <th valign="top">Values </th>
82                        <th valign="top">Description </th>
83                </tr>
84                <tr>
85                        <td valign="top"><i>None</i></td>
86                        <td valign="top"><i>None</i></td>
87                        <td valign="top"><i>None</i></td>
88                </tr>
89        </table>
90        <p>This command has no options instead everything is inject as a new command.
91        Notice that this command does not alter the return string so if a check (as
92        most do) prints WARNING that will still remain, only the return state is altered.
93        The return state is what Nagios will use to determine state.</p>
94        <h3>Examples</h3>
95        <div class="example">
96                <ul>
97                        <li>
98                        <p>Run the sample check from CheckDisk but alter the return state. Notice
99                        that WARNING is still printed, yet Nagios will interpret this as a critical
100                        state.</p>
101                        <p><code>CheckAlwaysCRITICAL CheckFileSize ShowAll MaxWarn=1024M MaxCrit=4096M
102                        File:WIN=c:\WINDOWS\*.*</code></p>
103                        <p><code>WARNING: WIN: 2G (2325339822B)|WIN=2325339822;1073741824;4294967296</code></p>
104                        </li>
105                </ul>
106        </div>
107        <h2>CheckAlwaysWARNING</h2>
108        <p>Runs another check and alter the return state to always return WARNING.</p>
109        <table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" id="table5">
110                <tr>
111                        <th valign="top">Option </th>
112                        <th valign="top">Values </th>
113                        <th valign="top">Description </th>
114                </tr>
115                <tr>
116                        <td valign="top"><i>None</i></td>
117                        <td valign="top"><i>None</i></td>
118                        <td valign="top"><i>None</i></td>
119                </tr>
120        </table>
121        <p>This command has no options instead everything is inject as a new command.
122        Notice that this command does not alter the return string so if a check (as
123        most do) prints WARNING that will still remain, only the return state is altered.
124        The return state is what Nagios will use to determine state.</p>
125        <h3>Examples</h3>
126        <div class="example">
127                <ul>
128                        <li>
129                        <p>Run the sample check from CheckDisk but alter the return state. Notice
130                        that WARNING is still printed, yet Nagios will interpret this as an
131                        warning state.</p>
132                        <p><code>CheckAlwaysOK CheckFileSize ShowAll MaxWarn=1024M MaxCrit=4096M
133                        File:WIN=c:\WINDOWS\*.*</code></p>
134                        <p><code>WARNING: WIN: 2G (2325339822B)|WIN=2325339822;1073741824;4294967296</code></p>
135                        </li>
136                </ul>
137        </div>
138        <h2>CheckMultiple</h2>
139        <p>Runs multiple checks and returns the worst state. It allows you to check
140        an entire system in one go.</p>
141        <table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" id="table5">
142                <tr>
143                        <th valign="top">Option </th>
144                        <th valign="top">Values </th>
145                        <th valign="top">Description </th>
146                </tr>
147                <tr>
148                        <td valign="top">command</td>
149                        <td valign="top">The command to run</td>
150                        <td valign="top">A command to execute, you can have any number of this
151                        option.</td>
152                </tr>
153        </table>
154        <h3>Examples</h3>
155        <div class="example">
156                <ul>
157                        <li>
158                        <p>Run two checks (CheckDriveSize and ChEckMeM) and return the worst
159                        state. Performance data and message is collected and concatenated.</p>
160                        <p><code>CheckMultiple command=CheckDriveSize MaxWarn=1M MaxCrit=2M
161                        Drive=c:\\volumne_test\\ command=ChEckMeM MaxWarn=80% MaxCrit=90%</code></p>
162                        <p><code>CRITICAL: c:\volumne_test\: 3M (4193280B) &gt; critical, OK memory
163                        within bounds.|c:\volumne_test\=4193280;1024K (1048576B);2M (2097152B);
164                        page=31% 80%;90%;</code></p>
165                        </li>
166                </ul>
167        </div>
168</div>
169
170</body>
171
172</html>
Note: See TracBrowser for help on using the repository browser.