Xymon Mailing List Archive search

IPv6 debugging on xymon 4.4 (was Re: Roadmap/GitHub?/IPv6)

list Japheth Cleaver
Tue, 9 Apr 2019 14:12:25 -0700
Message-Id: <user-6dcfc904bbf0@xymon.invalid>

Actually, this ended up being pretty broken as-is -- possibly a commit was lost.
r8048 has the fix, or the attached patch should work too. Regular ping checks should work again.

https://sourceforge.net/p/xymon/code/8048/tree//branches/4.x-master/xymonnet/xymonnet.c?diff=516c17fd34309d2eb14bcb64:8047


HTH,
-jc

On 4/9/2019 9:33 AM, Japheth Cleaver wrote:
The first is the correct way of writing it, however the second really should be accepted as well IMO since it's not uncommon for things to be written that way.

Most of the response in https://lists.xymon.com/archive/2016-October/043993.html is about using both a 4.3.# and a 4.4-x xymon server as the destination points simultaneously. The 4.3 branch won't recognize or record the IPv6 IPs properly. So long as you're running 4.4-alpha in a normal fashion (talking to itself) it should work fine -- no separate hosts file needed or anything.

Can you send the relevant sections of xymmonet.log when running it in --debug mode?
Also, what version of fping are you running on the system?

-jc


On 4/9/2019 12:12 AM, Christian Herzog wrote:
Hi JC,

I now compiled 4.4 alpha and set up a test server. IPv4 monitoring is working
as expected. Can you remind me how to specify IPv6 tests? I found
https://lists.xymon.com/archive/2016-October/043993.html but can't make much
sense of it.

in particular:
- do I need any compile switches to enable IPv6 support?
- how to specify a v6 host? I tried
     2a01:4f8:162:464::113 testhost and
     [2a01:4f8:162:464::113] testhost
   the first yields conn red and the second doesn't work at all
- separate v6 hosts file ok, how to make it known then?


thanks,
-Christian


On Fri, Apr 05, 2019 at 08:53:39AM -0700, Japheth Cleaver wrote:
Hi Christian,

That's actually really great to hear. The current 4.4 alpha would be
https://sourceforge.net/p/xymon/code/HEAD/tree/branches/4.x-master/

I'll probably branch that after forward porting these patches coming in to
4.3.29, and trying to reduce some of the warnings I'm seeing in compiles. In
the meantime, any validation from snapshots off that branch would be
helpful.

Regards,
-jc

On 4/5/2019 4:47 AM, Christian Herzog wrote:
hey JC,

thanks for the status update. I've done some pretty extensive IPv6 xymon
testing 6 years ago ([1] and later private emails with Henrik) and found IPv6
support to be in pretty good shape in then 4.3.99.tgz. However, none of this
seems to be in 4.3.28.
Since we're now once again (and for reals this time!) on the verge of
introducing IPv6 into our networks, I'll have to come back to working on xymon
IPv6. I'd be happy to do all sorts of testing, but where to start? I can't
even find any 4.4 (alpha) tree out there.
Can you advise?

thanks and best regards,
-Christian


[1] https://xymon.xymon.narkive.com/BbXHR8kH/status-of-ipv6-support
On Fri, Mar 08, 2019 at 06:46:52AM -0800, Japheth Cleaver wrote:
I think a larger discussion on Xymon's roadmap in terms of Docker and
container analysis is definitely something warranted. A host-based approach
tends to invite individualized responses to coordination among varying
levels of architecture (including both host -> hypervisor, baremetal (eg,
DRAC) -> host, and hypervisor "status" reporting), but containers' typically
ephemeral nature could merit a distinct reference point -- or not, if it's
desired to have them persistently reportable. Host-Svc may or may not make
sense there.

I tend to agree that a move to Github may be helpful here at this point -
athough with the various community issues people have had with GH since MS's
purchase, it seems there has been a bit of an outcry, I'm not sure there's
much SF will end up being able to capitalize on. It would certainly make
PR's easier to coordinate and invite more interaction.

The largest stalling point on the roadmap here was indeed the IPv6
transition. I think things are releasable in an Alpha state, and that was
the intent at the last release, but it's been difficult to find any site
using IPv6 at sufficient scale who could help with the testing process.
That's a bit of a Catch-22 though, and perhaps it would be best to release
an easy reference point for future testing and go from there - along with
the various other patches that I've received. (And this does raise the
question of what the next highest priorities out there will be.)

Regards,
-jc

-------------- next part --------------
--- a/branches/4.x-master/xymonnet/xymonnet.c
+++ b/branches/4.x-master/xymonnet/xymonnet.c
@@ -8,7 +8,7 @@
 /*                                                                            */
 /*----------------------------------------------------------------------------*/
 -static char rcsid[] = "$Id: xymonnet.c 8044 2019-04-08 22:51:46Z jccleaver $";
+static char rcsid[] = "$Id: xymonnet.c 8048 2019-04-09 21:08:10Z jccleaver $";
  #include <limits.h>
 #include <stdio.h>
@@ -1264,7 +1264,7 @@
 	char 		*p;
 	char		l[MAX_LINE_LEN];
 	char		pingip[MAX_LINE_LEN];
-	int		ip1, ip2, ip3, ip4;
+	char		*eoip, eoipchar;
 	int		pingstatus, failed = 0, i;
 	char		fn[PATH_MAX];
 @@ -1337,29 +1337,31 @@
 			/* The test did run, and we have a result-file. Look at it. */
 			while (fgets(l, sizeof(l), logfd)) {
 				p = strchr(l, '\n'); if (p) *p = '\0';
-				if (sscanf(l, "%d.%d.%d.%d ", &ip1, &ip2, &ip3, &ip4) == 4) {
• -					sprintf(pingip, "%d.%d.%d.%d", ip1, ip2, ip3, ip4);
• -					/*
-					 * Need to loop through all testitems - there may be multiple entries for
-					 * the same IP-address.
-					 */
-					for (t=service->items; (t); t = t->next) {
-						if (strcmp(t->host->ip, pingip) == 0) {
-							if (t->open) dbgprintf("More than one ping result for %s\n", pingip);
-							t->open = (strstr(l, "is alive") != NULL);
-							t->banner = dupstrbuffer(l);
-						}
• -						if (t->host->extrapings) {
-							ipping_t *walk;
-							for (walk = t->host->extrapings->iplist; (walk); walk = walk->next) {
-								if (strcmp(walk->ip, pingip) == 0) {
-									if (t->open) dbgprintf("More than one ping result for %s\n", pingip);
-									walk->open = (strstr(l, "is alive") != NULL);
-									walk->banner = dupstrbuffer(l);
-								}
+				eoip = l + strcspn(l, " \t");
+				eoipchar = *eoip;
+				*eoip = '\0';
• +				if (conn_is_ip(l) == 0) continue;
+				sprintf(pingip, "%s", l);
+				*eoip = eoipchar;
• +				/*
+				 * Need to loop through all testitems - there may be multiple entries for
+				 * the same IP-address.
+				 */
+				for (t=service->items; (t); t = t->next) {
+					if (strcmp(t->host->ip, pingip) == 0) {
+						if (t->open) dbgprintf("More than one ping result for %s\n", pingip);
+						t->open = (strstr(l, "is alive") != NULL);
+						t->banner = dupstrbuffer(l);
+					}
+					if (t->host->extrapings) {
+						ipping_t *walk;
+						for (walk = t->host->extrapings->iplist; (walk); walk = walk->next) {
+							if (strcmp(walk->ip, pingip) == 0) {
+								if (t->open) dbgprintf("More than one ping result for %s\n", pingip);
+								walk->open = (strstr(l, "is alive") != NULL);
+								walk->banner = dupstrbuffer(l);
 							}
 						}
 					}