Xymon Mailing List Archive search

Disk RRD problem with older BB client

2 messages in this thread

list Asif Iqbal · Tue, 15 Feb 2005 14:22:44 -0500 ·
Hi All

I noticed if a BB Client (like 1.8b3) reports the host name with comma
instead of dot (.) it fails to create RRD files. For new BB Client
(bb1.9e) it sends the host name with dots and it created the RRD for
disk just fine

Here is a sample RRD error in larrd-status.log file

2005-02-15 14:18:26 RRD error creating
/export/home/hobbit/data/rrd/host.ip.qwest.net/disk,/dev/md/dsk/d0.rrd:
creating '/export/home/hobbit/data/rrd/host.ip.qwest.net/disk,/dev/md/dsk/d0.rrd': No such file
or directory

You see it tried to convert the commas into dots but didn't quite
workout

I can go ahead and upgrade BB Client on the hosts unless there is a way
I can convert the commas in the FQDNs to dots in a Hobbit way.

Thanks for any suggestion/feedback
 
-- 
Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
"...it said: Install Windows XP or better...so I installed Solaris..."
list Henrik Størner · Tue, 15 Feb 2005 22:20:30 +0100 ·
quoted from Asif Iqbal
On Tue, Feb 15, 2005 at 02:22:44PM -0500, Asif Iqbal wrote:
I noticed if a BB Client (like 1.8b3) reports the host name with comma
instead of dot (.) it fails to create RRD files. For new BB Client
(bb1.9e) it sends the host name with dots and it created the RRD for
disk just fine

2005-02-15 14:18:26 RRD error creating
/export/home/hobbit/data/rrd/host.ip.qwest.net/disk,/dev/md/dsk/d0.rrd:
Oops - this is something I've forgotten to fix. It happens when a disk
report from a Unix system contains the word "Filesystem" - then it's
mistaken for a report from a Windows client.

Patch attached.


Henrik
-------------- next part --------------
--- hobbitd/larrd/do_disk.c	2005/02/06 08:49:02	1.8
+++ hobbitd/larrd/do_disk.c	2005/02/15 21:19:22
@@ -8,7 +8,7 @@
 /*                                                                            */
 /*----------------------------------------------------------------------------*/
 
-static char disk_rcsid[] = "$Id: do_disk.c,v 1.8 2005/02/06 08:49:02 henrik Exp $";
+static char disk_rcsid[] = "$Id: do_disk.c,v 1.9 2005/02/15 21:19:13 henrik Exp $";
 
 static char *disk_params[] = { "rrdcreate", rrdfn, "DS:pct:GAUGE:600:0:100", "DS:used:GAUGE:600:0:U", 
 				rra1, rra2, rra3, rra4, NULL };
@@ -46,6 +46,13 @@
 		fsline = xstrdup(curline); i = 0; p = strtok(fsline, " ");
 		while (p && (i < 20)) { columns[i++] = p; p = strtok(NULL, " "); }
 
+		/* 
+		 * Some Unix filesystem reports contain the word "Filesystem".
+		 * So check if there's a slash in the NT filesystem letter - if yes,
+		 * then it's really a Unix system after all.
+		 */
+		if ((dsystype == DT_NT) && strchr(columns[0], '/') && strlen(columns[5])) dsystype = DT_UNIX;
• switch (dsystype) {
 		  case DT_IRIX:
 			diskname = xstrdup(columns[6]);