[rrd-users] Re: Problem in updating a RRD database through an ext ernal script

José Maria Costa Pereira jose.pereira at telecelvodafone.pt
Tue Aug 28 19:18:55 MEST 2001


The problem is that when outputing: 

	rrdupdate database.rrd N:5:2

in a perl script it seems to append something like ':-1' and obviously rrd
sees something like:

	rrdupdate database.rrd N:5:2:-1

and it "thinks" I'm trying to update a database with 3 datasources when it
only has 2 datasources!! Thus returning ERROR.


Best regards,

	Jose Maria Costa Pereira
	DRE - Corporate Networks
	jose.pereira at telecelvodafone.pt



-----Original Message-----
From: Alex van den Bogaerdt [mailto:alex at slot.hollandcasino.nl]
Sent: Terça-feira, 28 de Agosto de 2001 18:08
To: José Maria Costa Pereira
Cc: rrd-users at list.ee.ethz.ch
Subject: Re: [rrd-users] Problem in updating a RRD database through an
external script


=?iso-8859-1?Q?Jos=E9_Maria_Costa_Pereira?= wrote:
> 
> 	I have a simple script which outputs the following:
> 
> 		rrdupdate database.rrd N:5:2

This is ment to be executed... (continued later on)

> 	The numbers 5 and 2 are only an example. It may return other
> numbers. But one thing is for sure it always returns integer numbers. My
> database has 2 data sources.
> 
> 	First question: The N stands for NOW (in N:5:2)?

yes.

> 	Second question: Do I need to have a \n in the end of the line:
> rrdupdate ....  ?

depends on how you process the line.

> 	Third question: This is the error I get when running the script that
> outputs the rrdupdate
> 
> 		D:\scripts>perl c:\mrtg-2.9.17\bin\mrtg stats.cfg
> 		Daemonizing MRTG ...
> 		Do Not close this window. Or MRTG will die
> 		ERROR: Cannot update d:\mrtg\pri\database.rrd with
> '999014266:3:2:-1' 
> 		expected 2 data source readings (got 3) from
> 999014266:3:2:-1:...

(continuation) ... and not as an external script for MRTG.


Try executing that line.  You're not using unix and I don't know how
this would work for windows.  Maybe writing it out as a batch file
then execute this batch file <understatement>but this seems inefficient
</understatement>.

HTH
-- 
   __________________________________________________________________
 / alex at slot.hollandcasino.nl                  alex at ergens.op.het.net \
| work                                                         private |
| My employer is capable of speaking therefore I speak only for myself |
+----------------------------------------------------------------------+
| Technical questions sent directly to me will be nuked. Use the list. | 
+----------------------------------------------------------------------+
| http://faq.mrtg.org/                                                 |
| http://rrdtool.eu.org  --> tutorial                                  |
+----------------------------------------------------------------------+

---------- 
This message may contain confidential information or privileged material,
and is intended only for the individual(s) named. If you are not in the
named addressee you should not disseminate, distribute or copy this e-mail.
Please notify the sender immediately by e-mail if you have received this
e-mail by mistake and delete this e-mail from your system. 
E-mail transmission cannot be guaranteed to be secure or error-free as
information could be intercepted, corrupted, lost, destroyed, arrive late or
incomplete, or contain viruses.  The sender therefore does not accept
liability for any errors or omissions in the contents of this message which
arise as a result of e-mail transmission. If verification is required please
request a hard-copy version. 

--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/rrd-users
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the rrd-users mailing list