Xymon Mailing List Archive search

How to debug hobbit-clients.cfg file when trying to ignore a filesystem

5 messages in this thread

list Quentin White · Thu, 10 Aug 2006 12:40:06 +0100 ·
I have an situation where one of my Linux client servers has a 99%
filesystem that I want to ignore (/iscsi) but I cannot get
Hobbit(version 4.2-beta-20060605) to do so!! 

The alert is :

/iscsi (99% used) has reached the PANIC level (95%)

Filesystem         1024-blocks      Used Available Capacity Mounted on
/dev/sdc1            197131940 184823364   2294864      99% /iscsi

In the hobbit-clients.cfg, I have the following lines:

HOST=ld-sybase01.endeavour-capital.com,ld-sybase01
        MEMSWAP 101 101
        DISK /iscsi 101 101

Running this command ../bin/bbcmd hobbitd_client --dump-config | fgrep
ld-sybase gives me the following. 

2006-08-10 12:21:57 Using default environment file
/usr/local/hobbit/server/etc/hobbitserver.cfg
MEMSWAP 101 101 HOST=ld-sybase01.endeavour-capital.com,ld-sybase01
(line: 403)
DISK /iscsi 101% 101% 0 -1 red
HOST=ld-sybase01.endeavour-capital.com,ld-sybase01 (line: 404)

But it doesn't ignore it !!!!!

Running the same command with the "--test" option fails.  With core dump
(does this will all servers)
2006-08-10 12:23:07 Using default environment file
/usr/local/hobbit/server/etc/hobbitserver.cfg
Hostname (.=end, ?=dump, !=reload) []: ld-sybase01
Hosttype (.=end, ?=dump, !=reload) []: server
Test (cpu, mem, disk, proc, log, port): cpu 
Load: Yellow at 7.00, red at 10.00
Uptime: From boot until 5m ,and after  uptime
Hostname (.=end, ?=dump, !=reload) [ld-sybase01]: 
Hosttype (.=end, ?=dump, !=reload) [server]: server
Test (cpu, mem, disk, proc, log, port): disk
Filesystem: /iscsi
Segmentation Fault (core dumped)

Running the gdb command on the core file as per the "Known issues" page
yields this:

#0  0x0001def8 in get_disk_thresholds (hinfo=0x4e548, classname=0x0,
fsname=0xffbfcfe0 "/iscsi", warnlevel=0xffbfcbac, 
    paniclevel=0xffbfcba8, abswarn=0xffbfcba4, abspanic=0xffbfcbb0,
group=0x0) at client_config.c:1240
#1  0x00019628 in testmode (configfn=0x0) at hobbitd_client.c:1312
#2  0x0001a5f0 in main (argc=-8192, argv=0x2a800) at
hobbitd_client.c:1509

How can I debug this?

Thanks,

Quentin

The information in this email is provided for the addressee's information purposes only and is not as an offer or solicitation for the purchase or sale of any financial instrument. This message may contain confidential or privileged information. You must delete and not use it if you are not the intended recipient. The information may not be passed on or reproduced without Endeavour Capital LLP's written consent. 

Email transmission across the internet is not secure and the information contained in this email may not be complete or error-free. Accordingly you should not act or rely on the correctness of such information. All liability of Endeavour Capital LLP and its associated companies for any loss or damage resulting from such reliance or other e-mail use is excluded to the fullest extent permitted by law. 

To the extent this communication is issued to persons in the United Kingdom and constitutes a financial promotion, or an invitation or inducement to participate in a collective investment scheme (within the meaning of the Financial Services and Markets Act 2000), it is issued to and directed at persons who are either intermediate customers or market counterparties for the purposes of the FSA Conduct of Business Sourcebook, and no other person should act or rely upon it. 

Endeavour Capital LLP is authorised and regulated by the Financial Services Authority. 


This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
list Craig Whilding · Thu, 10 Aug 2006 13:45:59 +0100 ·
You can use the IGNORE tag is you don't want it showing on the page at
all.

Craig

-----Original Message-----
From: Quentin White [mailto:user-b4529cb54882@xymon.invalid] 
Sent: 10 August 2006 12:40
To: user-ae9b8668bcde@xymon.invalid
Subject: [hobbit] How to debug hobbit-clients.cfg file when trying to
ignore a filesystem
quoted from Quentin White

I have an situation where one of my Linux client servers has a 99%
filesystem that I want to ignore (/iscsi) but I cannot get
Hobbit(version 4.2-beta-20060605) to do so!! 

The alert is :

/iscsi (99% used) has reached the PANIC level (95%)

Filesystem         1024-blocks      Used Available Capacity Mounted on
/dev/sdc1            197131940 184823364   2294864      99% /iscsi

In the hobbit-clients.cfg, I have the following lines:

HOST=ld-sybase01.endeavour-capital.com,ld-sybase01
        MEMSWAP 101 101
        DISK /iscsi 101 101

Running this command ../bin/bbcmd hobbitd_client --dump-config | fgrep
ld-sybase gives me the following. 

2006-08-10 12:21:57 Using default environment file
/usr/local/hobbit/server/etc/hobbitserver.cfg
MEMSWAP 101 101 HOST=ld-sybase01.endeavour-capital.com,ld-sybase01
(line: 403)
DISK /iscsi 101% 101% 0 -1 red
HOST=ld-sybase01.endeavour-capital.com,ld-sybase01 (line: 404)

But it doesn't ignore it !!!!!

Running the same command with the "--test" option fails.  With core dump
(does this will all servers)
2006-08-10 12:23:07 Using default environment file
/usr/local/hobbit/server/etc/hobbitserver.cfg
Hostname (.=end, ?=dump, !=reload) []: ld-sybase01
Hosttype (.=end, ?=dump, !=reload) []: server
Test (cpu, mem, disk, proc, log, port): cpu 
Load: Yellow at 7.00, red at 10.00
Uptime: From boot until 5m ,and after  uptime
Hostname (.=end, ?=dump, !=reload) [ld-sybase01]: 
Hosttype (.=end, ?=dump, !=reload) [server]: server
Test (cpu, mem, disk, proc, log, port): disk
Filesystem: /iscsi
Segmentation Fault (core dumped)

Running the gdb command on the core file as per the "Known issues" page
yields this:

#0  0x0001def8 in get_disk_thresholds (hinfo=0x4e548, classname=0x0,
fsname=0xffbfcfe0 "/iscsi", warnlevel=0xffbfcbac, 
    paniclevel=0xffbfcba8, abswarn=0xffbfcba4, abspanic=0xffbfcbb0,
group=0x0) at client_config.c:1240
#1  0x00019628 in testmode (configfn=0x0) at hobbitd_client.c:1312
#2  0x0001a5f0 in main (argc=-8192, argv=0x2a800) at
hobbitd_client.c:1509

How can I debug this?

Thanks,

Quentin

The information in this email is provided for the addressee's
information purposes only and is not as an offer or solicitation for the
purchase or sale of any financial instrument. This message may contain
confidential or privileged information. You must delete and not use it
if you are not the intended recipient. The information may not be passed
on or reproduced without Endeavour Capital LLP's written consent. 

Email transmission across the internet is not secure and the information
contained in this email may not be complete or error-free. Accordingly
you should not act or rely on the correctness of such information. All
liability of Endeavour Capital LLP and its associated companies for any
loss or damage resulting from such reliance or other e-mail use is
excluded to the fullest extent permitted by law. 

To the extent this communication is issued to persons in the United
Kingdom and constitutes a financial promotion, or an invitation or
inducement to participate in a collective investment scheme (within the
meaning of the Financial Services and Markets Act 2000), it is issued to
and directed at persons who are either intermediate customers or market
counterparties for the purposes of the FSA Conduct of Business
Sourcebook, and no other person should act or rely upon it. 

Endeavour Capital LLP is authorised and regulated by the Financial
Services Authority. 


This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
list Henrik Størner · Thu, 10 Aug 2006 17:05:42 +0200 ·
quoted from Quentin White
On Thu, Aug 10, 2006 at 12:40:06PM +0100, Quentin White wrote:
Running the same command with the "--test" option fails.  With core dump
Hostname (.=end, ?=dump, !=reload) [ld-sybase01]: 
Hosttype (.=end, ?=dump, !=reload) [server]: server
Test (cpu, mem, disk, proc, log, port): disk
Filesystem: /iscsi
Segmentation Fault (core dumped)
Sorry about that, it affects the --test mode only though - normal use of
it should be OK.

You can get test-mode working by saving the attached file to
/tmp/client-testmode.patch, then doing

    cd hobbit-4.2.0
    patch -p0 </tmp/client-testmode.patch
    make
    make install (as root)

Restart hobbit afterwards.


Regards,
Henrik
list Henrik Størner · Thu, 10 Aug 2006 17:14:16 +0200 ·
quoted from Henrik Størner
On Thu, Aug 10, 2006 at 05:05:42PM +0200, Henrik Stoerner wrote:
You can get test-mode working by saving the attached file to
/tmp/client-testmode.patch, then doing
[snip]

and I forgot to attach the file ...

Henrik

-------------- next part --------------
--- hobbitd/hobbitd_client.c	2006/08/09 08:49:19	1.100
+++ hobbitd/hobbitd_client.c	2006/08/10 15:04:28
@@ -11,7 +11,7 @@
 /*                                                                            */
 /*----------------------------------------------------------------------------*/
 
-static char rcsid[] = "$Id: hobbitd_client.c,v 1.100 2006/08/09 08:49:19 henrik Rel $";
+static char rcsid[] = "$Id: hobbitd_client.c,v 1.101 2006/08/10 15:04:20 henrik Exp $";
 
 #include <stdio.h>
 #include <string.h>
@@ -1490,11 +1490,12 @@
 		else if (strcmp(s, "disk") == 0) {
 			unsigned long warnlevel, paniclevel;
 			int abswarn, abspanic, ignored;
+			char *groups;
 
 			printf("Filesystem: "); fflush(stdout);
 			fgets(s, sizeof(s), stdin); clean_instr(s);
 			cfid = get_disk_thresholds(hinfo, clientclass, s, &warnlevel, &paniclevel, 
-						   &abswarn, &abspanic, &ignored, NULL);
+						   &abswarn, &abspanic, &ignored, &groups);
 			if (ignored) 
 				printf("Ignored\n");
 			else
@@ -1506,6 +1507,7 @@
 			int pchecks = clear_process_counts(hinfo, clientclass);
 			char *pname, *pid;
 			int pcount, pmin, pmax, pcolor, ptrack;
+			char *groups;
 			FILE *fd;
 
 			if (pchecks == 0) {
@@ -1530,7 +1532,7 @@
 				}
 			} while (*s);
 
-			while ((pname = check_process_count(&pcount, &pmin, &pmax, &pcolor, &pid, &ptrack, NULL)) != NULL) {
+			while ((pname = check_process_count(&pcount, &pmin, &pmax, &pcolor, &pid, &ptrack, &groups)) != NULL) {
 				printf("Process %s color %s: Count=%d, min=%d, max=%d\n",
 					pname, colorname(pcolor), pcount, pmin, pmax);
 			}
@@ -1576,6 +1578,7 @@
 		else if (strcmp(s, "port") == 0) {
 			char *localstr, *remotestr, *statestr, *p, *pname, *pid;
 			int pcount, pmin, pmax, pcolor, pchecks, ptrack;
+			char *groups;
 			int localcol = 4, remotecol = 5, statecol = 6, portcolor = COL_GREEN;
 
 			pchecks = clear_port_counts(hinfo, clientclass);
@@ -1619,7 +1622,7 @@
 			} while (*s);
 
 			/* Check the number found for each monitored port */
- 			while ((pname = check_port_count(&pcount, &pmin, &pmax, &pcolor, &pid, &ptrack, NULL)) != NULL) {
+ 			while ((pname = check_port_count(&pcount, &pmin, &pmax, &pcolor, &pid, &ptrack, &groups)) != NULL) {
  				char limtxt[1024];
 			
 				if (pmax == -1) {
list Quentin White · Thu, 10 Aug 2006 16:51:17 +0100 ·
Fixed it!!

Found the client was being started with the "--local" option and hence
using the ~hobbit/client/etc/localclient.cfg" file for the limits - not
the servers.

Doh! 
quoted from Quentin White

-----Original Message-----
From: Quentin White 
Sent: 10 August 2006 12:40 PM
To: 'user-ae9b8668bcde@xymon.invalid'
Subject: How to debug hobbit-clients.cfg file when trying to ignore a
filesystem


I have an situation where one of my Linux client servers has a 99%
filesystem that I want to ignore (/iscsi) but I cannot get
Hobbit(version 4.2-beta-20060605) to do so!! 

The alert is :

/iscsi (99% used) has reached the PANIC level (95%)

Filesystem         1024-blocks      Used Available Capacity Mounted on
/dev/sdc1            197131940 184823364   2294864      99% /iscsi

In the hobbit-clients.cfg, I have the following lines:

HOST=ld-sybase01.endeavour-capital.com,ld-sybase01
        MEMSWAP 101 101
        DISK /iscsi 101 101

Running this command ../bin/bbcmd hobbitd_client --dump-config | fgrep
ld-sybase gives me the following. 

2006-08-10 12:21:57 Using default environment file
/usr/local/hobbit/server/etc/hobbitserver.cfg
MEMSWAP 101 101 HOST=ld-sybase01.endeavour-capital.com,ld-sybase01
(line: 403)
DISK /iscsi 101% 101% 0 -1 red
HOST=ld-sybase01.endeavour-capital.com,ld-sybase01 (line: 404)

But it doesn't ignore it !!!!!

Running the same command with the "--test" option fails.  With core dump
(does this will all servers)
2006-08-10 12:23:07 Using default environment file
/usr/local/hobbit/server/etc/hobbitserver.cfg
Hostname (.=end, ?=dump, !=reload) []: ld-sybase01
Hosttype (.=end, ?=dump, !=reload) []: server
Test (cpu, mem, disk, proc, log, port): cpu 
Load: Yellow at 7.00, red at 10.00
Uptime: From boot until 5m ,and after  uptime
Hostname (.=end, ?=dump, !=reload) [ld-sybase01]: 
Hosttype (.=end, ?=dump, !=reload) [server]: server
Test (cpu, mem, disk, proc, log, port): disk
Filesystem: /iscsi
Segmentation Fault (core dumped)

Running the gdb command on the core file as per the "Known issues" page
yields this:

#0  0x0001def8 in get_disk_thresholds (hinfo=0x4e548, classname=0x0,
fsname=0xffbfcfe0 "/iscsi", warnlevel=0xffbfcbac, 
    paniclevel=0xffbfcba8, abswarn=0xffbfcba4, abspanic=0xffbfcbb0,
group=0x0) at client_config.c:1240
#1  0x00019628 in testmode (configfn=0x0) at hobbitd_client.c:1312
#2  0x0001a5f0 in main (argc=-8192, argv=0x2a800) at
hobbitd_client.c:1509

How can I debug this?

Thanks,

Quentin

The information in this email is provided for the addressee's information purposes only and is not as an offer or solicitation for the purchase or sale of any financial instrument. This message may contain confidential or privileged information. You must delete and not use it if you are not the intended recipient. The information may not be passed on or reproduced without Endeavour Capital LLP's written consent. 

Email transmission across the internet is not secure and the information contained in this email may not be complete or error-free. Accordingly you should not act or rely on the correctness of such information. All liability of Endeavour Capital LLP and its associated companies for any loss or damage resulting from such reliance or other e-mail use is excluded to the fullest extent permitted by law. 

To the extent this communication is issued to persons in the United Kingdom and constitutes a financial promotion, or an invitation or inducement to participate in a collective investment scheme (within the meaning of the Financial Services and Markets Act 2000), it is issued to and directed at persons who are either intermediate customers or market counterparties for the purposes of the FSA Conduct of Business Sourcebook, and no other person should act or rely upon it. 

Endeavour Capital LLP is authorised and regulated by the Financial Services Authority. 


This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email