*** ./Changes.orig 2019-04-29 11:22:14.000000000 -0600 --- ./Changes 2019-04-29 16:33:02.616151000 -0600 *************** *** 3,8 **** --- 3,16 ---- * rev + * Update xymonnet.c to not run NTP or RPCINFO tests on down systems, make + unresolved IPs a warning rather than an error (Thanks, Tom Schmidt) + * Update protocols.cfg entries for smtp, smtps; add entries for netbios-ssn, + snpp (Thanks, Tom Schmidt) + * Update do_disk.c for NetApp aggregates and for disk1 RRD data to use bytes + rather than KB for graphs (Thanks, Tom Schmidt) + * Add lic graph, change underscores to spaces for mangling on temperature + and lic graphs (Thanks, Tom Schmidt) * Deal with Set-Cookie deprecation on normal pages (Thanks, Erik Schminke) * Support glibc->tirpc migration on newer distributions * Fix certain flags not being set on GCC 8/9 *** ./debian/changelog.orig 2019-04-29 11:22:14.000000000 -0600 --- ./debian/changelog 2019-04-29 16:33:12.546989000 -0600 *************** *** 2,7 **** --- 2,15 ---- * rev + * Update xymonnet.c to not run NTP or RPCINFO tests on down systems, make + unresolved IPs a warning rather than an error (Thanks, Tom Schmidt) + * Update protocols.cfg entries for smtp, smtps; add entries for netbios-ssn, + snpp (Thanks, Tom Schmidt) + * Update do_disk.c for NetApp aggregates and for disk1 RRD data to use bytes + rather than KB for graphs (Thanks, Tom Schmidt) + * Add lic graph, change underscores to spaces for mangling on temperature + and lic graphs (Thanks, Tom Schmidt) * Deal with Set-Cookie deprecation on normal pages (Thanks, Erik Schminke) * Support glibc->tirpc migration on newer distributions * Fix certain flags not being set on GCC 8/9 *** ./web/showgraph.c.orig 2019-04-29 11:22:14.000000000 -0600 --- ./web/showgraph.c 2019-04-29 15:40:28.897775000 -0600 *************** *** 1011,1016 **** --- 1011,1029 ---- rrddbs[rrddbcount].rrdparam = (char *)malloc(strlen("http://")+strlen(param)+1); sprintf(rrddbs[rrddbcount].rrdparam, "http://%s", param); } + /* + * Change underscores to spaces as this is a common mangling + * used by temperature and lic backends + */ + else if ((strcmp(gdef->name, "temperature") == 0) || (strcmp(gdef->name, "lic") == 0)) { + char *p; + int i; + p = param; + for (i=0; (i < strlen(p)); i++) { + if (p[i] == '_') p[i] = ' '; + } + rrddbs[rrddbcount].rrdparam = strdup(p); + } else { rrddbs[rrddbcount].rrdparam = strdup(param); } *** ./xymond/etcfiles/graphs.cfg.orig 2017-01-05 19:21:07.000000000 -0700 --- ./xymond/etcfiles/graphs.cfg 2019-04-29 15:55:20.556969000 -0600 *************** *** 109,121 **** TITLE Disk Utilization YAXIS Used DEF:p@RRDIDX@=@RRDFN@:used:AVERAGE ! CDEF:p@RRDIDX@t=p@RRDIDX@,1024,* ! LINE2:p@RRDIDX@t#@COLOR@:@RRDPARAM@ -l 0 ! GPRINT:p@RRDIDX@:LAST: \: %5.1lf KB (cur) ! GPRINT:p@RRDIDX@:MAX: \: %5.1lf KB (max) ! GPRINT:p@RRDIDX@:MIN: \: %5.1lf KB (min) ! GPRINT:p@RRDIDX@:AVERAGE: \: %5.1lf KB (avg)\n # The qtree graphs are based on the qtree report from filerstats2bb.pl # These handle NetApp storage devices. --- 109,120 ---- TITLE Disk Utilization YAXIS Used DEF:p@RRDIDX@=@RRDFN@:used:AVERAGE ! LINE2:p@RRDIDX@#@COLOR@:@RRDPARAM@ -l 0 ! GPRINT:p@RRDIDX@:LAST: \: %5.1lf%s (cur) ! GPRINT:p@RRDIDX@:MAX: \: %5.1lf%s (max) ! GPRINT:p@RRDIDX@:MIN: \: %5.1lf%s (min) ! GPRINT:p@RRDIDX@:AVERAGE: \: %5.1lf%s (avg)\n # The qtree graphs are based on the qtree report from filerstats2bb.pl # These handle NetApp storage devices. *************** *** 2112,2114 **** --- 2111,2128 ---- ########### end of ifmib graphs ########### + # License Manager (like FlexLM) Utilization + [lic] + FNPATTERN ^lic.(.+).rrd + TITLE License Utilization + YAXIS Licenses + DEF:t@RRDIDX@=@RRDFN@:total:AVERAGE + DEF:u@RRDIDX@=@RRDFN@:used:AVERAGE + LINE2:u@RRDIDX@#@COLOR@:@RRDPARAM@ + COMMENT:\n + GPRINT:t@RRDIDX@:LAST: \: %4.0lf (total) + GPRINT:u@RRDIDX@:LAST: \: %4.0lf (cur) + GPRINT:u@RRDIDX@:MAX: \: %4.0lf (max) + GPRINT:u@RRDIDX@:MIN: \: %4.0lf (min) + GPRINT:u@RRDIDX@:AVERAGE: \: %5.1lf (avg)\n + *** ./xymond/rrd/do_disk.c.orig 2012-07-13 08:05:20.000000000 -0600 --- ./xymond/rrd/do_disk.c 2019-04-29 16:15:56.355471000 -0600 *************** *** 49,55 **** if (strstr(msg, " xfs ") || strstr(msg, " efs ") || strstr(msg, " cxfs ")) dsystype = DT_IRIX; else if (strstr(msg, "DASD")) dsystype = DT_AS400; else if (strstr(msg, "NetWare Volumes")) dsystype = DT_NETWARE; ! else if (strstr(msg, "NetAPP")) dsystype = DT_NETAPP; else if (strstr(msg, "Summary")) dsystype = DT_BBWIN; /* BBWin > 0.10 is almost like Windows/NT */ else if (strstr(msg, "Filesystem")) dsystype = DT_NT; else dsystype = DT_UNIX; --- 49,55 ---- if (strstr(msg, " xfs ") || strstr(msg, " efs ") || strstr(msg, " cxfs ")) dsystype = DT_IRIX; else if (strstr(msg, "DASD")) dsystype = DT_AS400; else if (strstr(msg, "NetWare Volumes")) dsystype = DT_NETWARE; ! else if (strstr(msg, "NetAPP") || strstr(msg, "NetApp")) dsystype = DT_NETAPP; else if (strstr(msg, "Summary")) dsystype = DT_BBWIN; /* BBWin > 0.10 is almost like Windows/NT */ else if (strstr(msg, "Filesystem")) dsystype = DT_NT; else dsystype = DT_UNIX; *************** *** 85,92 **** /* AS/400 reports must contain the word DASD */ if ((dsystype == DT_AS400) && (strstr(curline, "DASD") == NULL)) goto nextline; ! /* All clients except AS/400 report the mount-point with slashes - ALSO Win32 clients. */ ! if ((dsystype != DT_AS400) && (strchr(curline, '/') == NULL)) goto nextline; /* red/yellow filesystems show up twice */ if ((dsystype != DT_NETAPP) && (dsystype != DT_NETWARE) && (dsystype != DT_AS400)) { --- 85,95 ---- /* AS/400 reports must contain the word DASD */ if ((dsystype == DT_AS400) && (strstr(curline, "DASD") == NULL)) goto nextline; ! /* All clients except AS/400 and NetApp aggregates report the mount-point with slashes - ALSO Win32 clients. */ ! if ((dsystype != DT_AS400) && (strchr(curline, '/') == NULL)) { ! if (dsystype != DT_NETAPP) goto nextline; ! if (!strstr(curline, " aggr")) goto nextline; ! } /* red/yellow filesystems show up twice */ if ((dsystype != DT_NETAPP) && (dsystype != DT_NETWARE) && (dsystype != DT_AS400)) { *************** *** 94,99 **** --- 97,103 ---- if ((strstr(curline, " red ") || strstr(curline, " yellow "))) goto nextline; } + if (strstr(curline, " has reached the defined ")) goto nextline; for (columncount=0; (columncount<20); columncount++) columns[columncount] = ""; fsline = xstrdup(curline); columncount = 0; p = strtok(fsline, " "); while (p && (columncount < 20)) { columns[columncount++] = p; p = strtok(NULL, " "); } *************** *** 160,165 **** --- 164,171 ---- pused = atoi(columns[7]); break; } + /* Convert kilobytes to bytes so that RRD is compatible with RRD data ported from Big Brother */ + aused *= 1024; /* Check include/exclude patterns */ wanteddisk = 1; *** ./xymonnet/protocols.cfg.orig 2015-10-19 04:10:11.000000000 -0600 --- ./xymonnet/protocols.cfg 2019-04-29 15:48:35.832970000 -0600 *************** *** 67,79 **** port 992 [smtp] ! send "mail\r\nquit\r\n" expect "220" options banner port 25 [smtps] ! send "mail\r\nquit\r\n" expect "220" options ssl,banner # No default port-number assignment for smtps - nonstandard according to IANA --- 67,79 ---- port 992 [smtp] ! send "helo localhost\r\nquit\r\n" expect "220" options banner port 25 [smtps] ! send "helo localhost\r\nquit\r\n" expect "220" options ssl,banner # No default port-number assignment for smtps - nonstandard according to IANA *************** *** 248,250 **** --- 248,261 ---- [lpd] port 515 + # NETBIOS Session Service for NT Authentication + [netbios-ssn] + port 139 + + # Simple Network Paging Protocol (SNPP) + [snpp] + send "quit\r\n" + expect "220" + options banner + port 444 + *** ./xymonnet/xymonnet.c.orig 2019-04-08 16:51:15.000000000 -0600 --- ./xymonnet/xymonnet.c 2019-04-29 16:29:32.067173000 -0600 *************** *** 107,112 **** --- 107,114 ---- char *defaultsourceip = NULL; int loadhostsfromxymond = 0; int sslminkeysize = 0; + char *warnbuf = NULL; + static unsigned int warnbufsize = 0; void dump_hostlist(void) { *************** *** 876,884 **** --- 878,900 ---- /* Already have the IP setup */ } else { + char msg[512]; /* Cannot resolve hostname */ h->dnserror = 1; + /* Make this a warning rather than an error errprintf("xymonnet: Cannot resolve IP for host %s\n", h->hostname); + */ + sprintf(msg, "xymonnet: Cannot resolve IP for host %s\n", h->hostname); + if (warnbuf == NULL) { + warnbufsize = 8192; + warnbuf = (char *) malloc(warnbufsize); + *warnbuf = '\0'; + } + else if ((strlen(warnbuf) + strlen(msg)) > warnbufsize) { + warnbufsize += 8192; + warnbuf = (char *) realloc(warnbuf, warnbufsize); + } + strcat(warnbuf, msg); } } *************** *** 1066,1072 **** strcpy(cmdpath, (use_sntp ? xgetenv("SNTP") : xgetenv("NTPDATE")) ); for (t=service->items; (t); t = t->next) { ! if (!t->host->dnserror) { if (use_sntp) { sprintf(cmd, "%s %s -d %d %s 2>&1", cmdpath, xgetenv("SNTPOPTS"), extcmdtimeout-1, ip_to_test(t->host)); } --- 1082,1089 ---- strcpy(cmdpath, (use_sntp ? xgetenv("SNTP") : xgetenv("NTPDATE")) ); for (t=service->items; (t); t = t->next) { ! /* Do not run NTP test if host does not resolve in DNS or is down */ ! if (!t->host->dnserror && !t->host->pingerror) { if (use_sntp) { sprintf(cmd, "%s %s -d %d %s 2>&1", cmdpath, xgetenv("SNTPOPTS"), extcmdtimeout-1, ip_to_test(t->host)); } *************** *** 1090,1096 **** p = xgetenv("RPCINFO"); strcpy(cmdpath, (p ? p : "rpcinfo")); for (t=service->items; (t); t = t->next) { ! if (!t->host->dnserror && (t->host->downcount == 0)) { sprintf(cmd, "%s -p %s 2>&1", cmdpath, ip_to_test(t->host)); t->open = (run_command(cmd, NULL, t->banner, 1, extcmdtimeout) == 0); } --- 1107,1114 ---- p = xgetenv("RPCINFO"); strcpy(cmdpath, (p ? p : "rpcinfo")); for (t=service->items; (t); t = t->next) { ! /* Do not run RPCINFO test if host does not resolve in DNS or is down */ ! if (!t->host->dnserror && (t->host->downcount == 0) && !t->host->pingerror) { sprintf(cmd, "%s -p %s 2>&1", cmdpath, ip_to_test(t->host)); t->open = (run_command(cmd, NULL, t->banner, 1, extcmdtimeout) == 0); } *************** *** 1467,1472 **** --- 1485,1493 ---- color = COL_YELLOW; } + /* Set pingerror for later use by NTP and RPCINFO tests */ + test->host->pingerror = (color == COL_RED ? 1 : 0); + /* Handle "badconn" */ if ((color == COL_RED) && (test->host->downcount < test->host->badconn[2])) { if (test->host->downcount >= test->host->badconn[1]) color = COL_YELLOW; *************** *** 2236,2241 **** --- 2257,2263 ---- printf("Usage: %s [options] [host1 host2 host3 ...]\n", argv[0]); printf("General options:\n"); printf(" --timeout=N : Timeout (in seconds) for service tests\n"); + printf(" --cmdtimeout=N : Timeout for external commands for testing NTP, RPC and traceroute\n"); printf(" --concurrency=N : Number of tests run in parallel\n"); printf(" --dns-timeout=N : DNS lookups timeout and fail after N seconds [30]\n"); printf(" --dns=[only|ip|standard] : How IP's are decided\n"); *************** *** 2604,2609 **** --- 2626,2635 ---- addtostatus("\n\nError output:\n"); addtostatus(prehtmlquoted(errbuf)); } + if (warnbuf) { + addtostatus("\n\nWarning output:\n"); + addtostatus(prehtmlquoted(warnbuf)); + } show_timestamps(×tamps); addtostatus(timestamps); *** ./xymonnet/xymonnet.h.orig 2015-10-19 02:18:34.000000000 -0600 --- ./xymonnet/xymonnet.h 2019-04-29 16:23:32.485382000 -0600 *************** *** 42,52 **** * banner nosslcert | | * certinfo dodns | | * duration dnserror | | ! * badtest ////////// | | ! * downcount repeattest | | ! * downstart noconn | | ! * privdata ----+ noping | | ! * next | badconn | | * | downcount | | * | downstart | | * | routerdeps | | --- 42,53 ---- * banner nosslcert | | * certinfo dodns | | * duration dnserror | | ! * badtest pingerror | | ! * downcount ////////// | | ! * downstart repeattest | | ! * privdata ----+ noconn | | ! * next | noping | | ! * | badconn | | * | downcount | | * | downstart | | * | routerdeps | | *************** *** 91,96 **** --- 92,98 ---- int hidehttp; /* hidehttp flag */ int dodns; /* set while loading tests if we need to do a DNS lookup */ int dnserror; /* set internally if we cannot find the host's IP */ + int pingerror; /* set internally if host does not answer ping */ int repeattest; /* Set if this host goes on the quick poll list */ char *hosttype; /* For the "Intermediate HOSTTYPE is down" message */