format problems with self written data input mehode

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
dom
Posts: 1
Joined: Mon Oct 31, 2005 5:16 am

format problems with self written data input mehode

Post by dom »

hi all,

i have problems with a self written methode. i wrote a perlscript who gives back 3 attributes in this format

Code: Select all

vara:1000 varb:2000 varc:3000
but then, the grpah has no entry, as well as the rrd-file doesn't get updatet..
when i change the format to:

Code: Select all

vara:1000
varb:2000
varc:3000
(linefeeds "\n")
then i have the second attribute correctly, the other two are empty as well.. :-(

has anybody have an idea what i'm doing wrong?
thanks
dom
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

First one is correct, but make sure you don't have a space at the end.

Also, remember that you need a linefeed at the end.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

... and please print the output with one statement as cactid (if you're using this poller) does not wait for all prints to complete. So

Code: Select all

print "vara:$vara";
...
print "varb:$varb";
...
print "varc:$varc\n";
would not be ok. Use

Code: Select all

print "vara:$vara varb:$varb varc:$varc\n";
instead. Pay attention not to introduce a space between the variable name and the value itself.
Reinhard
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests