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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
|
Only in nagios-plugins-1.3.0/plugins: Makefile
Only in nagios-plugins-1.3.0/plugins: check_by_ssh
Only in nagios-plugins-1.3.0/plugins: check_by_ssh.o
Only in nagios-plugins-1.3.0/plugins: check_dig
Only in nagios-plugins-1.3.0/plugins: check_dig.o
Only in nagios-plugins-1.3.0/plugins: check_disk
diff -u nagios-plugins-1.3.0-orig/plugins/check_disk.c nagios-plugins-1.3.0/plugins/check_disk.c
--- nagios-plugins-1.3.0-orig/plugins/check_disk.c 2003-02-15 13:48:44.000000000 +0100
+++ nagios-plugins-1.3.0/plugins/check_disk.c 2003-05-20 12:51:58.000000000 +0200
@@ -28,6 +28,8 @@
* initailize usp to -1, eliminate 'found' variable
* accept any filename/filesystem
* use sscanf, drop while loop
+ * - Modification by www.datux.nl 2003-01-24
+ * added performance data output
*
*****************************************************************************/
@@ -64,6 +66,9 @@
int total_disk = -1;
int used_disk = -1;
int free_disk = -1;
+ int perf_total_disk = 0;
+ int perf_free_disk = 0;
+ int perf_used_disk = 0;
int result = STATE_UNKNOWN;
int disk_result = STATE_UNKNOWN;
char *command_line = "";
@@ -96,6 +101,7 @@
if (!index (input_buffer, '/'))
continue;
+ /* did we get some usefull output from the 'df' process? */
if (sscanf (input_buffer, "%s %d %d %d %d%% %s", file_system,
&total_disk, &used_disk, &free_disk, &usp, mntp) == 6 ||
sscanf (input_buffer, "%s %*s %d %d %d %d%% %s", file_system,
@@ -118,6 +124,9 @@
free_disk, 100 - usp, display_mntp ? mntp : file_system);
result = max_state (result, disk_result);
+ perf_total_disk+=total_disk;
+ perf_free_disk+=free_disk;
+ perf_used_disk+=used_disk;
}
else {
@@ -147,8 +156,14 @@
else if (result == STATE_UNKNOWN)
printf ("Unable to read output\n%s\n%s\n", command_line, input_buffer);
else
- printf ("DISK %s%s\n", state_text (result), output);
-
+ printf ("DISK %s%s|total=%d,used=%d,free=%d,used_perc=%f,free_perc=%f\n",
+ state_text (result),
+ output,
+ perf_total_disk,
+ perf_used_disk,
+ perf_free_disk,
+ 100-((float)perf_free_disk*100/(float)perf_total_disk),
+ ((float)perf_free_disk*100/(float)perf_total_disk));
return result;
}
Only in nagios-plugins-1.3.0/plugins: check_disk.o
Only in nagios-plugins-1.3.0/plugins: check_dns
Only in nagios-plugins-1.3.0/plugins: check_dns.o
Only in nagios-plugins-1.3.0/plugins: check_dummy
Only in nagios-plugins-1.3.0/plugins: check_dummy.o
Only in nagios-plugins-1.3.0/plugins: check_ftp
Only in nagios-plugins-1.3.0/plugins: check_http
diff -u nagios-plugins-1.3.0-orig/plugins/check_http.c nagios-plugins-1.3.0/plugins/check_http.c
--- nagios-plugins-1.3.0-orig/plugins/check_http.c 2003-02-22 08:22:02.000000000 +0100
+++ nagios-plugins-1.3.0/plugins/check_http.c 2003-05-20 12:51:58.000000000 +0200
@@ -21,6 +21,9 @@
*
* $Id: check_http.c,v 1.24 2003/02/21 21:59:17 tonvoon Exp $
*
+ * Sun Feb 9 17:11:53 CET 2003 Modified by Edwin Eefting (edwin@datux.nl)
+ * fixed performance data: no spaces please :)
+ *
*****************************************************************************/
const char *progname = "check_http";
@@ -795,7 +798,7 @@
else if (onredirect == STATE_CRITICAL)
printf ("HTTP CRITICAL");
elapsed_time = delta_time (tv);
- asprintf (&msg, ": %s - %7.3f second response time %s%s|time=%7.3f\n",
+ asprintf (&msg, ": %s - %7.3f second response time %s%s|time=%f\n",
status_line, elapsed_time, timestamp,
(display_html ? "</A>" : ""), elapsed_time);
terminate (onredirect, msg);
@@ -807,7 +810,7 @@
/* check elapsed time */
elapsed_time = delta_time (tv);
- asprintf (&msg, "HTTP problem: %s - %7.3f second response time %s%s|time=%7.3f\n",
+ asprintf (&msg, "HTTP problem: %s - %7.3f second response time %s%s|time=%f\n",
status_line, elapsed_time, timestamp,
(display_html ? "</A>" : ""), elapsed_time);
if (check_critical_time == TRUE && elapsed_time > critical_time)
@@ -835,14 +838,14 @@
if (strlen (regexp)) {
errcode = regexec (&preg, page, REGS, pmatch, 0);
if (errcode == 0) {
- printf ("HTTP ok: %s - %7.3f second response time %s%s|time=%7.3f\n",
+ printf ("HTTP ok: %s - %7.3f second response time %s%s|time=%f\n",
status_line, elapsed_time,
timestamp, (display_html ? "</A>" : ""), elapsed_time);
exit (STATE_OK);
}
else {
if (errcode == REG_NOMATCH) {
- printf ("HTTP CRITICAL: pattern not found%s|time=%7.3f\n",
+ printf ("HTTP CRITICAL: pattern not found%s|time=%f\n",
(display_html ? "</A>" : ""), elapsed_time);
exit (STATE_CRITICAL);
}
@@ -856,7 +859,7 @@
#endif
/* We only get here if all tests have been passed */
- asprintf (&msg, "HTTP ok: %s - %7.3f second response time %s%s|time=%7.3f\n",
+ asprintf (&msg, "HTTP ok: %s - %7.3f second response time %s%s|time=%f\n",
status_line, (float)elapsed_time,
timestamp, (display_html ? "</A>" : ""), elapsed_time);
terminate (STATE_OK, msg);
Only in nagios-plugins-1.3.0/plugins: check_http.c.rej
Only in nagios-plugins-1.3.0/plugins: check_http.c~
Only in nagios-plugins-1.3.0/plugins: check_http.o
Only in nagios-plugins-1.3.0/plugins: check_imap
Only in nagios-plugins-1.3.0/plugins: check_load
diff -u nagios-plugins-1.3.0-orig/plugins/check_load.c nagios-plugins-1.3.0/plugins/check_load.c
--- nagios-plugins-1.3.0-orig/plugins/check_load.c 2003-02-18 23:16:06.000000000 +0100
+++ nagios-plugins-1.3.0/plugins/check_load.c 2003-05-20 12:51:58.000000000 +0200
@@ -19,6 +19,9 @@
* mods by Ethan Galstad (nagios@nagios.org)
* 08/18/1999 - Integrated some code with common plugin utilities
* mods by Ethan Galstad (nagios@nagios.org)
+ * 20/01/2003 - Now returns performance data
+ * mods by Edwin Eefting (www.DatuX.nl)
+ *
* $Date: 2003/02/18 22:10:55 $
* Note: The load format is the same used by "uptime" and "w"
*
@@ -139,6 +142,10 @@
}
if ((la1 >= wload1) || (la5 >= wload5) || (la15 >= wload15)) {
printf ("WARNING - %s\n", status_line);
+
+ /* performance data */
+ printf ("|load1=%.2f,load5=%.2f,load15=%.2f", la1, la5, la15);
+
return STATE_WARNING;
}
printf ("OK - %s\n", status_line);
Only in nagios-plugins-1.3.0/plugins: check_load.o
Only in nagios-plugins-1.3.0/plugins: check_mrtg
Only in nagios-plugins-1.3.0/plugins: check_mrtg.o
Only in nagios-plugins-1.3.0/plugins: check_mrtgtraf
Only in nagios-plugins-1.3.0/plugins: check_mrtgtraf.o
Only in nagios-plugins-1.3.0/plugins: check_mysql
Only in nagios-plugins-1.3.0/plugins: check_mysql.o
Only in nagios-plugins-1.3.0/plugins: check_nagios
Only in nagios-plugins-1.3.0/plugins: check_nagios.o
Only in nagios-plugins-1.3.0/plugins: check_nntp
Only in nagios-plugins-1.3.0/plugins: check_nt
Only in nagios-plugins-1.3.0/plugins: check_nt.o
Only in nagios-plugins-1.3.0/plugins: check_nwstat
Only in nagios-plugins-1.3.0/plugins: check_nwstat.o
Only in nagios-plugins-1.3.0/plugins: check_overcr
Only in nagios-plugins-1.3.0/plugins: check_overcr.o
Only in nagios-plugins-1.3.0/plugins: check_ping
diff -u nagios-plugins-1.3.0-orig/plugins/check_ping.c nagios-plugins-1.3.0/plugins/check_ping.c
--- nagios-plugins-1.3.0-orig/plugins/check_ping.c 2003-02-15 13:48:45.000000000 +0100
+++ nagios-plugins-1.3.0/plugins/check_ping.c 2003-05-20 12:51:58.000000000 +0200
@@ -8,6 +8,10 @@
*
* $Id: check_ping.c,v 1.11 2003/01/13 12:15:16 kdebisschop Exp $
*
+* updated Mon Jan 20 19:03:57 CET 2003 by Edwin Eefting (DatuX.nl)
+* -minor bugfixes
+* -now returns performance data
+*
*****************************************************************************/
const char *progname = "check_ping";
@@ -18,7 +22,7 @@
#define SUMMARY "Use ping to check connection statistics for a remote host.\n"
#define OPTIONS "\
--H <host_address> -w <wrta>,<wpl>%% -c <crta>,<cpl>%%\n\
+-H <host_address> -w <wrta>,<wpl>% -c <crta>,<cpl>%\n\
[-p packets] [-t timeout] [-L]\n"
#define LONGOPTIONS "\
@@ -135,14 +139,19 @@
state_text (result), warn_text, pl, rta);
if (display_html == TRUE)
printf ("</A>");
- printf ("\n");
+
+ /* print performance data */
+ printf("|loss=%d",pl);
+ if (pl != 100)
+ printf(",rta=%f",rta);
+ printf("\n");
if (verbose)
printf ("%f:%d%% %f:%d%%\n", wrta, wpl, crta, cpl);
return result;
}
-
+
/* process command-line arguments */
int
@@ -340,7 +349,7 @@
if (max_packets == -1)
max_packets = DEFAULT_MAX_PACKETS;
- max_seconds = crta / 1000.0 * max_packets + max_packets;
+ max_seconds = crta / 1000.0 * max_packets + max_packets + 10;
if (max_seconds > timeout_interval)
timeout_interval = (int)max_seconds;
Only in nagios-plugins-1.3.0/plugins: check_ping.o
Only in nagios-plugins-1.3.0/plugins: check_pop
Only in nagios-plugins-1.3.0/plugins: check_procs
diff -u nagios-plugins-1.3.0-orig/plugins/check_procs.c nagios-plugins-1.3.0/plugins/check_procs.c
--- nagios-plugins-1.3.0-orig/plugins/check_procs.c 2003-02-15 13:48:45.000000000 +0100
+++ nagios-plugins-1.3.0/plugins/check_procs.c 2003-05-20 12:51:58.000000000 +0200
@@ -32,6 +32,9 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
+* feb-9-2003 modified by Edwin Eefting (www.DatuX.nl) edwin@datux.nl
+* returns performance data
+*
******************************************************************************/
const char *progname = "check_procs";
@@ -197,6 +200,9 @@
return result;
}
+ //add performance data to "format string"
+ asprintf(&fmt,"%s|procs=%d\n",fmt,procs);
+
if (verbose && (options & STAT))
printf ("%s ", statopts);
if (verbose && (options & PROG))
@@ -427,6 +433,7 @@
options |= STAT;
}
+
return validate_arguments ();
}
@@ -457,10 +464,10 @@
if (options == 0) {
options = 1;
- asprintf (&fmt, "%%s - %%d processes running\n");
+ asprintf (&fmt, "%%s - %%d processes running");
}
else {
- asprintf (&fmt, "%%s - %%d processes running with %s\n", fmt);
+ asprintf (&fmt, "%%s - %%d processes running with %s", fmt);
}
return options;
Only in nagios-plugins-1.3.0/plugins: check_procs.o
Only in nagios-plugins-1.3.0/plugins: check_real
Only in nagios-plugins-1.3.0/plugins: check_real.o
Only in nagios-plugins-1.3.0/plugins: check_smtp
Only in nagios-plugins-1.3.0/plugins: check_smtp.o
Only in nagios-plugins-1.3.0/plugins: check_ssh
Only in nagios-plugins-1.3.0/plugins: check_ssh.o
Only in nagios-plugins-1.3.0/plugins: check_swap
diff -u nagios-plugins-1.3.0-orig/plugins/check_swap.c nagios-plugins-1.3.0/plugins/check_swap.c
--- nagios-plugins-1.3.0-orig/plugins/check_swap.c 2003-02-18 06:35:52.000000000 +0100
+++ nagios-plugins-1.3.0/plugins/check_swap.c 2003-05-20 14:02:11.000000000 +0200
@@ -23,6 +23,9 @@
*
* $Id: check_swap.c,v 1.9 2003/02/18 03:46:15 sghosh Exp $
*
+ * feb 9 2003 - Modified by Edwin Eefting (www.DatuX.nl) edwin@datux.nl
+ * Returns performance data
+ *
*****************************************************************************/
#include "common.h"
@@ -51,7 +54,7 @@
int
main (int argc, char **argv)
{
- int percent_used, percent;
+ float percent_used, percent;
long unsigned int total_swap = 0, used_swap = 0, free_swap = 0;
long unsigned int total, used, free;
int result = STATE_OK;
@@ -93,8 +96,8 @@
result = max_state (STATE_CRITICAL, result);
else if (percent_used >= warn_percent || free_swap <= warn_size)
result = max_state (STATE_WARNING, result);
- asprintf (&status, "%s %2d%% (%lu out of %lu)", status, percent_used,
- used_swap, total_swap);
+ asprintf (&status, "%s %2.0f%% (%lu out of %lu)|user_perc=%f,user=%d,total=%d", status, percent_used,
+ used_swap, total_swap, percent_used, used_swap, total_swap);
fclose (fp);
#else
#ifdef HAVE_SWAP
@@ -146,8 +149,8 @@
result = max_state (STATE_CRITICAL, result);
else if (percent_used >= warn_percent || free_swap <= warn_size)
result = max_state (STATE_WARNING, result);
- asprintf (&status, "%s %2d%% (%lu out of %lu)",
- status, percent_used, used_swap, total_swap);
+ asprintf (&status, "%s %2.0f%% (%lu out of %lu)|used_perc=%f,user=%d,total=%d",
+ status, percent_used, used_swap, total_swap, percent_used, used_swap, total_swap);
/* If we get anything on STDERR, at least set warning */
while (fgets (input_buffer, MAX_INPUT_BUFFER - 1, child_stderr))
Only in nagios-plugins-1.3.0/plugins: check_swap.c.rej
Only in nagios-plugins-1.3.0/plugins: check_swap.c~
Only in nagios-plugins-1.3.0/plugins: check_swap.o
Only in nagios-plugins-1.3.0/plugins: check_tcp
Only in nagios-plugins-1.3.0/plugins: check_tcp.o
Only in nagios-plugins-1.3.0/plugins: check_time
Only in nagios-plugins-1.3.0/plugins: check_time.o
Only in nagios-plugins-1.3.0/plugins: check_udp
Only in nagios-plugins-1.3.0/plugins: check_udp.o
Only in nagios-plugins-1.3.0/plugins: check_ups
Only in nagios-plugins-1.3.0/plugins: check_ups.o
Only in nagios-plugins-1.3.0/plugins: check_users
diff -u nagios-plugins-1.3.0-orig/plugins/check_users.c nagios-plugins-1.3.0/plugins/check_users.c
--- nagios-plugins-1.3.0-orig/plugins/check_users.c 2003-02-15 13:48:46.000000000 +0100
+++ nagios-plugins-1.3.0/plugins/check_users.c 2003-05-20 12:51:58.000000000 +0200
@@ -42,6 +42,9 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
+ * feb-9-2003 modified by Edwin Eefting (www.DatuX.nl) edwin@datux.nl
+ * returns performance data
+ *
*****************************************************************************/
#include "common.h"
@@ -120,8 +123,8 @@
if (result == STATE_UNKNOWN)
printf ("Unable to read output\n");
else
- printf ("USERS %s - %d users currently logged in\n", state_text (result),
- users);
+ printf ("USERS %s - %d users currently logged in|users=%d\n", state_text (result),
+ users,users);
return result;
}
Only in nagios-plugins-1.3.0/plugins: check_users.o
Only in nagios-plugins-1.3.0/plugins: check_vsz
Only in nagios-plugins-1.3.0/plugins: check_vsz.o
Only in nagios-plugins-1.3.0/plugins: common.h
Only in nagios-plugins-1.3.0/plugins: config.h
Only in nagios-plugins-1.3.0/plugins: negate
Only in nagios-plugins-1.3.0/plugins: negate.o
Only in nagios-plugins-1.3.0/plugins: netutils.h
Only in nagios-plugins-1.3.0/plugins: netutils.o
Only in nagios-plugins-1.3.0/plugins: perf.patch
Only in nagios-plugins-1.3.0/plugins: popen.h
Only in nagios-plugins-1.3.0/plugins: popen.o
Only in nagios-plugins-1.3.0/plugins: stamp-h1
Only in nagios-plugins-1.3.0/plugins: stamp-h2
Only in nagios-plugins-1.3.0/plugins: stamp-h3
Only in nagios-plugins-1.3.0/plugins: stamp-h4
Only in nagios-plugins-1.3.0/plugins: stamp-h5
Only in nagios-plugins-1.3.0/plugins: stamp-h6
Common subdirectories: nagios-plugins-1.3.0-orig/plugins/t and nagios-plugins-1.3.0/plugins/t
Only in nagios-plugins-1.3.0/plugins: urlize
Only in nagios-plugins-1.3.0/plugins: urlize.o
Only in nagios-plugins-1.3.0/plugins: utils.h
Only in nagios-plugins-1.3.0/plugins: utils.o
Only in nagios-plugins-1.3.0/plugins: version.h
|