[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [hobbit] Disk RRD problem with older BB client
- To: hobbit (at) hswn.dk
- Subject: Re: [hobbit] Disk RRD problem with older BB client
- From: Henrik Stoerner <henrik (at) hswn.dk>
- Date: Tue, 15 Feb 2005 22:20:30 +0100
- References: <20050215192244.GB27426@qwestip.net>
- User-agent: Mutt/1.5.5.1i
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
--- 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]);