Xymon Mailing List Archive search

[wishlist] Better support of the @@ tag in NCV trends

7 messages in this thread

list Rich Smrcina · Thu, 29 Jun 2006 11:51:32 -0500 ·
If this in fact is implemented, it might be nice if the start and end 
tags and the stuff in the middle isn't actually displayed.  Or perhaps 
if displaying them was an option.

Charles Goyard wrote:
Hi all,

In do_ncv.c, I see this :

42:	while (l && *l && strncmp(l, "@@\n", 3)) {

If I understand correctly, that means the program will stop processing
the status file if it encounter a "@@\n" line. Well, I tried and it
seems to work that way (I have a status showing something like two counters
followed by a bunch of SNMP values that I don't want to graph). It do
not seem to be documented.

Now the real cool thing would be to have start tag, so NCV values could
be added last instead of first. (because humans like nice status reports
and computer don't care to take the last bits). When the program hits
the start tag, it forgets whatever it got and starts over.


For people interrested, the status show this way :

Thu Jun 29 18:41:21 CEST 2006 - 3623995988 incoming reqs - 845313333 outgoing reqs

inreqs: 3623995988
outreqs: 845313333

@@

wwwServiceDescription.1 = CacheFlow 700/4.x.xxxx
wwwServiceContact.1 = user-ffccbf5d1116@xymon.invalid
wwwServiceProtocol.1 = mgmt.xx.x.xx
wwwServiceName.1 = myhostname
wwwServiceType.1 = wwwCachingProxy
(...)
wwwSummaryInRequests.1 = 3624092091
wwwSummaryOutRequests.1 = 845335728

only the two first lines get a graph line.
(the blank line before the @@ seems to be mandatory too)
-- 
Rich Smrcina
VM Assist, Inc.
Main: (262)392-2026
Cell: (XXX)XXX-XXXX
Ans Service:  (360)715-2467
user-61add9955ef9@xymon.invalid

Catch the WAVV!  http://www.wavv.org
WAVV 2007 - Green Bay, WI - May 18-22, 2007
list Charles Goyard · Thu, 29 Jun 2006 18:51:40 +0200 ·
Hi all,

In do_ncv.c, I see this :

42:	while (l && *l && strncmp(l, "@@\n", 3)) {

If I understand correctly, that means the program will stop processing
the status file if it encounter a "@@\n" line. Well, I tried and it
seems to work that way (I have a status showing something like two counters
followed by a bunch of SNMP values that I don't want to graph). It do
not seem to be documented.

Now the real cool thing would be to have start tag, so NCV values could
be added last instead of first. (because humans like nice status reports
and computer don't care to take the last bits). When the program hits
the start tag, it forgets whatever it got and starts over.


For people interrested, the status show this way :

Thu Jun 29 18:41:21 CEST 2006 - 3623995988 incoming reqs - 845313333 outgoing reqs

inreqs: 3623995988
outreqs: 845313333

@@

wwwServiceDescription.1 = CacheFlow 700/4.x.xxxx
wwwServiceContact.1 = user-ffccbf5d1116@xymon.invalid
wwwServiceProtocol.1 = mgmt.xx.x.xx
wwwServiceName.1 = myhostname
wwwServiceType.1 = wwwCachingProxy
(...)
wwwSummaryInRequests.1 = 3624092091
wwwSummaryOutRequests.1 = 845335728

only the two first lines get a graph line.
(the blank line before the @@ seems to be mandatory too)

-- 
Charles
list Dave Overton · Thu, 29 Jun 2006 10:27:44 -0700 ·
Can you add to the installer a quick little thing, that will save anyone
trying to use scripts from deadcat.net a bit of a headache?

Just add a 

ln -s hobbitclient.cfg bbdef.sh 

In the xxx/etc directory?

Maybe?

Thought since so much more of Hobbit was built with backward compatibilty
that this would be a nice touch.


Dave Overton, Owner
SYIX.COM

user-4179705f9dca@xymon.invalid
(XXX) XXX-XXXX x101
Fax (XXX) XXX-XXXX
800-988-SYIX
list Henrik Størner · Thu, 29 Jun 2006 22:37:20 +0200 ·
quoted from Dave Overton
On Thu, Jun 29, 2006 at 10:27:44AM -0700, Dave Overton wrote:
Can you add to the installer a quick little thing, that will save anyone
trying to use scripts from deadcat.net a bit of a headache?

Just add a 

ln -s hobbitclient.cfg bbdef.sh 

In the xxx/etc directory?

Maybe?
In most cases it shouldn't be needed. The common construct I've seen in
BB extension scripts goes like

   if test "$BBTMP" = ""
   then
       . $BBHOME/etc/bbdef.sh
   fi

and since BBTMP (and the other BB* environment variables) have already
been set when script are run via hobbitlaunch.cfg, it should never
try to load the bbdef.sh file.
quoted from Dave Overton
Thought since so much more of Hobbit was built with backward compatibilty
that this would be a nice touch.
Source'ing the hobbitclient.cfg file has never been guaranteed to work
in a shell script, so I really wouldn't encourage doing that. I could
create an empty bbdef.sh file just so that script wouldn't complain.


Regards,
henrik
list Henrik Størner · Thu, 29 Jun 2006 22:43:03 +0200 ·
quoted from Charles Goyard
On Thu, Jun 29, 2006 at 06:51:40PM +0200, Charles Goyard wrote:
In do_ncv.c, I see this :

42:	while (l && *l && strncmp(l, "@@\n", 3)) {

If I understand correctly, that means the program will stop processing
the status file if it encounter a "@@\n" line. Well, I tried and it
seems to work that way (I have a status showing something like two counters
followed by a bunch of SNMP values that I don't want to graph). It do
not seem to be documented.
There's a reason why it isn't documented: You shouldn't use it.

The "@@<newline>" marker is actually used for something completely
different, and embedding it into your data stream is generally not
a good idea. In fact, I'd expect some complaints in your log files
as a result of this.

Hobbit 4.2 has a different solution to your problem. You can setup
exactly which values you want to graph, e.g. in your case it would be

  NCV_something="inreqs:COUNTER,outreqs:COUNTER,*:NONE"

and it would track only those two values.


Regards,
Henrik
list Charles Goyard · Fri, 30 Jun 2006 09:54:25 +0200 ·
Henrik Stoerner a écrit :
There's a reason why it isn't documented: You shouldn't use it.
Just what I was thinking :). Thanks, Henrik.
quoted from Henrik Størner
The "@@<newline>" marker is actually used for something completely
different, and embedding it into your data stream is generally not
a good idea. In fact, I'd expect some complaints in your log files
as a result of this.
Something like "Task rrdstatus terminated, status 1"... Fun thing, the
graphs have holes in them.

I'll switch to 4.2 earlier than planned, then. I hope it will be
released soon.

Just to satisfy my curiosity, what's the purpose of "@@\n" ?


-- 
Charles
list Dave Overton · Fri, 30 Jun 2006 09:56:35 -0700 ·
quoted from Henrik Størner
In most cases it shouldn't be needed. The common construct 
I've seen in BB extension scripts goes like

   if test "$BBTMP" = ""
   then
       . $BBHOME/etc/bbdef.sh
   fi

and since BBTMP (and the other BB* environment variables) 
A quick random check on Deadcat, I see just this:

if test ! "${BBTMP}"                      # GET DEFINITIONS IF NEEDED
then
         # echo "*** LOADING BBDEF ***"
        . ${BBHOME}/etc/bbdef.sh          # INCLUDE STANDARD DEFINITIONS
Fi

Always loading "bbdef.sh" seems to be the norm, perhaps I just pick the
wrong scripts.  The empty bbdef.sh would do the trick too though. Either way
is good for me, I know how to fix it, just was thinking of future users,
some bb extensions just don't "work" out of the box as I am sure you
originally intended.