Xymon Mailing List Archive search

External scripts thresholds via hobbit-clients.cfg

14 messages in this thread

list Bill Richardson · Tue, 2 Jun 2009 14:49:31 -0400 ·
I have looked thru the mail archive and don't think this has been asked?
I think the answer is no but will ask just to make sure...
 
I have a common external script on a few hundred systems and would like
to be able to control the thresholds via the hobbit-clients.cfg file as
I do with the out-of-the-box tests. I don't want to have to change the
thresholds by editing each system individually. Is this possible?
 
Thanks 
 
Bill Richardson
list Jim Smith · Tue, 2 Jun 2009 12:54:39 -0600 ·
I don't know the answer, but it would be wonderful if that was possible!

 
Jim Smith

SVHS

Little Rock
quoted from Bill Richardson

 
From: Bill Richardson [mailto:user-47ee0335f310@xymon.invalid] 
Sent: Tuesday, June 02, 2009 1:50 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: [hobbit] External scripts thresholds via hobbit-clients.cfg

 
I have looked thru the mail archive and don't think this has been asked?
I think the answer is no but will ask just to make sure...

 
I have a common external script on a few hundred systems and would like
to be able to control the thresholds via the hobbit-clients.cfg file as
I do with the out-of-the-box tests. I don't want to have to change the
thresholds by editing each system individually. Is this possible?

 
Thanks 

 
Bill Richardson
list Kevin Kelly · Fri, 14 Oct 2011 10:02:34 -0500 ·
I have an external script and would like to be able to control the
threshold via the hobbit-clients.cfg file. Is there a way to do this?

 
-Kevin


This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
list Jeremy Laidman · Tue, 18 Oct 2011 11:45:06 +1100 ·
quoted from Kevin Kelly
On Sat, Oct 15, 2011 at 2:02 AM, Kevin Kelly <user-46671a9fcf56@xymon.invalid> wrote:
I have an external script and would like to be able to control the threshold
via the hobbit-clients.cfg file. Is there a way to do this?
In later versions (Xymon, not Hobbit) you can alarm on RRD values, so
if you're graphing the values being tested in your script then you can
set the thresholds.  This is done in analysis.cfg, which is what
replaced hobbit-clients.cfg after the product name change.

Cheers
Jeremy
list Scot Kreienkamp · Wed, 19 Oct 2011 01:34:01 +0000 ·
Anyone have a working example?  I am still unable to get this to work.  
quoted from Jeremy Laidman

-----Original Message-----
From: xymon-bounces at xymon.com [mailto:xymon-bounces at xymon.com] On Behalf Of Jeremy Laidman
Sent: Monday, October 17, 2011 8:45 PM
To: Kevin Kelly
Cc: xymon at xymon.com
Subject: Re: [Xymon] External scripts thresholds via hobbit-clients.cfg

On Sat, Oct 15, 2011 at 2:02 AM, Kevin Kelly <user-46671a9fcf56@xymon.invalid> wrote:
I have an external script and would like to be able to control the 
threshold via the hobbit-clients.cfg file. Is there a way to do this?
In later versions (Xymon, not Hobbit) you can alarm on RRD values, so if you're graphing the values being tested in your script then you can set the thresholds.  This is done in analysis.cfg, which is what replaced hobbit-clients.cfg after the product name change.

Cheers
Jeremy
list Jeremy Laidman · Wed, 19 Oct 2011 16:15:56 +1100 ·
quoted from Scot Kreienkamp
On Wed, Oct 19, 2011 at 12:34 PM, Scot Kreienkamp <user-462cf0b6d846@xymon.invalid> wrote:
Anyone have a working example?  I am still unable to get this to work.
From analysis.cfg:

HOST=%^ntp\d
    DS ntp ntpstat.rrd:offsetms >10 COLOR=red "TEXT=NTP offset &Vms
higher than &Ums"
    DS ntp ntpstat.rrd:offsetms >5 COLOR=yellow "TEXT=NTP offset &Vms
higher than &Ums"
    DS ntp ntpstat.rrd:offsetms <-10 COLOR=red "TEXT=NTP offset &Vms
lower than &Lms"
    DS ntp ntpstat.rrd:offsetms <-5 COLOR=yellow "TEXT=NTP offset &Vms
lower than &Lms"

This monitors NTP offset and alerts on exceeding the thresholds and
sends the status to the "ntp" status page.  I enabled this only today,
and while it generates alerts on exceeding the threshold, it hasn't
been "bedded in" so there might be faults with how I've used this.

Note that the doco (man analysis.cfg) shows the correct format but
misses the column in the example.

Cheers
Jeremy
list Ryan Novosielski · Wed, 19 Oct 2011 01:52:33 -0400 ·
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
quoted from Jeremy Laidman

On 10/17/2011 08:45 PM, Jeremy Laidman wrote:
On Sat, Oct 15, 2011 at 2:02 AM, Kevin Kelly <user-46671a9fcf56@xymon.invalid> wrote:
I have an external script and would like to be able to control the threshold
via the hobbit-clients.cfg file. Is there a way to do this?
In later versions (Xymon, not Hobbit) you can alarm on RRD values, so
if you're graphing the values being tested in your script then you can
set the thresholds.  This is done in analysis.cfg, which is what
replaced hobbit-clients.cfg after the product name change.
Seems as if down the road I might be able to use this for the question I
asked about a month ago (in the "conn" test, there is a graph for ping
response time but no way to alarm on a high value as the test is
written). Would others agree or am I mistaken?

- -- 
- ---- _  _ _  _ ___  _  _  _
|Y#| |  | |\/| |  \ |\ |  | |Ryan Novosielski - Sr. Systems Programmer
|$&| |__| |  | |__/ | \| _| |user-ae4522577e16@xymon.invalid - 973/972.0922 (2-0922)
\__/ Univ. of Med. and Dent.|IST/CST-Academic Svcs. - ADMC 450, Newark
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk6eZaEACgkQmb+gadEcsb4YGwCfYh0jj64XYpvbS/uPa4T1zEDU
H4cAoJM5JU2h1fEZez/PWSJBtKvztKIO
=Cxi0
-----END PGP SIGNATURE-----
list Ralph Mitchell · Wed, 19 Oct 2011 07:54:40 -0400 ·
quoted from Jeremy Laidman
On Wed, Oct 19, 2011 at 1:15 AM, Jeremy Laidman <user-71895fb2e44c@xymon.invalid>wrote:
On Wed, Oct 19, 2011 at 12:34 PM, Scot Kreienkamp <user-462cf0b6d846@xymon.invalid>
wrote:
Anyone have a working example?  I am still unable to get this to work.
From analysis.cfg:

HOST=%^ntp\d
   DS ntp ntpstat.rrd:offsetms >10 COLOR=red "TEXT=NTP offset &Vms
higher than &Ums"
   DS ntp ntpstat.rrd:offsetms >5 COLOR=yellow "TEXT=NTP offset &Vms
higher than &Ums"
   DS ntp ntpstat.rrd:offsetms <-10 COLOR=red "TEXT=NTP offset &Vms
lower than &Lms"
   DS ntp ntpstat.rrd:offsetms <-5 COLOR=yellow "TEXT=NTP offset &Vms
lower than &Lms"

This monitors NTP offset and alerts on exceeding the thresholds and
sends the status to the "ntp" status page.  I enabled this only today,
and while it generates alerts on exceeding the threshold, it hasn't
been "bedded in" so there might be faults with how I've used this.

Note that the doco (man analysis.cfg) shows the correct format but
misses the column in the example.

Does that create a new column called "ntp", or do you already have the "ntp"
column and the DS check simply changes its colour??

Ralph Mitchell
list Scot Kreienkamp · Wed, 19 Oct 2011 14:56:49 +0000 ·
OK, I'm completely stumped on this one, and very Frustrated.

Here's my line:
DS Users cmrtgusers.rrd:ds0 >3 COLOR=red "TEXT=Exceeding 30 logged in users"

The last value from the rrd was 35, so the line should be hit, but I get nothing.  I added debug to all the modules, I've tried several names for the column, I even linked the rrd to another name because it had a dash in the middle thinking the parser might not like that.  Still nothing.  I also then removed the rrd completely, hoping that I would at least get a line in one of the logfiles indicating a missing rrd.  I get NOTHING no matter what I do.  What am I doing wrong???  HELP!

Scot Kreienkamp
user-462cf0b6d846@xymon.invalid
quoted from Ralph Mitchell

From: Ralph Mitchell [mailto:user-00a5e44c48c0@xymon.invalid]
Sent: Wednesday, October 19, 2011 7:55 AM
To: Jeremy Laidman
Cc: Scot Kreienkamp; xymon at xymon.com
Subject: Re: [Xymon] External scripts thresholds via hobbit-clients.cfg

On Wed, Oct 19, 2011 at 1:15 AM, Jeremy Laidman <user-71895fb2e44c@xymon.invalid<mailto:user-71895fb2e44c@xymon.invalid>> wrote:
On Wed, Oct 19, 2011 at 12:34 PM, Scot Kreienkamp <user-462cf0b6d846@xymon.invalid<mailto:user-462cf0b6d846@xymon.invalid>> wrote:
Anyone have a working example?  I am still unable to get this to work.
From analysis.cfg:

HOST=%^ntp\d
   DS ntp ntpstat.rrd:offsetms >10 COLOR=red "TEXT=NTP offset &Vms
higher than &Ums"
   DS ntp ntpstat.rrd:offsetms >5 COLOR=yellow "TEXT=NTP offset &Vms
higher than &Ums"
   DS ntp ntpstat.rrd:offsetms <-10 COLOR=red "TEXT=NTP offset &Vms
lower than &Lms"
   DS ntp ntpstat.rrd:offsetms <-5 COLOR=yellow "TEXT=NTP offset &Vms
lower than &Lms"

This monitors NTP offset and alerts on exceeding the thresholds and
sends the status to the "ntp" status page.  I enabled this only today,
and while it generates alerts on exceeding the threshold, it hasn't
been "bedded in" so there might be faults with how I've used this.

Note that the doco (man analysis.cfg) shows the correct format but
misses the column in the example.

Does that create a new column called "ntp", or do you already have the "ntp" column and the DS check simply changes its colour??

Ralph Mitchell

This message is intended only for the individual or entity to which it is addressed. It may contain privileged, confidential information which is exempt from disclosure under applicable laws. If you are not the intended recipient, please note that you are strictly prohibited from disseminating or distributing this information (other than to the intended recipient) or copying this information. If you have received this communication in error, please notify us immediately by e-mail or by telephone at the above number. Thank you.
list Ralph Mitchell · Wed, 19 Oct 2011 12:39:03 -0400 ·
quoted from Scot Kreienkamp
On Wed, Oct 19, 2011 at 10:56 AM, Scot Kreienkamp <user-462cf0b6d846@xymon.invalid>wrote:
 OK, I'm completely stumped on this one, and very Frustrated.


Here's my line:

DS Users cmrtgusers.rrd:ds0 >3 COLOR=red "TEXT=Exceeding 30 logged in
users"


The last value from the rrd was 35, so the line should be hit, but I get
nothing.  I added debug to all the modules, I've tried several names for the
column, I even linked the rrd to another name because it had a dash in the
middle thinking the parser might not like that.  Still nothing.  I also then
removed the rrd completely, hoping that I would at least get a line in one
of the logfiles indicating a missing rrd.  I get NOTHING no matter what I
do.  What am I doing wrong???  HELP!
I've just proved to my own satisfaction that a space between the symbol and
the number prevents the number from being read correctly.  i,.e.  ">15.0"
works, but "> 15.0" does not.  You can verify the number is being read by
inserting &L or &U in the TEXT string:

      DS Users cmrtgusers.rrd:ds0 >3 COLOR=red "TEXT=Exceeding &L logged in
users"

You should see "Exceeding 3.00 logged in users".  It seems to be OK without
or without the decimal, but with a space the number is read as 0.00.

If I found the correct piece, the code is in
xymon-4.3.3/xymond/client_config.c starting at line 1383 (line 1404 in
xymon-4.3.5).  The number is converted by atof() at line 1438 (line 1439 in
4.3.5), which is supposed to be able to deal with optional leading
whitespace, but apparently that's not happening here.

It takes a while for xymon to re-read the analysis.cfg file, so you might
want to alter the TEXT string a bit each time you try something, so you know
when the update takes effect.

Ralph Mitchell
list Scot Kreienkamp · Thu, 20 Oct 2011 01:02:29 +0000 ·
Raph,

From your post, it sounds like I should be getting a column named Users, according to my config?  If so, I don't get that column.  Even if I name it as a column that already exists I don't get any additional info in that column.  It's like the lines in analysis.cfg are being totally ignored.

I upgraded to 4.3.5 this afternoon also, just in case it might have been something with the version I was running previously.  I set debug on all the services I thought might be responsible for this operation and there's no mention of the column or the RRD in the logfiles.

Thanks for the help.  I've got to be doing something wrong or encountering a bug of some kind, but I'm totally lost as to what it is.

Scot Kreienkamp
user-462cf0b6d846@xymon.invalid
quoted from Ralph Mitchell

From: xymon-bounces at xymon.com [mailto:xymon-bounces at xymon.com] On Behalf Of Ralph Mitchell
Sent: Wednesday, October 19, 2011 12:39 PM
To: xymon at xymon.com
Subject: Re: [Xymon] External scripts thresholds via hobbit-clients.cfg

On Wed, Oct 19, 2011 at 10:56 AM, Scot Kreienkamp <user-462cf0b6d846@xymon.invalid<mailto:user-462cf0b6d846@xymon.invalid>> wrote:
OK, I'm completely stumped on this one, and very Frustrated.

Here's my line:
DS Users cmrtgusers.rrd:ds0 >3 COLOR=red "TEXT=Exceeding 30 logged in users"

The last value from the rrd was 35, so the line should be hit, but I get nothing.  I added debug to all the modules, I've tried several names for the column, I even linked the rrd to another name because it had a dash in the middle thinking the parser might not like that.  Still nothing.  I also then removed the rrd completely, hoping that I would at least get a line in one of the logfiles indicating a missing rrd.  I get NOTHING no matter what I do.  What am I doing wrong???  HELP!

I've just proved to my own satisfaction that a space between the symbol and the number prevents the number from being read correctly.  i,.e.  ">15.0" works, but "> 15.0" does not.  You can verify the number is being read by inserting &L or &U in the TEXT string:

      DS Users cmrtgusers.rrd:ds0 >3 COLOR=red "TEXT=Exceeding &L logged in users"

You should see "Exceeding 3.00 logged in users".  It seems to be OK without or without the decimal, but with a space the number is read as 0.00.

If I found the correct piece, the code is in xymon-4.3.3/xymond/client_config.c starting at line 1383 (line 1404 in xymon-4.3.5).  The number is converted by atof() at line 1438 (line 1439 in 4.3.5), which is supposed to be able to deal with optional leading whitespace, but apparently that's not happening here.

It takes a while for xymon to re-read the analysis.cfg file, so you might want to alter the TEXT string a bit each time you try something, so you know when the update takes effect.

Ralph Mitchell
This message is intended only for the individual or entity to which it is addressed. It may contain privileged, confidential information which is exempt from disclosure under applicable laws. If you are not the intended recipient, please note that you are strictly prohibited from disseminating or distributing this information (other than to the intended recipient) or copying this information. If you have received this communication in error, please notify us immediately by e-mail or by telephone at the above number. Thank you.
list Ralph Mitchell · Wed, 19 Oct 2011 21:44:41 -0400 ·
According to the manual page:

      "column" is the statuscolumn that will be modified

so it already exists.

You're absolutely *sure* the rrd is cmrtgusers.rrd and has a data variable
called ds0?

Ralph Mitchell
quoted from Scot Kreienkamp


On Wed, Oct 19, 2011 at 9:02 PM, Scot Kreienkamp <user-462cf0b6d846@xymon.invalid>wrote:
 Raph,


From your post, it sounds like I should be getting a column named Users,
according to my config?  If so, I don't get that column.  Even if I name it
as a column that already exists I don't get any additional info in that
column.  It's like the lines in analysis.cfg are being totally ignored.


I upgraded to 4.3.5 this afternoon also, just in case it might have been
something with the version I was running previously.  I set debug on all the
services I thought might be responsible for this operation and there's no
mention of the column or the RRD in the logfiles.


Thanks for the help.  I've got to be doing something wrong or encountering
a bug of some kind, but I'm totally lost as to what it is.


Scot Kreienkamp

user-462cf0b6d846@xymon.invalid


*From:* xymon-bounces at xymon.com [mailto:xymon-bounces at xymon.com] *On
Behalf Of *Ralph Mitchell
*Sent:* Wednesday, October 19, 2011 12:39 PM
*To:* xymon at xymon.com

*Subject:* Re: [Xymon] External scripts thresholds via hobbit-clients.cfg


On Wed, Oct 19, 2011 at 10:56 AM, Scot Kreienkamp <user-462cf0b6d846@xymon.invalid>
quoted from Scot Kreienkamp
wrote:

OK, I'm completely stumped on this one, and very Frustrated.


Here's my line:

DS Users cmrtgusers.rrd:ds0 >3 COLOR=red "TEXT=Exceeding 30 logged in
users"


The last value from the rrd was 35, so the line should be hit, but I get
nothing.  I added debug to all the modules, I've tried several names for the
column, I even linked the rrd to another name because it had a dash in the
middle thinking the parser might not like that.  Still nothing.  I also then
removed the rrd completely, hoping that I would at least get a line in one
of the logfiles indicating a missing rrd.  I get NOTHING no matter what I
do.  What am I doing wrong???  HELP!


I've just proved to my own satisfaction that a space between the symbol and
the number prevents the number from being read correctly.  i,.e.  ">15.0"
works, but "> 15.0" does not.  You can verify the number is being read by
inserting &L or &U in the TEXT string:


      DS Users cmrtgusers.rrd:ds0 >3 COLOR=red "TEXT=Exceeding &L logged in
users"


You should see "Exceeding 3.00 logged in users".  It seems to be OK without
or without the decimal, but with a space the number is read as 0.00.


If I found the correct piece, the code is in
xymon-4.3.3/xymond/client_config.c starting at line 1383 (line 1404 in
xymon-4.3.5).  The number is converted by atof() at line 1438 (line 1439 in
4.3.5), which is supposed to be able to deal with optional leading
whitespace, but apparently that's not happening here.


It takes a while for xymon to re-read the analysis.cfg file, so you might
want to alter the TEXT string a bit each time you try something, so you know
when the update takes effect.


Ralph Mitchell
  This message is intended only for the individual or entity to which it
is addressed. It may contain privileged, confidential information which is
exempt from disclosure under applicable laws. If you are not the intended
recipient, please note that you are strictly prohibited from disseminating
or distributing this information (other than to the intended recipient) or
copying this information. If you have received this communication in error,
please notify us immediately by e-mail or by telephone at the above number.
Thank you.
list Scot Kreienkamp · Thu, 20 Oct 2011 01:59:26 +0000 ·
Quite sure.

Since the column has to exist I changed it to conn for now in analysis.cfg.

Current analysis.cfg entry:
HOST=connect-mn.la-z-boy.com
        DS conn cmrtgusers.rrd:ds0 >3 COLOR=red "TEXT=Exceeding 3 logged in users"


[hobbit at retv6100 ~]$ rrdtool dump data/rrd/connect-mn.la-z-boy.com/cmrtgusers.rrd |egrep -e name -e last_ds -e type
                <name> ds0 </name>
                <type> GAUGE </type>
                <last_ds> 25 </last_ds>
                <name> ds1 </name>
                <type> GAUGE </type>
                <last_ds> 25 </last_ds>
quoted from Ralph Mitchell

Scot Kreienkamp
user-462cf0b6d846@xymon.invalid

From: Ralph Mitchell [mailto:user-00a5e44c48c0@xymon.invalid]
Sent: Wednesday, October 19, 2011 9:45 PM
To: Scot Kreienkamp
Cc: xymon at xymon.com
Subject: Re: [Xymon] External scripts thresholds via hobbit-clients.cfg

According to the manual page:

      "column" is the statuscolumn that will be modified

so it already exists.

You're absolutely *sure* the rrd is cmrtgusers.rrd and has a data variable called ds0?

Ralph Mitchell

On Wed, Oct 19, 2011 at 9:02 PM, Scot Kreienkamp <user-462cf0b6d846@xymon.invalid<mailto:user-462cf0b6d846@xymon.invalid>> wrote:
Raph,

From your post, it sounds like I should be getting a column named Users, according to my config?  If so, I don't get that column.  Even if I name it as a column that already exists I don't get any additional info in that column.  It's like the lines in analysis.cfg are being totally ignored.

I upgraded to 4.3.5 this afternoon also, just in case it might have been something with the version I was running previously.  I set debug on all the services I thought might be responsible for this operation and there's no mention of the column or the RRD in the logfiles.

Thanks for the help.  I've got to be doing something wrong or encountering a bug of some kind, but I'm totally lost as to what it is.

Scot Kreienkamp

user-462cf0b6d846@xymon.invalid<mailto:user-462cf0b6d846@xymon.invalid>
quoted from Ralph Mitchell

From: xymon-bounces at xymon.com<mailto:xymon-bounces at xymon.com> [mailto:xymon-bounces at xymon.com<mailto:xymon-bounces at xymon.com>] On Behalf Of Ralph Mitchell
Sent: Wednesday, October 19, 2011 12:39 PM
To: xymon at xymon.com<mailto:xymon at xymon.com>

Subject: Re: [Xymon] External scripts thresholds via hobbit-clients.cfg

On Wed, Oct 19, 2011 at 10:56 AM, Scot Kreienkamp <user-462cf0b6d846@xymon.invalid<mailto:user-462cf0b6d846@xymon.invalid>> wrote:
OK, I'm completely stumped on this one, and very Frustrated.

Here's my line:
DS Users cmrtgusers.rrd:ds0 >3 COLOR=red "TEXT=Exceeding 30 logged in users"

The last value from the rrd was 35, so the line should be hit, but I get nothing.  I added debug to all the modules, I've tried several names for the column, I even linked the rrd to another name because it had a dash in the middle thinking the parser might not like that.  Still nothing.  I also then removed the rrd completely, hoping that I would at least get a line in one of the logfiles indicating a missing rrd.  I get NOTHING no matter what I do.  What am I doing wrong???  HELP!

I've just proved to my own satisfaction that a space between the symbol and the number prevents the number from being read correctly.  i,.e.  ">15.0" works, but "> 15.0" does not.  You can verify the number is being read by inserting &L or &U in the TEXT string:

      DS Users cmrtgusers.rrd:ds0 >3 COLOR=red "TEXT=Exceeding &L logged in users"

You should see "Exceeding 3.00 logged in users".  It seems to be OK without or without the decimal, but with a space the number is read as 0.00.

If I found the correct piece, the code is in xymon-4.3.3/xymond/client_config.c starting at line 1383 (line 1404 in xymon-4.3.5).  The number is converted by atof() at line 1438 (line 1439 in 4.3.5), which is supposed to be able to deal with optional leading whitespace, but apparently that's not happening here.

It takes a while for xymon to re-read the analysis.cfg file, so you might want to alter the TEXT string a bit each time you try something, so you know when the update takes effect.

Ralph Mitchell
This message is intended only for the individual or entity to which it is addressed. It may contain privileged, confidential information which is exempt from disclosure under applicable laws. If you are not the intended recipient, please note that you are strictly prohibited from disseminating or distributing this information (other than to the intended recipient) or copying this information. If you have received this communication in error, please notify us immediately by e-mail or by telephone at the above number. Thank you.

This message is intended only for the individual or entity to which it is addressed. It may contain privileged, confidential information which is exempt from disclosure under applicable laws. If you are not the intended recipient, please note that you are strictly prohibited from disseminating or distributing this information (other than to the intended recipient) or copying this information. If you have received this communication in error, please notify us immediately by e-mail or by telephone at the above number. Thank you.
list Scot Kreienkamp · Thu, 20 Oct 2011 13:38:21 +0000 ·
Ralph,

When I removed the DS definition I did get the error message in the log so it looks like it's picking up the line.  But it's not doing anything with it.  I removed all the logfiles so it would be easy to find any error messages, but ten minutes later and nothing except a few peer not up messages from the restart.

Unless Henrik has some suggestions to figure out why it doesn't work I'll probably be forced to make this an external test.  Thanks for your help in troubleshooting though, it's much appreciated.
quoted from Scot Kreienkamp

Scot Kreienkamp
user-462cf0b6d846@xymon.invalid

From: Ralph Mitchell [mailto:user-00a5e44c48c0@xymon.invalid]
Sent: Thursday, October 20, 2011 12:51 AM
To: Scot Kreienkamp
Subject: Re: [Xymon] External scripts thresholds via hobbit-clients.cfg


I have a system at home running xymon-4.3.4.  It has a script run by xymon that reads a temperature probe and logs to an rrd.  I've just tried this:

 rrdtool dump 1wire.rrd |egrep -e name -e last_ds -e type

                        <name> Board </name>
                        <type> GAUGE </type>
                        <last_ds>77.79</last_ds>
                        <name> Probe </name>
                        <type> GAUGE </type>
                        <last_ds>35.15</last_ds>

and added this to analysis.cfg:

HOST=ithilien
        DS conn 1wire.rrd:Probe >35 COLOR=red "TEXT=Keg temp exceeding &L degrees"

I briefly changed the number to 3 and the COLOR to yellow, just to make sure it wasn't having a problem with single digits and colors.  You can see in the conn column where the probe temp rose too high.  The probe data is graphed under the 1wire column, so it doesn't even matter if the rrd has a different name to the column.

When I first added the extra bits, I stopped xymon, then started it.  After subsequent changes I did a

    xymon.sh restart

I don't think it's supposed to *need* the restart.

You might also try removing the :ds0.  That should cause a message like this in a log somewhere:

     Invalid DS definition at line %d (missing column, key and/or dataset)

Don't know what else to suggest, except maybe insert a few more errprintf() lines in the code.  Henrik may still chime in with some suggestions too.
quoted from Scot Kreienkamp

Ralph Mitchell


On Wed, Oct 19, 2011 at 9:59 PM, Scot Kreienkamp <user-462cf0b6d846@xymon.invalid<mailto:user-462cf0b6d846@xymon.invalid>> wrote:
Quite sure.

Since the column has to exist I changed it to conn for now in analysis.cfg.

Current analysis.cfg entry:

HOST=connect-mn.la-z-boy.com<http://connect-mn.la-z-boy.com>;
        DS conn cmrtgusers.rrd:ds0 >3 COLOR=red "TEXT=Exceeding 3 logged in users"


[hobbit at retv6100 ~]$ rrdtool dump data/rrd/connect-mn.la-z-boy.com/cmrtgusers.rrd<http://connect-mn.la-z-boy.com/cmrtgusers.rrd>; |egrep -e name -e last_ds -e type
quoted from Scot Kreienkamp
                <name> ds0 </name>
                <type> GAUGE </type>
                <last_ds> 25 </last_ds>
                <name> ds1 </name>
                <type> GAUGE </type>
                <last_ds> 25 </last_ds>

Scot Kreienkamp

user-462cf0b6d846@xymon.invalid<mailto:user-462cf0b6d846@xymon.invalid>
quoted from Ralph Mitchell

From: Ralph Mitchell [mailto:user-00a5e44c48c0@xymon.invalid<mailto:user-00a5e44c48c0@xymon.invalid>]
Sent: Wednesday, October 19, 2011 9:45 PM
To: Scot Kreienkamp
Cc: xymon at xymon.com<mailto:xymon at xymon.com>

Subject: Re: [Xymon] External scripts thresholds via hobbit-clients.cfg

According to the manual page:

      "column" is the statuscolumn that will be modified

so it already exists.

You're absolutely *sure* the rrd is cmrtgusers.rrd and has a data variable called ds0?

Ralph Mitchell

On Wed, Oct 19, 2011 at 9:02 PM, Scot Kreienkamp <user-462cf0b6d846@xymon.invalid<mailto:user-462cf0b6d846@xymon.invalid>> wrote:
Raph,

From your post, it sounds like I should be getting a column named Users, according to my config?  If so, I don't get that column.  Even if I name it as a column that already exists I don't get any additional info in that column.  It's like the lines in analysis.cfg are being totally ignored.

I upgraded to 4.3.5 this afternoon also, just in case it might have been something with the version I was running previously.  I set debug on all the services I thought might be responsible for this operation and there's no mention of the column or the RRD in the logfiles.

Thanks for the help.  I've got to be doing something wrong or encountering a bug of some kind, but I'm totally lost as to what it is.

Scot Kreienkamp
user-462cf0b6d846@xymon.invalid<mailto:user-462cf0b6d846@xymon.invalid>

From: xymon-bounces at xymon.com<mailto:xymon-bounces at xymon.com> [mailto:xymon-bounces at xymon.com<mailto:xymon-bounces at xymon.com>] On Behalf Of Ralph Mitchell
Sent: Wednesday, October 19, 2011 12:39 PM
To: xymon at xymon.com<mailto:xymon at xymon.com>

Subject: Re: [Xymon] External scripts thresholds via hobbit-clients.cfg

On Wed, Oct 19, 2011 at 10:56 AM, Scot Kreienkamp <user-462cf0b6d846@xymon.invalid<mailto:user-462cf0b6d846@xymon.invalid>> wrote:
OK, I'm completely stumped on this one, and very Frustrated.

Here's my line:
DS Users cmrtgusers.rrd:ds0 >3 COLOR=red "TEXT=Exceeding 30 logged in users"

The last value from the rrd was 35, so the line should be hit, but I get nothing.  I added debug to all the modules, I've tried several names for the column, I even linked the rrd to another name because it had a dash in the middle thinking the parser might not like that.  Still nothing.  I also then removed the rrd completely, hoping that I would at least get a line in one of the logfiles indicating a missing rrd.  I get NOTHING no matter what I do.  What am I doing wrong???  HELP!

I've just proved to my own satisfaction that a space between the symbol and the number prevents the number from being read correctly.  i,.e.  ">15.0" works, but "> 15.0" does not.  You can verify the number is being read by inserting &L or &U in the TEXT string:

      DS Users cmrtgusers.rrd:ds0 >3 COLOR=red "TEXT=Exceeding &L logged in users"

You should see "Exceeding 3.00 logged in users".  It seems to be OK without or without the decimal, but with a space the number is read as 0.00.

If I found the correct piece, the code is in xymon-4.3.3/xymond/client_config.c starting at line 1383 (line 1404 in xymon-4.3.5).  The number is converted by atof() at line 1438 (line 1439 in 4.3.5), which is supposed to be able to deal with optional leading whitespace, but apparently that's not happening here.

It takes a while for xymon to re-read the analysis.cfg file, so you might want to alter the TEXT string a bit each time you try something, so you know when the update takes effect.

Ralph Mitchell
This message is intended only for the individual or entity to which it is addressed. It may contain privileged, confidential information which is exempt from disclosure under applicable laws. If you are not the intended recipient, please note that you are strictly prohibited from disseminating or distributing this information (other than to the intended recipient) or copying this information. If you have received this communication in error, please notify us immediately by e-mail or by telephone at the above number. Thank you.

This message is intended only for the individual or entity to which it is addressed. It may contain privileged, confidential information which is exempt from disclosure under applicable laws. If you are not the intended recipient, please note that you are strictly prohibited from disseminating or distributing this information (other than to the intended recipient) or copying this information. If you have received this communication in error, please notify us immediately by e-mail or by telephone at the above number. Thank you.

This message is intended only for the individual or entity to which it is addressed. It may contain privileged, confidential information which is exempt from disclosure under applicable laws. If you are not the intended recipient, please note that you are strictly prohibited from disseminating or distributing this information (other than to the intended recipient) or copying this information. If you have received this communication in error, please notify us immediately by e-mail or by telephone at the above number. Thank you.