Update upstream source from tag 'upstream/4.3.29_r8060'
Update to upstream version '4.3.29~r8060'
with Debian dir fc355bfb19e8add0d41dd4d7a9020f22c73f38bf
Axel Beckert
5 years ago
0 | syntax:glob | |
1 | debian/hobbit | |
2 | debian/hobbit-client | |
3 | debian/xymon | |
4 | debian/xymon-client | |
5 | debian/files | |
6 | debian/*.debhelper | |
7 | debian/*.debhelper.log | |
8 | debian/*.substvars | |
9 | build-stamp | |
10 | stamp-patched | |
11 | .pc | |
12 | *~ |
22 | 22 | Tom Georgoulias |
23 | 23 | Laurent Grilli |
24 | 24 | Kevin Hanrahan |
25 | John Horne | |
25 | 26 | Malcolm Hunter |
26 | 27 | Knud Højgaard |
27 | 28 | Asif Iqbal |
0 | Changes from 4.3.28 -> 4.3.29 () | |
1 | =========================================== | |
2 | ||
3 | * rev | |
4 | ||
5 | * Deal with Set-Cookie deprecation on normal pages (Thanks, Erik Schminke) | |
6 | * Support glibc->tirpc migration on newer distributions | |
7 | * Fix certain flags not being set on GCC 8/9 | |
8 | * Fix wrong doc for --merge-clientlocal option (Thanks, Thomas Eckert) | |
9 | * Fix CSP errors on trends pages (Thanks, John Thurston) | |
10 | * Accept minimum libcares version >= 1.5.1; update bundled to 1.15.0 | |
11 | * Fix RRD parsing for recent netstat (net-tools) on Linux | |
12 | * Ensure Content-Type always set in HTML headers (Thanks, Christoph Berg) | |
13 | * Ignore additional common tmpfs partitions on recent Linux | |
14 | * Fix NONETPAGE parsing (Thanks, John Horne) | |
15 | * Increase hard max xymon message size from 10MB to 64MB to match 4.4-alpha | |
16 | * Fix line-off-by-one error in logfetch retrieval when triggers are used | |
17 | (Thanks, Toshimitsu FUJIWARA) | |
18 | * Fixes to do_temperature parsing (Thanks, Michael Pins) | |
19 | * Add support for GNU Hurd and GNU/kFreeBSD | |
20 | * Don't require apache authz_groupfile module by default when not needed | |
21 | * Add --no-cpu-listing option to xymond_client to block 'top' output in | |
22 | cpu test (Thanks, John Horne) | |
23 | * Double-quote the display name of host titles handed to RRD | |
24 | * Ensure NTP checks not hung for unreachable hosts (Thanks, Tom Schmidt) | |
25 | ||
26 | ||
0 | 27 | Changes from 4.3.27 -> 4.3.28 (17 Jan 2017) |
1 | 28 | =========================================== |
2 | 29 |
0 | 0 | <<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>> |
1 | * * * Release notes for Xymon 4.3.28 * * * | |
1 | * * * Release notes for Xymon 4.3.29 * * * | |
2 | 2 | <<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>> |
3 | 3 | |
4 | 4 | |
7 | 7 | |
8 | 8 | For a full list of changes and enhancements, please see the |
9 | 9 | Changes file. |
10 | ||
11 | ||
12 | Changes for 4.3.29 | |
13 | ================== | |
14 | ||
15 | On Linux, a few additional tmpfs volumes are ignored by default | |
16 | on new (or unmodified) installs. This includes /run/user/<uid>, | |
17 | which is a transient, per-session tmpfs on some systems. To re- | |
18 | enable monitoring for this (if you are running services under | |
19 | a user with a login session), you may need to edit the analysis.cfg(5) | |
20 | file. | |
21 | ||
22 | After upgrade, these partitions will no longer be alerted on or | |
23 | tracked, and their associated RRD files may also be removed: | |
24 | ||
25 | /run/user/<uid> (but NOT /run) | |
26 | /dev (but NOT /dev/shm) | |
27 | /sys/fs/cgroup | |
28 | /lib/init/rw | |
29 | ||
30 | ||
31 | The default hard limit for an incoming message has been raised from | |
32 | 10MB to 64MB | |
33 | ||
34 | The secure apache config snippet no longer requires a xymongroups file | |
35 | to be present (and module loaded), since it's not used by default. This | |
36 | will not affect existing installs. | |
37 | ||
38 | A --no-cpu-listing option has been added to xymond_client to suppress the | |
39 | 'top' output in cpu test status messages. | |
10 | 40 | |
11 | 41 | |
12 | 42 | Changes for 4.3.28 |
0 | # Xymon compile-time settings for GNU (Hurd) systems | |
1 | ||
2 | OSDEF = -DLINUX | |
3 | ||
4 | # NETLIBS: None needed | |
5 | NETLIBS = | |
6 | ||
7 | # Compile flags for normal build | |
8 | CC = gcc | |
9 | CFLAGS += -g -O2 -Wall -Wno-unused -D_REENTRANT $(LFSDEF) $(OSDEF) | |
10 | ||
11 | ifndef PKGBUILD | |
12 | RPATH = -Wl,--rpath, | |
13 | endif | |
14 | ||
15 | # Compile flags for debugging | |
16 | # CFLAGS = -g -DDEBUG -Wall -D_REENTRANT $(LFSDEF) $(OSDEF) | |
17 | ||
18 | # For profiling | |
19 | # CFLAGS = -g -pg -Wall -D_REENTRANT $(LFSDEF) $(OSDEF) | |
20 | # Note: Do 'export GMON_OUT_PREFIX=/var/tmp/FILENAME' to save profiling output in /var/tmp | |
21 | # Use gprof to analyse | |
22 | ||
23 | # By default, Xymon uses a static library for common code. | |
24 | # To save some diskspace and run-time memory, you can use a | |
25 | # shared library by un-commenting this. | |
26 | # XYMONLIBRARY=libxymon.so | |
27 | ||
28 | # Mail program: This must support "CMD -s SUBJECT ADDRESS" to send out a mail with a subject | |
29 | # Typically, this will be "mail" or "mailx" | |
30 | MAILPROGRAM="mail" | |
31 |
0 | # Xymon compile-time settings for GNU/kFreeBSD systems | |
1 | ||
2 | OSDEF = | |
3 | ||
4 | # NETLIBS: None needed | |
5 | NETLIBS = | |
6 | ||
7 | # Compile flags for normal build | |
8 | CC = gcc | |
9 | CFLAGS += -g -O2 -Wall -Wno-unused -D_REENTRANT $(LFSDEF) $(OSDEF) | |
10 | ||
11 | ifndef PKGBUILD | |
12 | RPATH = -Wl,--rpath, | |
13 | endif | |
14 | ||
15 | # Compile flags for debugging | |
16 | # CFLAGS = -g -DDEBUG -Wall -D_REENTRANT $(LFSDEF) $(OSDEF) | |
17 | ||
18 | # For profiling | |
19 | # CFLAGS = -g -pg -Wall -D_REENTRANT $(LFSDEF) $(OSDEF) | |
20 | # Note: Do 'export GMON_OUT_PREFIX=/var/tmp/FILENAME' to save profiling output in /var/tmp | |
21 | # Use gprof to analyse | |
22 | ||
23 | # By default, Xymon uses a static library for common code. | |
24 | # To save some diskspace and run-time memory, you can use a | |
25 | # shared library by un-commenting this. | |
26 | # XYMONLIBRARY=libxymon.so | |
27 | ||
28 | # Mail program: This must support "CMD -s SUBJECT ADDRESS" to send out a mail with a subject | |
29 | # Typically, this will be "mail" or "mailx" | |
30 | MAILPROGRAM="mail" | |
31 |
1 | 1 | |
2 | 2 | OSDEF = -DLINUX |
3 | 3 | |
4 | # NETLIBS: None needed on Linux | |
5 | NETLIBS = | |
4 | # NETLIBS: Use replacement rpc | |
5 | NETLIBS = -ltirpc | |
6 | 6 | |
7 | 7 | # Compile flags for normal build |
8 | 8 | CC = gcc |
9 | GCCVER := $(shell gcc -dumpversion|cut -d. -f1) | |
10 | ifeq ($(GCCVER),4) | |
11 | CFLAGS = -g -O2 -Wall -Wno-unused -Wno-pointer-sign -D_REENTRANT $(LFSDEF) $(OSDEF) | |
9 | GCCVER := $(shell test 0`gcc -dumpversion|cut -d. -f1` -ge 4 && echo yes) | |
10 | ifeq ($(GCCVER),yes) | |
11 | CFLAGS = -g -O2 -Wall -Wno-unused -I/usr/include/tirpc -Wno-pointer-sign -D_REENTRANT $(LFSDEF) $(OSDEF) | |
12 | 12 | else |
13 | CFLAGS = -g -O2 -Wall -Wno-unused -D_REENTRANT $(LFSDEF) $(OSDEF) | |
13 | CFLAGS = -g -O2 -Wall -Wno-unused -I/usr/include/tirpc -D_REENTRANT $(LFSDEF) $(OSDEF) | |
14 | 14 | endif |
15 | 15 | |
16 | 16 | ifndef PKGBUILD |
50 | 50 | INSTALLWWWDIR = $(XYMONHOME)/www |
51 | 51 | endif |
52 | 52 | |
53 | ARESVER = 1.12.0 | |
53 | MINARESVER = 1.5.1 | |
54 | ARESVER = 1.15.0 | |
54 | 55 | FPINGVER = 3.0 |
55 | 56 | |
56 | 57 | IDTOOL := $(shell if test `uname -s` = "SunOS"; then echo /usr/xpg4/bin/id; else echo id; fi) |
4 | 4 | @$(CC) $(CFLAGS) $(CARESINC) -o test-cares.o -c test-cares.c |
5 | 5 | |
6 | 6 | test-link: |
7 | @$(CC) $(CFLAGS) $(CARESLIB) -o test-cares test-cares.o -lcares && ./test-cares $(ARESVER) | |
7 | @$(CC) $(CFLAGS) $(CARESLIB) -o test-cares test-cares.o -lcares && ./test-cares $(MINARESVER) | |
8 | 8 | |
9 | 9 | ares-clean: |
10 | 10 | @rm -f test-cares.o test-cares |
7 | 7 | |
8 | 8 | #ifndef PATH_MAX |
9 | 9 | res = pathconf("/", _PC_PATH_MAX); |
10 | if (res == -1) res = 4096; | |
10 | 11 | printf("#define PATH_MAX %ld\n", res); |
11 | 12 | #endif |
12 | 13 |
11 | 11 | /* */ |
12 | 12 | /*----------------------------------------------------------------------------*/ |
13 | 13 | |
14 | static char rcsid[] = "$Id: logfetch.c 7982 2016-11-05 19:02:06Z jccleaver $"; | |
14 | static char rcsid[] = "$Id: logfetch.c 8046 2019-04-09 09:33:47Z jccleaver $"; | |
15 | 15 | |
16 | 16 | #include <sys/types.h> |
17 | 17 | #include <sys/stat.h> |
18 | 18 | #include <sys/time.h> |
19 | 19 | #include <stdio.h> |
20 | #include <stdint.h> | |
20 | 21 | #include <string.h> |
21 | 22 | #include <unistd.h> |
22 | 23 | #include <stdlib.h> |
319 | 320 | |
320 | 321 | /* Mark where we left off */ |
321 | 322 | bytesin += strlen(fillpos); |
322 | if (!curpos && (bytesin >= bytestocurrent)) { | |
323 | if (!curpos && (bytesin > bytestocurrent)) { | |
323 | 324 | char *t; |
324 | 325 | |
325 | 326 | dbgprintf(" - Last position was %u, found curpos location at %u in current buffer.\n", logdef->lastpos[1], bytesin); |
367 | 368 | if (force_trigger) { |
368 | 369 | /* Oops. We actually wanted this line poked through */ |
369 | 370 | /* At the moment, we're only entering this state when we've added 'CURRENT\n' to the existing line */ |
370 | /* Since we're guaranteeing to downstream users that we're ignoring this, just truncate the line */ | |
371 | /* to the first newline. If we start using force_trigger for other purposes, we might have to change */ | |
371 | /* Since we're guaranteeing to downstream users that we're ignoring this, just skip the line */ | |
372 | /* until the first newline. If we start using force_trigger for other purposes, we might have to change */ | |
372 | 373 | /* the logic here. */ |
373 | 374 | char *eoln; |
374 | 375 | |
375 | eoln = strchr(fillpos, '\n'); if (eoln) *++eoln = '\0'; // still need the final newline | |
376 | eoln = strchr(fillpos, '\n'); if (eoln && *(eoln + 1)) fillpos = eoln + 1; // skip first line | |
376 | 377 | } |
377 | 378 | else if (match) continue; |
378 | 379 | } |
0 | 0 | #!/bin/sh |
1 | 1 | |
2 | 2 | # Configure script for Xymon client |
3 | # $Id: configure.client 7426 2014-02-11 08:18:25Z storner $ | |
3 | # $Id: configure.client 8052 2019-04-22 18:20:02Z jccleaver $ | |
4 | 4 | |
5 | 5 | echo "" |
6 | 6 | echo "Configuration script for Xymon client" |
193 | 193 | echo "LIBRTDEF = $LIBRTDEF" >>Makefile |
194 | 194 | |
195 | 195 | echo "" >>Makefile |
196 | if test -r build/Makefile.`uname -s` | |
197 | then | |
198 | echo "include build/Makefile.`uname -s`" >>Makefile | |
199 | echo "" | |
200 | echo "Using `uname -s` Makefile settings" | |
196 | if test -r build/Makefile.`uname -s | tr '/' '_'` | |
197 | then | |
198 | echo "include build/Makefile.`uname -s | tr '/' '_'`" >>Makefile | |
199 | echo "" | |
200 | echo "Using `uname -s | tr '/' '_'` Makefile settings" | |
201 | 201 | echo "" |
202 | 202 | else |
203 | 203 | echo "include build/Makefile.generic" >>Makefile |
204 | 204 | echo "" |
205 | echo "Using GENERIC Makefile settings" | |
205 | echo "Using GENERIC Makefile settings (uname -s is `uname -s`)" | |
206 | 206 | echo "" |
207 | 207 | echo "If this fails, change the compile settings in Makefile" |
208 | 208 | echo "" |
0 | 0 | #!/bin/sh |
1 | 1 | |
2 | 2 | # Configure script for Xymon server |
3 | # $Id: configure.server 7954 2016-03-22 02:26:22Z jccleaver $ | |
3 | # $Id: configure.server 8052 2019-04-22 18:20:02Z jccleaver $ | |
4 | 4 | |
5 | 5 | echo "" |
6 | 6 | echo "Configuration script for Xymon" |
536 | 536 | echo "LFSDEF = $LFS" >>Makefile |
537 | 537 | |
538 | 538 | echo "" >>Makefile |
539 | if test -r build/Makefile.`uname -s` | |
540 | then | |
541 | echo "include build/Makefile.`uname -s`" >>Makefile | |
542 | echo "" | |
543 | echo "Using `uname -s` Makefile settings" | |
539 | if test -r build/Makefile.`uname -s | tr '/' '_'` | |
540 | then | |
541 | echo "include build/Makefile.`uname -s | tr '/' '_'`" >>Makefile | |
542 | echo "" | |
543 | echo "Using `uname -s | tr '/' '_'` Makefile settings" | |
544 | 544 | echo "" |
545 | 545 | else |
546 | 546 | echo "include build/Makefile.generic" >>Makefile |
547 | 547 | echo "" |
548 | echo "Using GENERIC Makefile settings" | |
548 | echo "Using GENERIC Makefile settings (uname -s is `uname -s`)" | |
549 | 549 | echo "" |
550 | 550 | echo "If this fails, change the compile settings in Makefile" |
551 | 551 | echo "" |
76 | 76 | Prevent status messages from going purple when they are no longer valid. |
77 | 77 | Unlike the standard bbd daemon, purple-handling is done by xymond. |
78 | 78 | <P> |
79 | <DT>--merge-clientconfig<DD> | |
79 | <DT>--merge-clientlocal<DD> | |
80 | 80 | The |
81 | 81 | <I><A HREF="../man5/client-local.cfg.5.html">client-local.cfg</A>(5)</I> |
82 | 82 |
0 | 0 | /*----------------------------------------------------------------------------*/ |
1 | 1 | /* Xymon monitor */ |
2 | 2 | /* */ |
3 | /* Copyright (C) 2002-2015 Henrik Storner <henrik@storner.dk> */ | |
3 | /* Copyright (C) 2002-2019 Henrik Storner <henrik@storner.dk> */ | |
4 | 4 | /* */ |
5 | 5 | /* This program is released under the GNU General Public License (GPL), */ |
6 | 6 | /* version 2. See the file "COPYING" for details. */ |
10 | 10 | #ifndef __VERSION_H__ |
11 | 11 | #define __VERSION_H__ |
12 | 12 | |
13 | #define VERSION "4.3.28" | |
13 | #define VERSION "4.3.29" | |
14 | 14 | |
15 | 15 | #endif |
16 | 16 |
10 | 10 | /* */ |
11 | 11 | /*----------------------------------------------------------------------------*/ |
12 | 12 | |
13 | static char rcsid[] = "$Id: cgi.c 7949 2016-03-03 23:44:55Z jccleaver $"; | |
13 | static char rcsid[] = "$Id: cgi.c 8015 2017-12-05 13:16:12Z jccleaver $"; | |
14 | 14 | |
15 | 15 | #include <ctype.h> |
16 | 16 | #include <string.h> |
274 | 274 | else if (strncmp(str, "ackinfo", 7) == 0) csppol = strdup("script-src 'self'; connect-src 'self'; form-action 'self';"); |
275 | 275 | else if (strncmp(str, "acknowledge", 11) == 0) csppol = strdup("script-src 'self'; connect-src 'self'; form-action 'self';"); |
276 | 276 | else if (strncmp(str, "criticaleditor", 14) == 0) csppol = strdup("script-src 'self'; connect-src 'self'; form-action 'self';"); |
277 | else if (strncmp(str, "svcstatus-trends", 16) == 0) csppol = strdup("script-src 'self' 'unsafe-inline'; connect-src 'self'; form-action 'self'; sandbox allow-forms allow-scripts;"); | |
277 | else if (strncmp(str, "svcstatus-trends", 16) == 0) csppol = strdup("script-src 'self' 'unsafe-inline'; connect-src 'self'; form-action 'self'; sandbox allow-forms allow-scripts allow-same-origin;"); | |
278 | 278 | else if (strncmp(str, "svcstatus-info", 14) == 0) csppol = strdup("script-src 'self' 'unsafe-inline'; connect-src 'self'; form-action 'self'; sandbox allow-forms allow-same-origin allow-scripts allow-modals allow-popups;"); |
279 | 279 | else if (strncmp(str, "svcstatus", 9) == 0) csppol = strdup("script-src 'self'; connect-src 'self'; form-action 'self'; sandbox allow-forms allow-same-origin;"); |
280 | 280 | else if (strncmp(str, "historylog", 10) == 0) csppol = strdup("script-src 'self'; connect-src 'self'; form-action 'self'; sandbox allow-forms;"); |
9 | 9 | |
10 | 10 | #ifndef __URL_H__ |
11 | 11 | #define __URL_H__ |
12 | ||
13 | /* Fix building on GNU */ | |
14 | #ifndef MAXPATHLEN | |
15 | # ifdef PATH_MAX | |
16 | # define MAXPATHLEN PATH_MAX | |
17 | # elif defined(MAX_PATH) | |
18 | # define MAXPATHLEN MAX_PATH | |
19 | # elif defined(_MAX_PATH) | |
20 | # define MAXPATHLEN _MAX_PATH | |
21 | # elif defined(CCHMAXPATH) | |
22 | # define MAXPATHLEN CCHMAXPATH | |
23 | # else | |
24 | # define MAXPATHLEN 1024 | |
25 | # endif | |
26 | #endif | |
12 | 27 | |
13 | 28 | extern int obeybbproxysyntax; |
14 | 29 |
106 | 106 | The \fB/usr/local/bin/graphtitle\fR command is then called with |
107 | 107 | the hostname, the graphtype, the period string, and all of the |
108 | 108 | RRD files used as parameters. The script must generate one line of output, |
109 | which is then used as the title of the graph. | |
109 | which is then used as the title of the graph. Each of the RRD pathname | |
110 | parameters will be enclosed in double quotes. | |
110 | 111 | |
111 | 112 | .SH ENVIRONMENT |
112 | 113 | .BR TEST2RRD |
10 | 10 | /* */ |
11 | 11 | /*----------------------------------------------------------------------------*/ |
12 | 12 | |
13 | static char rcsid[] = "$Id: showgraph.c 7678 2015-10-01 14:42:42Z jccleaver $"; | |
13 | static char rcsid[] = "$Id: showgraph.c 8058 2019-04-29 17:22:14Z jccleaver $"; | |
14 | 14 | |
15 | 15 | #include <limits.h> |
16 | 16 | #include <stdio.h> |
1047 | 1047 | if (!gdef->title) gdef->title = strdup(""); |
1048 | 1048 | if (strncmp(gdef->title, "exec:", 5) == 0) { |
1049 | 1049 | char *pcmd; |
1050 | int i, pcmdlen = 0; | |
1050 | int i, pcmdlen = 7; | |
1051 | 1051 | FILE *pfd; |
1052 | 1052 | char *p; |
1053 | ||
1054 | pcmdlen = strlen(gdef->title+5) + strlen(displayname) + strlen(service) + strlen(glegend) + 5; | |
1053 | char *param_str = "%s \"%s\" %s \"%s\""; | |
1054 | ||
1055 | pcmdlen += (strlen(gdef->title+5) + strlen(displayname) + strlen(service) + strlen(glegend)); | |
1055 | 1056 | for (i=0; (i<rrddbcount); i++) pcmdlen += (strlen(rrddbs[i].rrdfn) + 3); |
1056 | 1057 | |
1057 | 1058 | p = pcmd = (char *)malloc(pcmdlen+1); |
1058 | p += sprintf(p, "%s %s %s \"%s\"", gdef->title+5, displayname, service, glegend); | |
1059 | p += sprintf(p, param_str, gdef->title+5, displayname, service, glegend); | |
1059 | 1060 | for (i=0; (i<rrddbcount); i++) { |
1060 | 1061 | if ((firstidx == -1) || ((i >= firstidx) && (i <= lastidx))) { |
1061 | 1062 | p += sprintf(p, " \"%s\"", rrddbs[i].rrdfn); |
345 | 345 | # will result in the load-limits being 7.0/12.0 for the "bax.foo.com" host, |
346 | 346 | # and 3.0/8.0 for all other foo.com hosts. |
347 | 347 | # |
348 | ||
349 | ||
350 | CLASS=linux | |
351 | # Ignore some usually uninteresting tmpfs mounts. | |
352 | DISK /dev IGNORE | |
353 | DISK /lib/init/rw IGNORE | |
354 | DISK /sys/fs/cgroup IGNORE | |
355 | DISK %^/run/user/\d+$ IGNORE | |
356 | INODE /dev IGNORE | |
357 | INODE /lib/init/rw IGNORE | |
358 | INODE /sys/fs/cgroup IGNORE | |
359 | INODE %^/run/user/\d+$ IGNORE | |
360 | ||
361 | ||
362 | ||
348 | 363 | # The special DEFAULT section can modify the built-in defaults - this must |
349 | 364 | # be placed at the end of the file. It should ONLY be used to modify the |
350 | 365 | # default thresholds, do NOT put PROC, LOG, DISK or any other lines here |
65 | 65 | # chmod 640 @INSTALLETCDIR@/xymonpasswd |
66 | 66 | # Add more users / change passwords with: "htpasswd @INSTALLETCDIR@/xymonpasswd USERNAME" |
67 | 67 | # |
68 | AuthUserFile @INSTALLETCDIR@/xymonpasswd | |
69 | ||
68 | 70 | # You can also use a group file to restrict admin access to members of a |
69 | 71 | # group, instead of anyone who is logged in. In that case you must setup |
70 | 72 | # the "xymongroups" file, and change the "Require" settings to require |
71 | 73 | # a specific group membership. See the Apache docs for more details. |
74 | # You may also need to explicitly load the mod_authz_groupfile module | |
75 | # AuthGroupFile @INSTALLETCDIR@/xymongroups | |
72 | 76 | |
73 | AuthUserFile @INSTALLETCDIR@/xymonpasswd | |
74 | AuthGroupFile @INSTALLETCDIR@/xymongroups | |
75 | 77 | AuthType Basic |
76 | 78 | AuthName "Xymon Administration" |
79 | <RequireAll> | |
80 | # "valid-user" restricts access to anyone who is logged in. | |
81 | Require valid-user | |
77 | 82 | |
78 | # "valid-user" restricts access to anyone who is logged in. | |
79 | Require valid-user | |
80 | ||
81 | # "group admins" restricts access to users who have logged in, AND | |
82 | # are members of the "admins" group in xymongroups. | |
83 | # Require group admins | |
84 | ||
83 | # "group admins" restricts access to users who have logged in, AND | |
84 | # are members of the "admins" group in xymongroups. | |
85 | # Require group admins | |
86 | </RequireAll> | |
85 | 87 | </Directory> |
86 | 88 | |
87 | 89 | # Rewrite-rules for migrating from the URL's used in Hobbit |
7 | 7 | /* */ |
8 | 8 | /*----------------------------------------------------------------------------*/ |
9 | 9 | |
10 | static char netstat_rcsid[] = "$Id: do_netstat.c 7609 2015-03-22 00:21:16Z jccleaver $"; | |
10 | static char netstat_rcsid[] = "$Id: do_netstat.c 8036 2019-03-20 23:20:21Z jccleaver $"; | |
11 | 11 | |
12 | 12 | static char *netstat_params[] = { "DS:udpInDatagrams:DERIVE:600:0:U", |
13 | 13 | "DS:udpOutDatagrams:DERIVE:600:0:U", |
264 | 264 | NULL |
265 | 265 | }; |
266 | 266 | |
267 | /* This one matches all Linux systems */ | |
268 | static char *netstat_linux_markers[] = { | |
267 | /* This one matches most older Linux systems using traditional netstat */ | |
268 | static char *netstat_linux_legacy_markers[] = { | |
269 | 269 | "packets received", |
270 | 270 | "packets sent", |
271 | 271 | "packet receive errors", |
282 | 282 | "segments received", |
283 | 283 | "", |
284 | 284 | "segments retransmited", |
285 | NULL | |
286 | }; | |
287 | ||
288 | /* This one matches Linux systems using net-tools from approx 2016 onwards */ | |
289 | static char *netstat_linux_markers[] = { | |
290 | "packets received", | |
291 | "packets sent", | |
292 | "packet receive errors", | |
293 | "active connection openings", | |
294 | "passive connection openings", | |
295 | "failed connection attempts", | |
296 | "connection resets received", | |
297 | "connections established", | |
298 | "", | |
299 | "", | |
300 | "", | |
301 | "", | |
302 | "segments sent out", | |
303 | "segments received", | |
304 | "", | |
305 | "segments retransmitted", | |
285 | 306 | NULL |
286 | 307 | }; |
287 | 308 | |
505 | 526 | case OS_ZOS: |
506 | 527 | /* These are of the form "<value> <marker" */ |
507 | 528 | datapart = strstr(datapart, "\nTcp:"); /* Skip to the start of "Tcp" (udp comes after) */ |
508 | if (datapart) havedata = do_valbeforemarker(netstat_linux_markers, datapart, outp); | |
529 | ||
530 | /* The net-tools project changed formats recently, but not in enough */ | |
531 | /* of a way to warrant switching to regex; we can branch on a former typo. */ | |
532 | if (datapart) { | |
533 | if (strstr(datapart, "segments sent out")) havedata = do_valbeforemarker(netstat_linux_markers, datapart, outp); | |
534 | else havedata = do_valbeforemarker(netstat_linux_legacy_markers, datapart, outp); | |
535 | } | |
509 | 536 | break; |
510 | 537 | |
511 | 538 | case OS_SNMP: |
7 | 7 | /* */ |
8 | 8 | /*----------------------------------------------------------------------------*/ |
9 | 9 | |
10 | static char temperature_rcsid[] = "$Id: do_temperature.c 7248 2013-07-30 12:47:38Z storner $"; | |
10 | /* Sample input reports: | |
11 | 11 | |
12 | int do_temperature_rrd(char *hostname, char *testname, char *classname, char *pagepaths, char *msg, time_t tstamp) | |
13 | { | |
12 | ||
13 | Device Temp LowShutdown LowWarning HighWarning HighShutdown | |
14 | ---------------------------------------------------------------------------------------------------- | |
15 | &green hard-disk1 hard-disk1 44 0 5 55 60 | |
16 | &green CPU 0 Die 86 -10 0 95 100 | |
17 | &green CPU 1 Die 80 -10 0 95 100 | |
18 | &green CPU 0 Ambient 54 -8 0 70 75 | |
19 | &green System Outtake Ambient 53 -10 0 70 75 | |
20 | &green System Intake Ambient 33 -11 0 45 70 | |
21 | &green CPU 1 Ambient 42 -9 0 70 75 | |
22 | ---------------------------------------------------------------------------------------------------- | |
23 | ||
24 | Device Temp Warning Critical | |
25 | --------------------------------------------------------- | |
26 | &green CPU0 60 63 68 | |
27 | &green CPU1 58 63 68 | |
28 | &clear MB0 46 | |
29 | &clear MB1 36 | |
30 | &green PDB 40 53 58 | |
31 | &clear SCSI 33 | |
32 | --------------------------------------------------------- | |
33 | ||
34 | Device Temp High Crit | |
35 | ----------------------------------------------------- | |
36 | &green Package id 0 42 86 100 | |
37 | &green Core 0 41 86 100 | |
38 | &green Core 1 42 86 100 | |
39 | &green temp1 37 98 | |
40 | ----------------------------------------------------- | |
41 | ||
42 | */ | |
43 | ||
44 | static char temperature_rcsid[] = "$Id: do_temperature.c 8050 2019-04-17 23:56:30Z jccleaver $"; | |
45 | ||
46 | int do_temperature_rrd(char *hostname, char *testname, char *classname, char *pagepaths, char *msg, time_t tstamp) | |
47 | { | |
14 | 48 | static char *temperature_params[] = { "DS:temperature:GAUGE:600:1:U", |
15 | 49 | NULL }; |
16 | static void *temperature_tpl = NULL; | |
50 | static void *temperature_tpl = NULL; | |
17 | 51 | |
18 | /* Sample input report: | |
19 | Device Temp(C) Temp(F) | |
20 | ----------------------------------- | |
21 | &green Motherboard#0 31 87 | |
22 | &green Motherboard#1 28 82 | |
23 | &green AMBIENT 25 77 | |
24 | &green CPU0 40 104 | |
25 | &green CPU1 40 104 | |
26 | &green CPU2 40 104 | |
27 | &green CPU3 40 104 | |
28 | &green Board 0 29 84 | |
29 | &green Board 1 35 95 | |
30 | &green Board 2 30 86 | |
31 | &green Board 3 37 98 | |
32 | &green Board 4 28 82 | |
33 | &green Board 6 28 82 | |
34 | &green Board CLK 27 80 | |
35 | &green MB 24 75 | |
36 | &green IOB 19 66 | |
37 | &green DBP0 19 66 | |
38 | &green CPU 0 Die 79 174 | |
39 | &green CPU 0 Ambient 27 80 | |
40 | &green CPU 1 Die 73 163 | |
41 | &green CPU 1 Ambient 26 78 | |
42 | ----------------------------------- | |
43 | Status green: All devices look okay | |
44 | */ | |
45 | ||
46 | char *bol, *eol, *comment, *p; | |
52 | char *bol, *eol, *p; | |
47 | 53 | int tmpC; |
48 | 54 | |
49 | 55 | if (temperature_tpl == NULL) temperature_tpl = setup_template(temperature_params); |
55 | 61 | bol = p + 1; |
56 | 62 | eol = strchr(bol, '\n'); if (eol) *eol = '\0'; |
57 | 63 | |
58 | /* See if there's a comment in parenthesis */ | |
59 | comment = strchr(bol, '('); /* Begin comment */ | |
60 | p = strchr(bol, ')'); /* End comment */ | |
61 | if (comment && p && (comment < p)) *comment = '\0'; /* Cut off the comment */ | |
62 | ||
63 | if (strncmp(bol, "&green", 6) == 0) { bol += 6; gotone = 1; } | |
64 | if (strncmp(bol, "&green", 6) == 0) { bol += 6; gotone = 1; } | |
64 | 65 | else if (strncmp(bol, "&yellow", 7) == 0) { bol += 7; gotone = 1; } |
65 | else if (strncmp(bol, "&red", 4) == 0) { bol += 4; gotone = 1; } | |
66 | else if (strncmp(bol, "&red", 4) == 0) { bol += 4; gotone = 1; } | |
66 | 67 | else if (strncmp(bol, "&clear", 6) == 0) { bol += 6; gotone = 1; } |
67 | 68 | |
68 | 69 | if (gotone) { |
70 | 71 | |
71 | 72 | bol += strspn(bol, " \t"); |
72 | 73 | |
73 | /* Strip off any leading bold and italic HTML tags */ | |
74 | if (strncasecmp(bol, "<i><b>", 6) == 0) { bol += 6; } | |
75 | else if (strncasecmp(bol, "<i>", 3) == 0) { bol += 3; } | |
76 | else if (strncasecmp(bol, "<b><i>", 6) == 0) { bol += 6; } | |
77 | else if (strncasecmp(bol, "<b>", 3) == 0) { bol += 3; } | |
78 | bol += strspn(bol, " \t"); | |
79 | ||
80 | p = bol + strlen(bol) - 1; | |
81 | while ((p > bol) && isspace((int)*p)) p--; | |
82 | while ((p > bol) && isdigit((int)*p)) p--; | |
83 | // tmpF = atoi(p); | |
84 | while ((p > bol) && isspace((int)*p)) p--; | |
85 | while ((p > bol) && isdigit((int)*p)) p--; | |
74 | p = strstr(bol, "\t"); | |
86 | 75 | tmpC = atoi(p); |
87 | 76 | while ((p > bol) && isspace((int)*p)) p--; |
88 | 77 | |
89 | savech = *(p+1); *(p+1) = '\0'; | |
78 | savech = *(p+1); *(p+1) = '\0'; | |
90 | 79 | setupfn2("%s.%s.rrd", "temperature", bol); *(p+1) = savech; |
91 | 80 | |
92 | 81 | snprintf(rrdvalues, sizeof(rrdvalues), "%d:%d", (int)tstamp, tmpC); |
93 | 82 | create_and_update_rrd(hostname, testname, classname, pagepaths, temperature_params, temperature_tpl); |
94 | 83 | } |
95 | 84 | |
96 | if (comment) *comment = '('; | |
97 | 85 | if (eol) *eol = '\n'; |
98 | 86 | } |
99 | 87 |
0 | 0 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> |
1 | 1 | <HTML> |
2 | 2 | <HEAD> |
3 | <META HTTP-EQUIV="Content-Type" CONTENT="&HTMLCONTENTTYPE"> | |
3 | 4 | |
4 | 5 | <TITLE>Xymon - Acknowledge Alert</TITLE> |
5 | 6 |
0 | 0 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> |
1 | 1 | <HTML> |
2 | 2 | <HEAD> |
3 | <META HTTP-EQUIV="Content-Type" CONTENT="&HTMLCONTENTTYPE"> | |
3 | 4 | <META HTTP-EQUIV="EXPIRES" CONTENT="Sat, 01 Jan 2001 00:00:00 GMT"> |
4 | 5 | <TITLE>&XYMWEBBACKGROUND : Xymon - Acknowledgement Log @ &XYMWEBDATE</TITLE> |
5 | 6 |
0 | 0 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> |
1 | 1 | <HTML> |
2 | 2 | <HEAD> |
3 | ||
3 | <META HTTP-EQUIV="Content-Type" CONTENT="&HTMLCONTENTTYPE"> | |
4 | 4 | <TITLE>Xymon - Change Password</TITLE> |
5 | 5 | |
6 | 6 | <!-- Styles for the Xymon body --> |
0 | 0 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> |
1 | 1 | <HTML> |
2 | 2 | <HEAD> |
3 | <META HTTP-EQUIV="Content-Type" CONTENT="&HTMLCONTENTTYPE"> | |
3 | 4 | <TITLE>&XYMWEBBACKGROUND : Xymon - Documentation</TITLE> |
4 | 5 | |
5 | 6 | <!-- Styles for the Xymon body --> |
0 | 0 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
1 | 1 | <html> |
2 | <head><title>Xymon configuration Report</title></head> | |
2 | <head> | |
3 | <META HTTP-EQUIV="Content-Type" CONTENT="&HTMLCONTENTTYPE"> | |
4 | <title>Xymon configuration Report</title> | |
5 | </head> | |
3 | 6 | |
4 | 7 | <body> |
5 | 8 |
0 | 0 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> |
1 | 1 | <HTML> |
2 | 2 | <HEAD> |
3 | <META HTTP-EQUIV="Content-Type" CONTENT="&HTMLCONTENTTYPE"> | |
3 | 4 | |
4 | 5 | <TITLE>Xymon - Critical Systems editor</TITLE> |
5 | 6 |
0 | 0 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> |
1 | 1 | <HTML> |
2 | 2 | <HEAD> |
3 | <META HTTP-EQUIV="Content-Type" CONTENT="&HTMLCONTENTTYPE"> | |
3 | 4 | <META HTTP-EQUIV="REFRESH" CONTENT="&XYMWEBREFRESH"> |
4 | 5 | <META HTTP-EQUIV="EXPIRES" CONTENT="Sat, 01 Jan 2001 00:00:00 GMT"> |
5 | 6 | <TITLE>&XYMWEBBACKGROUND : Xymon - Status @ &XYMWEBDATE</TITLE> |
0 | 0 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> |
1 | 1 | <HTML> |
2 | 2 | <HEAD> |
3 | <META HTTP-EQUIV="Content-Type" CONTENT="&HTMLCONTENTTYPE"> | |
3 | 4 | <META HTTP-EQUIV="REFRESH" CONTENT="&XYMWEBREFRESH"> |
4 | 5 | <META HTTP-EQUIV="EXPIRES" CONTENT="Sat, 01 Jan 2001 00:00:00 GMT"> |
5 | 6 | <TITLE>&XYMWEBBACKGROUND : Xymon - Status @ &XYMWEBDATE</TITLE> |
0 | 0 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> |
1 | 1 | <HTML> |
2 | 2 | <HEAD> |
3 | <META HTTP-EQUIV="Content-Type" CONTENT="&HTMLCONTENTTYPE"> | |
3 | 4 | <META HTTP-EQUIV="EXPIRES" CONTENT="Sat, 01 Jan 2001 00:00:00 GMT"> |
4 | 5 | <TITLE>&XYMWEBBACKGROUND : Xymon - Eventlog @ &XYMWEBDATE</TITLE> |
5 | 6 |
0 | 0 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> |
1 | 1 | <HTML> |
2 | 2 | <HEAD> |
3 | <META HTTP-EQUIV="Content-Type" CONTENT="&HTMLCONTENTTYPE"> | |
3 | 4 | |
4 | 5 | <TITLE>Xymon - Find Host</TITLE> |
5 | 6 |
0 | 0 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> |
1 | 1 | <HTML> |
2 | 2 | <HEAD> |
3 | <META HTTP-EQUIV="Content-Type" CONTENT="&HTMLCONTENTTYPE"> | |
3 | 4 | |
4 | 5 | <TITLE>Xymon - Ghost Clients</TITLE> |
5 | 6 |
0 | 0 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> |
1 | 1 | <HTML> |
2 | 2 | <HEAD> |
3 | <META HTTP-EQUIV="Content-Type" CONTENT="&HTMLCONTENTTYPE"> | |
3 | 4 | <TITLE>&XYMWEBBACKGROUND : Xymon - Status @ &XYMWEBDATE</TITLE> |
4 | 5 | |
5 | 6 | <!-- Styles for the Xymon body --> |
0 | 0 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> |
1 | 1 | <HTML> |
2 | 2 | <HEAD> |
3 | <META HTTP-EQUIV="Content-Type" CONTENT="&HTMLCONTENTTYPE"> | |
3 | 4 | <META HTTP-EQUIV="Set-Cookie" CONTENT="pagepath=; path=/"> |
4 | 5 | <META HTTP-EQUIV="Set-Cookie" CONTENT="host=&XYMWEBHIKEY; path=/"> |
5 | 6 | <TITLE>&XYMWEBBACKGROUND : Xymon - History @ &XYMWEBDATE</TITLE> |
0 | 0 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> |
1 | 1 | <HTML> |
2 | 2 | <HEAD> |
3 | <META HTTP-EQUIV="Content-Type" CONTENT="&HTMLCONTENTTYPE"> | |
3 | 4 | <META HTTP-EQUIV="Set-Cookie" CONTENT="pagepath=; path=/"> |
4 | 5 | <META HTTP-EQUIV="Set-Cookie" CONTENT="host=&XYMWEBHIKEY; path=/"> |
5 | 6 | <TITLE>Xymon Historical Status: &XYMWEBHOST - &XYMWEBSVC @ &LOGTIME</TITLE> |
0 | 0 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> |
1 | 1 | <HTML> |
2 | 2 | <HEAD> |
3 | <META HTTP-EQUIV="Content-Type" CONTENT="&HTMLCONTENTTYPE"> | |
3 | 4 | |
4 | 5 | <TITLE>Xymon - Metrics Report</TITLE> |
5 | 6 |
0 | 0 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> |
1 | 1 | <HTML> |
2 | 2 | <HEAD> |
3 | <META HTTP-EQUIV="Content-Type" CONTENT="&HTMLCONTENTTYPE"> | |
3 | 4 | |
4 | 5 | <TITLE>Xymon - List of Hosts</TITLE> |
5 | 6 |
0 | 0 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> |
1 | 1 | <HTML> |
2 | 2 | <HEAD> |
3 | <META HTTP-EQUIV="Content-Type" CONTENT="&HTMLCONTENTTYPE"> | |
3 | 4 | <META HTTP-EQUIV="REFRESH" CONTENT="&XYMWEBREFRESH"> |
4 | 5 | <META HTTP-EQUIV="EXPIRES" CONTENT="Sat, 01 Jan 2001 00:00:00 GMT"> |
5 | 6 | <META HTTP-EQUIV="Set-Cookie" CONTENT="pagepath=; path=/"> |
0 | 0 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> |
1 | 1 | <HTML> |
2 | 2 | <HEAD> |
3 | <META HTTP-EQUIV="Content-Type" CONTENT="&HTMLCONTENTTYPE"> | |
3 | 4 | <META HTTP-EQUIV="Set-Cookie" CONTENT="pagepath=; path=/"> |
4 | 5 | <META HTTP-EQUIV="Set-Cookie" CONTENT="host=&XYMWEBHIKEY; path=/"> |
5 | 6 | <TITLE>Xymon - &XYMWEBHOST Host Information</TITLE> |
0 | 0 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> |
1 | 1 | <HTML> |
2 | 2 | <HEAD> |
3 | <META HTTP-EQUIV="Content-Type" CONTENT="&HTMLCONTENTTYPE"> | |
3 | 4 | |
4 | 5 | <TITLE>Xymon - Maintenance</TITLE> |
5 | 6 |
0 | 0 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> |
1 | 1 | <HTML> |
2 | 2 | <HEAD> |
3 | <META HTTP-EQUIV="Content-Type" CONTENT="&HTMLCONTENTTYPE"> | |
3 | 4 | |
4 | 5 | <TITLE>Xymon - Maintenance</TITLE> |
5 | 6 |
0 | 0 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> |
1 | 1 | <HTML> |
2 | 2 | <HEAD> |
3 | <META HTTP-EQUIV="Content-Type" CONTENT="&HTMLCONTENTTYPE"> | |
3 | 4 | <META HTTP-EQUIV="EXPIRES" CONTENT="Sat, 01 Jan 2001 00:00:00 GMT"> |
4 | 5 | <TITLE>&XYMWEBBACKGROUND : Xymon - Notification Log @ &XYMWEBDATE</TITLE> |
5 | 6 |
0 | 0 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> |
1 | 1 | <HTML> |
2 | 2 | <HEAD> |
3 | <META HTTP-EQUIV="Content-Type" CONTENT="&HTMLCONTENTTYPE"> | |
3 | 4 | <META HTTP-EQUIV="EXPIRES" CONTENT="Sat, 01 Jan 2001 00:00:00 GMT"> |
4 | 5 | <TITLE>&XYMWEBBACKGROUND : Xymon - Performance data @ &XYMWEBDATE</TITLE> |
5 | 6 |
0 | 0 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> |
1 | 1 | <HTML> |
2 | 2 | <HEAD> |
3 | <META HTTP-EQUIV="Content-Type" CONTENT="&HTMLCONTENTTYPE"> | |
3 | 4 | <TITLE>Xymon Availability Report : &XYMWEBHOST - &XYMWEBSVC &XYMWEBDATE</TITLE> |
4 | 5 | |
5 | 6 | <!-- Styles for the Xymon body --> |
0 | 0 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> |
1 | 1 | <HTML> |
2 | 2 | <HEAD> |
3 | <META HTTP-EQUIV="Content-Type" CONTENT="&HTMLCONTENTTYPE"> | |
3 | 4 | <META HTTP-EQUIV="Set-Cookie" CONTENT="pagepath=&XYMWEBPAGEPATH; path=/"> |
4 | 5 | <META HTTP-EQUIV="Set-Cookie" CONTENT="host=; path=/"> |
5 | 6 | <TITLE>Xymon Availability Report : &XYMWEBDATE</TITLE> |
0 | 0 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> |
1 | 1 | <HTML> |
2 | 2 | <HEAD> |
3 | <META HTTP-EQUIV="Content-Type" CONTENT="&HTMLCONTENTTYPE"> | |
3 | 4 | |
4 | 5 | <TITLE>Xymon - Availability Report</TITLE> |
5 | 6 |
0 | 0 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> |
1 | 1 | <HTML> |
2 | 2 | <HEAD> |
3 | <META HTTP-EQUIV="Content-Type" CONTENT="&HTMLCONTENTTYPE"> | |
3 | 4 | <TITLE>&XYMWEBBACKGROUND : Xymon - Snapshot @ &XYMWEBDATE</TITLE> |
4 | 5 | |
5 | 6 | <!-- Styles for the Xymon body --> |
0 | 0 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> |
1 | 1 | <HTML> |
2 | 2 | <HEAD> |
3 | <META HTTP-EQUIV="Content-Type" CONTENT="&HTMLCONTENTTYPE"> | |
3 | 4 | <TITLE>&XYMWEBBACKGROUND : Xymon - Snapshot</TITLE> |
4 | 5 | |
5 | 6 | <!-- Styles for the Xymon body --> |
0 | 0 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> |
1 | 1 | <HTML> |
2 | 2 | <HEAD> |
3 | <META HTTP-EQUIV="Content-Type" CONTENT="&HTMLCONTENTTYPE"> | |
3 | 4 | <META HTTP-EQUIV="Set-Cookie" CONTENT="pagepath=&XYMWEBPAGEPATH; path=/"> |
4 | 5 | <META HTTP-EQUIV="Set-Cookie" CONTENT="host=; path=/"> |
5 | 6 | <TITLE>Xymon Snapshot Report : &XYMWEBDATE</TITLE> |
0 | 0 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> |
1 | 1 | <HTML> |
2 | 2 | <HEAD> |
3 | <META HTTP-EQUIV="Content-Type" CONTENT="&HTMLCONTENTTYPE"> | |
3 | 4 | |
4 | 5 | <TITLE>Xymon - Snapshot Report</TITLE> |
5 | 6 |
0 | 0 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> |
1 | 1 | <HTML> |
2 | 2 | <HEAD> |
3 | <META HTTP-EQUIV="Content-Type" CONTENT="&HTMLCONTENTTYPE"> | |
3 | 4 | <META HTTP-EQUIV="REFRESH" CONTENT="&XYMWEBREFRESH"> |
4 | 5 | <META HTTP-EQUIV="EXPIRES" CONTENT="Sat, 01 Jan 2001 00:00:00 GMT"> |
5 | 6 | <TITLE>&XYMWEBBACKGROUND : Xymon - Status @ &XYMWEBDATE</TITLE> |
0 | 0 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> |
1 | 1 | <HTML> |
2 | 2 | <HEAD> |
3 | <META HTTP-EQUIV="Content-Type" CONTENT="&HTMLCONTENTTYPE"> | |
3 | 4 | <META HTTP-EQUIV="REFRESH" CONTENT="&XYMWEBREFRESH"> |
4 | 5 | <META HTTP-EQUIV="EXPIRES" CONTENT="Sat, 01 Jan 2001 00:00:00 GMT"> |
5 | 6 | <TITLE>&XYMWEBBACKGROUND : Xymon - Status @ &XYMWEBDATE</TITLE> |
8 | 8 | </TR> |
9 | 9 | </TABLE> |
10 | 10 | |
11 | <!-- Don't rely just on HTML to set the cookies --> | |
12 | <!-- http://lists.xymon.com/pipermail/xymon/2018-June/045538.html --> | |
13 | <script type="text/javascript"> | |
14 | var metas = document.getElementsByTagName('meta'); | |
15 | ||
16 | for (var i=0; i<metas.length; i++) { | |
17 | var type = metas[i].getAttribute("HTTP-EQUIV"); | |
18 | if (type == "Set-Cookie") { | |
19 | var prop = metas[i].getAttribute("CONTENT"); | |
20 | document.cookie = prop; | |
21 | } | |
22 | } | |
23 | </script> | |
24 | ||
11 | 25 | &XYMONBODYFOOTER |
12 | 26 | |
13 | 27 | </BODY> |
0 | 0 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> |
1 | 1 | <HTML> |
2 | 2 | <HEAD> |
3 | <META HTTP-EQUIV="Content-Type" CONTENT="&HTMLCONTENTTYPE"> | |
3 | 4 | <META HTTP-EQUIV="REFRESH" CONTENT="&XYMWEBREFRESH"> |
4 | 5 | <META HTTP-EQUIV="EXPIRES" CONTENT="Sat, 01 Jan 2001 00:00:00 GMT"> |
5 | 6 | <META HTTP-EQUIV="Set-Cookie" CONTENT="pagepath=&XYMWEBPAGEPATH; path=/"> |
0 | 0 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> |
1 | 1 | <HTML> |
2 | 2 | <HEAD> |
3 | <META HTTP-EQUIV="Content-Type" CONTENT="&HTMLCONTENTTYPE"> | |
3 | 4 | <META HTTP-EQUIV="EXPIRES" CONTENT="Sat, 01 Jan 2001 00:00:00 GMT"> |
4 | 5 | <TITLE>&XYMWEBBACKGROUND : Xymon - Top Changes @ &XYMWEBDATE</TITLE> |
5 | 6 |
0 | 0 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> |
1 | 1 | <HTML> |
2 | 2 | <HEAD> |
3 | <META HTTP-EQUIV="Content-Type" CONTENT="&HTMLCONTENTTYPE"> | |
3 | 4 | <META HTTP-EQUIV="Set-Cookie" CONTENT="pagepath=; path=/"> |
4 | 5 | <META HTTP-EQUIV="Set-Cookie" CONTENT="host=&XYMWEBHIKEY; path=/"> |
5 | 6 | <TITLE>Xymon - &XYMWEBHOST Host Trends</TITLE> |
0 | 0 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> |
1 | 1 | <HTML> |
2 | 2 | <HEAD> |
3 | <META HTTP-EQUIV="Content-Type" CONTENT="&HTMLCONTENTTYPE"> | |
3 | 4 | |
4 | 5 | <TITLE>Xymon - Manage Users</TITLE> |
5 | 6 |
59 | 59 | Prevent status messages from going purple when they are no longer valid. |
60 | 60 | Unlike the standard bbd daemon, purple-handling is done by xymond. |
61 | 61 | |
62 | .IP "\-\-merge\-clientconfig" | |
62 | .IP "\-\-merge\-clientlocal" | |
63 | 63 | The |
64 | 64 | .I client-local.cfg(5) |
65 | 65 | file contains client-configuration which can be found matching a client |
24 | 24 | /* */ |
25 | 25 | /*----------------------------------------------------------------------------*/ |
26 | 26 | |
27 | static char rcsid[] = "$Id: xymond.c 7999 2017-01-06 02:00:06Z jccleaver $"; | |
27 | static char rcsid[] = "$Id: xymond.c 8045 2019-04-09 03:32:37Z jccleaver $"; | |
28 | 28 | |
29 | 29 | #include <limits.h> |
30 | 30 | #include <sys/time.h> |
42 | 42 | #include <fcntl.h> |
43 | 43 | #include <stdlib.h> |
44 | 44 | #include <string.h> |
45 | #include <stdint.h> | |
45 | 46 | #include <stdio.h> |
46 | 47 | #include <netdb.h> |
47 | 48 | #include <ctype.h> |
62 | 63 | * The absolute maximum size we'll grow our buffers to accommodate an incoming message. |
63 | 64 | * This is really just an upper bound to squash the bad guys trying to data-flood us. |
64 | 65 | */ |
65 | #define MAX_XYMON_INBUFSZ (10*1024*1024) /* 10 MB */ | |
66 | #define MAX_XYMON_INBUFSZ (64*1024*1024) /* 64 MB */ | |
66 | 67 | |
67 | 68 | /* The initial size of an input buffer. Make this large enough for most traffic. */ |
68 | 69 | #define XYMON_INBUF_INITIAL (128*1024) |
52 | 52 | received from the client. If you prefer to just have the monitored |
53 | 53 | ports shown, this option will turn off the full netstat-listing. |
54 | 54 | |
55 | .IP "\-\-no\-cpu\-listing" | |
56 | Normally the "cpu" status message includes the full cpu-listing | |
57 | received from the client. If you prefer to just have the monitored | |
58 | cpu load shown, this option will turn off the full cpu-listing. | |
59 | ||
55 | 60 | .IP "\-\-uptime\-status" |
56 | 61 | Generate a separate "uptime" status column. The uptime is normally |
57 | 62 | just reported in the "cpu" status column, but if you would like a |
10 | 10 | /* */ |
11 | 11 | /*----------------------------------------------------------------------------*/ |
12 | 12 | |
13 | static char rcsid[] = "$Id: xymond_client.c 7886 2016-02-02 20:16:19Z jccleaver $"; | |
13 | static char rcsid[] = "$Id: xymond_client.c 8058 2019-04-29 17:22:14Z jccleaver $"; | |
14 | 14 | |
15 | 15 | #include <stdio.h> |
16 | 16 | #include <string.h> |
39 | 39 | } sectlist_t; |
40 | 40 | static sectlist_t *defsecthead = NULL; |
41 | 41 | |
42 | int cpulistincpu = 1; | |
42 | 43 | int pslistinprocs = 1; |
43 | 44 | int portlistinports = 1; |
44 | 45 | int svclistinsvcs = 1; |
512 | 513 | addtostrstatus(cpumsg); |
513 | 514 | addtostatus("\n"); |
514 | 515 | } |
515 | if (topstr) { | |
516 | if (topstr && cpulistincpu == 1) { | |
516 | 517 | addtostatus("\n"); |
517 | 518 | addtostatus(topstr); |
518 | 519 | } |
2087 | 2088 | else if (strcmp(argv[argi], "--no-port-listing") == 0) { |
2088 | 2089 | portlistinports = 0; |
2089 | 2090 | } |
2091 | else if (strcmp(argv[argi], "--no-cpu-listing") == 0) { | |
2092 | cpulistincpu = 0; | |
2093 | } | |
2090 | 2094 | else if (strcmp(argv[argi], "--no-clear-msgs") == 0) { |
2091 | 2095 | sendclearmsgs = 0; |
2092 | 2096 | } |
10 | 10 | /* */ |
11 | 11 | /*----------------------------------------------------------------------------*/ |
12 | 12 | |
13 | static char rcsid[] = "$Id: wmlgen.c 7684 2015-10-08 03:01:23Z jccleaver $"; | |
13 | static char rcsid[] = "$Id: wmlgen.c 8031 2019-03-13 08:59:50Z jccleaver $"; | |
14 | 14 | |
15 | 15 | #include <limits.h> |
16 | 16 | #include <stdlib.h> |
Binary diff not shown
9 | 9 | /* */ |
10 | 10 | /*----------------------------------------------------------------------------*/ |
11 | 11 | |
12 | static char rcsid[] = "$Id: httpresult.c 7773 2015-11-22 02:19:43Z jccleaver $"; | |
12 | static char rcsid[] = "$Id: httpresult.c 8043 2019-04-08 22:51:15Z jccleaver $"; | |
13 | 13 | |
14 | 14 | #include <sys/types.h> |
15 | 15 | #include <stdlib.h> |
127 | 127 | /* Check if this service is a NOPAGENET service. */ |
128 | 128 | nopagename = (char *) malloc(strlen(svcname)+3); |
129 | 129 | sprintf(nopagename, ",%s,", svcname); |
130 | nopage = (strstr(nonetpage, svcname) != NULL); | |
130 | nopage = (strstr(nonetpage, nopagename) != NULL); | |
131 | 131 | xfree(nopagename); |
132 | 132 | |
133 | 133 | dbgprintf("Calc http color host %s : ", host->hostname); |
428 | 428 | /* Check if this service is a NOPAGENET service. */ |
429 | 429 | nopagename = (char *) malloc(strlen(contenttestname)+3); |
430 | 430 | sprintf(nopagename, ",%s,", contenttestname); |
431 | nopage = (strstr(nonetpage, contenttestname) != NULL); | |
431 | nopage = (strstr(nonetpage, nopagename) != NULL); | |
432 | 432 | xfree(nopagename); |
433 | 433 | |
434 | 434 | dbgprintf("Calc content color host %s : ", host->hostname); |
9 | 9 | /* */ |
10 | 10 | /*----------------------------------------------------------------------------*/ |
11 | 11 | |
12 | static char rcsid[] = "$Id: ldaptest.c 7678 2015-10-01 14:42:42Z jccleaver $"; | |
12 | static char rcsid[] = "$Id: ldaptest.c 8043 2019-04-08 22:51:15Z jccleaver $"; | |
13 | 13 | |
14 | 14 | #include <sys/types.h> |
15 | 15 | #include <stdlib.h> |
407 | 407 | /* Check if this service is a NOPAGENET service. */ |
408 | 408 | nopagename = (char *) malloc(strlen(svcname)+3); |
409 | 409 | sprintf(nopagename, ",%s,", svcname); |
410 | nopage = (strstr(nonetpage, svcname) != NULL); | |
410 | nopage = (strstr(nonetpage, nopagename) != NULL); | |
411 | 411 | xfree(nopagename); |
412 | 412 | |
413 | 413 | dbgprintf("Calc ldap color host %s : ", host->hostname); |
7 | 7 | /* */ |
8 | 8 | /*----------------------------------------------------------------------------*/ |
9 | 9 | |
10 | static char rcsid[] = "$Id: xymonnet.c 7967 2016-09-10 03:13:43Z jccleaver $"; | |
10 | static char rcsid[] = "$Id: xymonnet.c 8060 2019-05-01 23:59:23Z jccleaver $"; | |
11 | 11 | |
12 | 12 | #include <limits.h> |
13 | 13 | #include <stdio.h> |
106 | 106 | char *defaultsourceip = NULL; |
107 | 107 | int loadhostsfromxymond = 0; |
108 | 108 | int sslminkeysize = 0; |
109 | char *warnbuf = NULL; | |
110 | static unsigned int warnbufsize = 0; | |
109 | 111 | |
110 | 112 | void dump_hostlist(void) |
111 | 113 | { |
875 | 877 | /* Already have the IP setup */ |
876 | 878 | } |
877 | 879 | else { |
880 | char msg[512]; | |
878 | 881 | /* Cannot resolve hostname */ |
879 | 882 | h->dnserror = 1; |
883 | /* Make this a warning rather than an error | |
880 | 884 | errprintf("xymonnet: Cannot resolve IP for host %s\n", h->hostname); |
885 | */ | |
886 | sprintf(msg, "xymonnet: Cannot resolve IP for host %s\n", h->hostname); | |
887 | if (warnbuf == NULL) { | |
888 | warnbufsize = 8192; | |
889 | warnbuf = (char *) malloc(warnbufsize); | |
890 | *warnbuf = '\0'; | |
891 | } | |
892 | else if ((strlen(warnbuf) + strlen(msg)) > warnbufsize) { | |
893 | warnbufsize += 8192; | |
894 | warnbuf = (char *) realloc(warnbuf, warnbufsize); | |
895 | } | |
896 | strcat(warnbuf, msg); | |
881 | 897 | } |
882 | 898 | } |
883 | 899 | |
1065 | 1081 | strcpy(cmdpath, (use_sntp ? xgetenv("SNTP") : xgetenv("NTPDATE")) ); |
1066 | 1082 | |
1067 | 1083 | for (t=service->items; (t); t = t->next) { |
1068 | if (!t->host->dnserror) { | |
1084 | /* Do not run NTP test if host does not resolve in DNS or is down */ | |
1085 | if (!t->host->dnserror && !t->host->pingerror) { | |
1069 | 1086 | if (use_sntp) { |
1070 | 1087 | sprintf(cmd, "%s %s -d %d %s 2>&1", cmdpath, xgetenv("SNTPOPTS"), extcmdtimeout-1, ip_to_test(t->host)); |
1071 | 1088 | } |
1089 | 1106 | p = xgetenv("RPCINFO"); |
1090 | 1107 | strcpy(cmdpath, (p ? p : "rpcinfo")); |
1091 | 1108 | for (t=service->items; (t); t = t->next) { |
1092 | if (!t->host->dnserror && (t->host->downcount == 0)) { | |
1109 | /* Do not run RPCINFO test if host does not resolve in DNS or is down */ | |
1110 | if (!t->host->dnserror && (t->host->downcount == 0) && !t->host->pingerror) { | |
1093 | 1111 | sprintf(cmd, "%s -p %s 2>&1", cmdpath, ip_to_test(t->host)); |
1094 | 1112 | t->open = (run_command(cmd, NULL, t->banner, 1, extcmdtimeout) == 0); |
1095 | 1113 | } |
1465 | 1483 | strcat(cause, " down "); |
1466 | 1484 | color = COL_YELLOW; |
1467 | 1485 | } |
1486 | ||
1487 | /* Set pingerror for later use by NTP and RPCINFO tests */ | |
1488 | test->host->pingerror = (color == COL_RED ? 1 : 0); | |
1468 | 1489 | |
1469 | 1490 | /* Handle "badconn" */ |
1470 | 1491 | if ((color == COL_RED) && (test->host->downcount < test->host->badconn[2])) { |
1619 | 1640 | /* Check if this service is a NOPAGENET service. */ |
1620 | 1641 | nopagename = (char *) malloc(strlen(svcname)+3); |
1621 | 1642 | sprintf(nopagename, ",%s,", svcname); |
1622 | if (strstr(nonetpage, svcname) != NULL) color = COL_YELLOW; | |
1643 | if (strstr(nonetpage, nopagename) != NULL) color = COL_YELLOW; | |
1623 | 1644 | xfree(nopagename); |
1624 | 1645 | } |
1625 | 1646 | |
2235 | 2256 | printf("Usage: %s [options] [host1 host2 host3 ...]\n", argv[0]); |
2236 | 2257 | printf("General options:\n"); |
2237 | 2258 | printf(" --timeout=N : Timeout (in seconds) for service tests\n"); |
2259 | printf(" --cmdtimeout=N : Timeout for external commands for testing NTP, RPC and traceroute\n"); | |
2238 | 2260 | printf(" --concurrency=N : Number of tests run in parallel\n"); |
2239 | 2261 | printf(" --dns-timeout=N : DNS lookups timeout and fail after N seconds [30]\n"); |
2240 | 2262 | printf(" --dns=[only|ip|standard] : How IP's are decided\n"); |
2604 | 2626 | addtostatus(prehtmlquoted(errbuf)); |
2605 | 2627 | } |
2606 | 2628 | |
2629 | if (warnbuf) { | |
2630 | addtostatus("\n\nWarning output:\n"); | |
2631 | addtostatus(prehtmlquoted(warnbuf)); | |
2632 | } | |
2633 | ||
2607 | 2634 | show_timestamps(×tamps); |
2608 | 2635 | addtostatus(timestamps); |
2609 | 2636 |
41 | 41 | * banner nosslcert | | |
42 | 42 | * certinfo dodns | | |
43 | 43 | * duration dnserror | | |
44 | * badtest ////////// | | | |
44 | * badtest pingerror | | | |
45 | 45 | * downcount repeattest | | |
46 | 46 | * downstart noconn | | |
47 | 47 | * privdata ----+ noping | | |
90 | 90 | int hidehttp; /* hidehttp flag */ |
91 | 91 | int dodns; /* set while loading tests if we need to do a DNS lookup */ |
92 | 92 | int dnserror; /* set internally if we cannot find the host's IP */ |
93 | int pingerror; /* set internally if host does not answer ping */ | |
93 | 94 | int repeattest; /* Set if this host goes on the quick poll list */ |
94 | 95 | char *hosttype; /* For the "Intermediate HOSTTYPE is down" message */ |
95 | 96 |