Problem with ncv
list Francesco Duranti
I've a problem with data reporting in rrd files via ncv, I've one script that report data in this way
MySQL Connection statistics Threads = 7 Questions = 153015 Slow queries = 0
Opens = 0 Flush tables = 1 Open tables = 32 Queries per second avg = 0.135
The rrd will get MySQLConnectionstat as the name of the first data to save in the rrd instead of getting Threads.
I've not found a way to make it get the Threads as the var name. I'ts like it's ignoring \n when getting the name so that "MySQL Connection statistics Threads" is used as the name of the first dataset to save instead of only threads.
list Marco Avvisano
I have the same problem, and the only way that i have found is to remove the first line Marco
▸
----- Original Message -----
From: Francesco Duranti
To: user-ae9b8668bcde@xymon.invalid
Sent: Thursday, September 14, 2006 6:10 PM
Subject: [hobbit] Problem with ncv
I've a problem with data reporting in rrd files via ncv, I've one script that report data in this way
MySQL Connection statistics
Threads = 7
Questions = 153015
Slow queries = 0Opens = 0
▸
Flush tables = 1
Open tables = 32
Queries per second avg = 0.135
The rrd will get MySQLConnectionstat as the name of the first data to save in the rrd instead of getting Threads.
I've not found a way to make it get the Threads as the var name. I'ts like it's ignoring \n when getting the name so that "MySQL Connection statistics Threads" is used as the name of the first dataset to save instead of only threads.
list Charles Jones
I'm new to custom NCV, and want to set some up soon. How do you get it to work with "var = value" instead of "var : value" ? Any why is it using that first line as a var at all? -Charles
▸
Marco Avvisano wrote:I have the same problem, and the only way that i have found is to
remove the first line
Marco
----- Original Message -----
*From:* Francesco Duranti <mailto:user-7104dcecbfef@xymon.invalid>
*To:* user-ae9b8668bcde@xymon.invalid <mailto:user-ae9b8668bcde@xymon.invalid>
▸
*Sent:* Thursday, September 14, 2006 6:10 PM
*Subject:* [hobbit] Problem with ncv
I've a problem with data reporting in rrd files via ncv, I've one
script that report data in this way
MySQL Connection statistics
Threads = 7
Questions = 153015
Slow queries = 0
Opens = 0
Flush tables = 1
Open tables = 32
Queries per second avg = 0.135
The rrd will get MySQLConnectionstat as the name of the first data
to save in the rrd instead of getting Threads.
I've not found a way to make it get the Threads as the var name.
I'ts like it's ignoring \n when getting the name so that "MySQL
Connection statistics Threads" is used as the name of the first
dataset to save instead of only threads.
list Johann Eggers
▸
-----Original Message----- From: Francesco Duranti [mailto:user-7104dcecbfef@xymon.invalid] Sent: Thu 9/14/2006 6:10 PM To: user-ae9b8668bcde@xymon.invalid Subject: [hobbit] Problem with ncv I've a problem with data reporting in rrd files via ncv, I've one script that report data in this way MySQL Connection statistics Threads = 7 Questions = 153015 Slow queries = 0 Opens = 0 Flush tables = 1 Open tables = 32 Queries per second avg = 0.135 The rrd will get MySQLConnectionstat as the name of the first data to save in the rrd instead of getting Threads. I've not found a way to make it get the Threads as the var name. I'ts like it's ignoring \n when getting the name so that "MySQL Connection statistics Threads" is used as the name of the first dataset to save instead of only threads.
If I remember the documentation well you have to replace the "=" by ":" and it should work...
list Francesco Duranti
Da: Johann Eggers [mailto:user-769b09132207@xymon.invalid]
Inviato: gio 14/09/2006 21.33
A: user-ae9b8668bcde@xymon.invalid
Oggetto: RE: [hobbit] Problem with ncv
▸
-----Original Message-----
From: Francesco Duranti [mailto:user-7104dcecbfef@xymon.invalid]
Sent: Thu 9/14/2006
6:10 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: [hobbit] Problem with ncv
I've
a problem with data reporting in rrd files via ncv, I've one script that report
data in this way
MySQL Connection statistics
Threads
=
7
Questions = 153015
Slow
queries = 0
Opens
= 0
Flush tables
= 1
Open tables = 32
Queries per second avg
= 0.135
The rrd will get MySQLConnectionstat as the name of the first
data to save in the rrd instead of getting Threads.
I've not found a way
to make it get the Threads as the var name. I'ts like it's ignoring \n when
getting the name so that "MySQL Connection statistics Threads" is used as the
name of the first dataset to save instead of only threads.
If I
remember the documentation well you have to replace the "=" by ":" and it should
work...
list Johann Eggers
▸
-----Original Message----- From: Francesco Duranti [mailto:user-7104dcecbfef@xymon.invalid] Sent: Thu 9/14/2006 10:03 PM To: user-ae9b8668bcde@xymon.invalid; user-ae9b8668bcde@xymon.invalid Subject: [hobbit] R: [hobbit] Problem with ncv The data will get in rrd also with "=" the only problem is that if there's something before the first datasetname it will become the datasetname and the \n is not counted. Removing the first line will make the ncv work.
So perhaps you can put the first line into the Status line of the message; probably shorten it as it will then become a new "Status" in your Hobbit display...
▸
Da: Johann Eggers [mailto:user-769b09132207@xymon.invalid]
Inviato: gio 14/09/2006 21.33
A: user-ae9b8668bcde@xymon.invalid
Oggetto: RE: [hobbit] Problem with ncv
-----Original Message-----
From: Francesco Duranti [mailto:user-7104dcecbfef@xymon.invalid]
Sent: Thu 9/14/2006 6:10 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: [hobbit] Problem with ncv
I've a problem with data reporting in rrd files via ncv, I've one script that report data in this way
MySQL Connection statistics
Threads = 7
Questions = 153015
Slow queries = 0
Opens = 0
Flush tables = 1
Open tables = 32
Queries per second avg = 0.135
The rrd will get MySQLConnectionstat as the name of the first data to save in the rrd instead of getting Threads.
I've not found a way to make it get the Threads as the var name. I'ts like it's ignoring \n when getting the name so that "MySQL Connection statistics Threads" is used as the name of the first dataset to save instead of only threads.
If I remember the documentation well you have to replace the "=" by ":" and it should work...
list Henrik Størner
▸
On Thu, Sep 14, 2006 at 06:10:50PM +0200, Francesco Duranti wrote:
I've a problem with data reporting in rrd files via ncv, I've one script that report data in this way MySQL Connection statistics Threads = 7 Questions = 153015
Slow queries = 0</PRE>
<DIV align=left><PRE>Opens = 0
▸
Flush tables = 1
Open tables = 32
Queries per second avg = 0.135
The rrd will get MySQLConnectionstat as the name of the first data to save in
the rrd instead of getting Threads.
This patch should fix it.
Regards,
Henrik
-------------- next part --------------
--- release/hobbit-4.2.0/hobbitd/rrd/do_ncv.c 2006-08-09 22:10:06.000000000 +0200
+++ hobbitd/rrd/do_ncv.c 2006-09-14 22:49:06.259129035 +0200
@@ -11,7 +11,7 @@
/* */
/*----------------------------------------------------------------------------*/
-static char ncv_rcsid[] = "$Id: do_ncv.c,v 1.10 2006/06/09 22:23:49 henrik Rel $";
+static char ncv_rcsid[] = "$Id: do_ncv.c,v 1.10 2006/06/09 22:23:49 henrik Rel henrik $";
int do_ncv_rrd(char *hostname, char *testname, char *msg, time_t tstamp)
{
@@ -44,11 +44,22 @@
l += strspn(l, " \t\n");
if (*l) {
+ /* See if this line contains a '=' or ':' sign */
name = l;
- l += strcspn(l, ":=");
- if( *l ) { *l = '\0'; l++; }
- else break;
+ l += strcspn(l, ":=\n");
• + if (*l) {
+ if (( *l == '=') || (*l == ':')) {
+ *l = '\0'; l++;
+ }
+ else {
+ /* No marker, so skip this line */
+ name = NULL;
+ }
+ }
+ else break; /* We've hit the end of the message */
}
• if (name) {
val = l + strspn(l, " \t");
l = val + strspn(val, "0123456789.");
list Marco Avvisano
Thanks Henrick, now it work I have another problem .... sometimes the rrd graphs lost values I send data to hobbit server every 20 minutes ... i must change or add something in hobbitgraph definitions? DEF:seconds=inps.rrd:Seconds:AVERAGE regards, Marco
▸
----- Original Message -----
From: "Henrik Stoerner" <user-ce4a2c883f75@xymon.invalid>
To: <user-ae9b8668bcde@xymon.invalid>
Sent: Thursday, September 14, 2006 10:53 PM
Subject: Re: [hobbit] Problem with ncv
On Thu, Sep 14, 2006 at 06:10:50PM +0200, Francesco Duranti wrote:I've a problem with data reporting in rrd files via ncv, I've one script that report data in this way MySQL Connection statistics Threads = 7 Questions = 153015 Slow queries = 0</PRE> <DIV align=left><PRE>Opens = 0 Flush tables = 1 Open tables = 32 Queries per second avg = 0.135 The rrd will get MySQLConnectionstat as the name of the first data to save in the rrd instead of getting Threads.This patch should fix it. Regards, Henrik
list Francesco Duranti
It works good :D thanks Francesco
▸
-----Original Message----- From: Henrik Stoerner [mailto:user-ce4a2c883f75@xymon.invalid] Sent: Thursday, September 14, 2006 10:54 PM To: user-ae9b8668bcde@xymon.invalid Subject: Re: [hobbit] Problem with ncv On Thu, Sep 14, 2006 at 06:10:50PM +0200, Francesco Duranti wrote:I've a problem with data reporting in rrd files via ncv, I've one > script that report data in this way MySQL Connection statisticsThreads = 7Questions = 153015 Slow queries = 0</PRE> <DIV align=left><PRE>Opens = 0 Flush tables = 1 Open tables = 32 Queries per second avg = 0.135 The rrd will get MySQLConnectionstat as the name of the first data to > save in the rrd instead of getting Threads.This patch should fix it. Regards, Henrik
list Francesco Duranti
The problem related to graphs with 20 minutes interval is in the creation of the rrd file From the rrdcreate help page http://oss.oetiker.ch/rrdtool/doc/rrdcreate.en.html DS:ds-name:GAUGE | COUNTER | DERIVE | ABSOLUTE:heartbeat:min:max The ``heartbeat'' defines the maximum acceptable interval between samples. If the interval between samples is less than ``heartbeat'', then an average rate is calculated and applied for that interval. If the interval between samples is longer than ``heartbeat'', then that entire interval is considered ``unknown''. Note that there are other things that can make a sample interval ``unknown'', such as the rate exceeding limits, or even an ``unknown'' input sample. The heartbeat used by hobbit for ncv (and other graphs) is 600 (10 min) and cannot be changed with parameters so you need to change the source code (but it will change heartbeat for all the NCV graphs you do and you've to remember to change it when installing a new version) or we have to wait for Henrik to do a new rrd extendible interface for all our special graphs cases :D If you need to change you've to change it in the hobbitd/rrd/do_ncv.c, search for "DS:", you'll find 2 of them they are for the default and not default cases of ncv file creation. I don't know if there's something else that need to be changed but this should at least get your data inside the rrd file. Francesco
▸
-----Original Message----- From: Marco Avvisano [mailto:user-e09c0f3f8c70@xymon.invalid] Sent: Friday, September 15, 2006 3:11 PM To: user-ae9b8668bcde@xymon.invalid Subject: Re: [hobbit] Problem with ncv Thanks Henrick, now it work I have another problem .... sometimes the rrd graphs lost values I send data to hobbit server every 20 minutes ... i must change or add something in hobbitgraph definitions? DEF:seconds=inps.rrd:Seconds:AVERAGE regards, Marco ----- Original Message ----- From: "Henrik Stoerner" <user-ce4a2c883f75@xymon.invalid> To: <user-ae9b8668bcde@xymon.invalid> Sent: Thursday, September 14, 2006 10:53 PM Subject: Re: [hobbit] Problem with ncvOn Thu, Sep 14, 2006 at 06:10:50PM +0200, Francesco Duranti wrote:I've a problem with data reporting in rrd files via ncv, I've one script that report data in this way MySQL Connection statistics Threads = 7 Questions = 153015 Slow queries = 0</PRE> <DIV align=left><PRE>Opens = 0 Flush tables = 1 Open tables = 32 Queries per second avg = 0.135 The rrd will get MySQLConnectionstat as the name of the first data to save in the rrd instead of getting Threads.This patch should fix it. Regards, Henrik
list Marco Avvisano
thanks for your help Francesco Marco ----- Original Message ----- From: "Francesco Duranti" <user-7104dcecbfef@xymon.invalid> To: <user-ae9b8668bcde@xymon.invalid> Sent: Friday, September 15, 2006 3:44 PM
▸
Subject: RE: [hobbit] Problem with ncv
The problem related to graphs with 20 minutes interval is in the creation of the rrd file From the rrdcreate help page http://oss.oetiker.ch/rrdtool/doc/rrdcreate.en.html DS:ds-name:GAUGE | COUNTER | DERIVE | ABSOLUTE:heartbeat:min:max The ``heartbeat'' defines the maximum acceptable interval between samples. If the interval between samples is less than ``heartbeat'', then an average rate is calculated and applied for that interval. If the interval between samples is longer than ``heartbeat'', then that entire interval is considered ``unknown''. Note that there are other things that can make a sample interval ``unknown'', such as the rate exceeding limits, or even an ``unknown'' input sample. The heartbeat used by hobbit for ncv (and other graphs) is 600 (10 min) and cannot be changed with parameters so you need to change the source code (but it will change heartbeat for all the NCV graphs you do and you've to remember to change it when installing a new version) or we have to wait for Henrik to do a new rrd extendible interface for all our special graphs cases :D If you need to change you've to change it in the hobbitd/rrd/do_ncv.c, search for "DS:", you'll find 2 of them they are for the default and not default cases of ncv file creation. I don't know if there's something else that need to be changed but this should at least get your data inside the rrd file. Francesco-----Original Message----- From: Marco Avvisano [mailto:user-e09c0f3f8c70@xymon.invalid] Sent: Friday, September 15, 2006 3:11 PM To: user-ae9b8668bcde@xymon.invalid Subject: Re: [hobbit] Problem with ncv Thanks Henrick, now it work I have another problem .... sometimes the rrd graphs lost values I send data to hobbit server every 20 minutes ... i must change or add something in hobbitgraph definitions? DEF:seconds=inps.rrd:Seconds:AVERAGE regards, Marco ----- Original Message ----- From: "Henrik Stoerner" <user-ce4a2c883f75@xymon.invalid> To: <user-ae9b8668bcde@xymon.invalid> Sent: Thursday, September 14, 2006 10:53 PM Subject: Re: [hobbit] Problem with ncvOn Thu, Sep 14, 2006 at 06:10:50PM +0200, Francesco Duranti wrote:I've a problem with data reporting in rrd files via ncv, I've one script that report data in this way MySQL Connection statistics Threads = 7 Questions = 153015 Slow queries = 0</PRE> <DIV align=left><PRE>Opens = 0 Flush tables = 1 Open tables = 32 Queries per second avg = 0.135 The rrd will get MySQLConnectionstat as the name of the first data to >> save in the rrd instead of getting Threads.This patch should fix it. Regards, Henrik