Spine and Output Fields

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

Moderators: Developers, Moderators

Post Reply
KnEBeL
Posts: 14
Joined: Wed May 14, 2008 9:36 am

Spine and Output Fields

Post by KnEBeL »

Hello,

I have some problems since i upgrade my cacti version to the newest one.
OS: Ubuntu 6.06.2 LTS
cacti: 0.8.7b
When i change my poller from cmd.php to spine, i have all my graphs with just one line.

I looked at the logfiles which tell me that spine only reads the first output from scripts.

Code: Select all

05/14/2008 02:39:20 PM - SPINE: Poller[0] Host[8] DS[102] SCRIPT: /usr/share/cacti/scripts/xxx yyy zzz, output: 1:123.456
I changed nothing else, and when i switch back to cmd.php i have all my graphs right and all the output from the script is read.

What can be wrong?

Regards
KnEBeL
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Please show us the output from that script when running it manually from cli
Reinhard
KnEBeL
Posts: 14
Joined: Wed May 14, 2008 9:36 am

Post by KnEBeL »

Hello Reinhard,

here my output from cli, done with user cacti

Code: Select all

sh-3.1$ ./script.sh input1 input2
1:141.138 4:23.281 5:173.584 6:320.104 7:6.668
sh-3.1$
KnEBeL
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Hmm, I never tried to use numbers as the name of the output fields. Would it be possible to change to pure text? See examples at 1st link of my sig
Reinhard
KnEBeL
Posts: 14
Joined: Wed May 14, 2008 9:36 am

Post by KnEBeL »

Hello Reinhard,

i changed now to pure text, same behavior.

Only the first field is shown in log and used interpreted from spine.

I changed short back to cmd.php, all five output fields are used.

Same from cli, script works :(

Any other ideas? Do you need some more logs?

Regards
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

This is which version of spine?
Reinhard
KnEBeL
Posts: 14
Joined: Wed May 14, 2008 9:36 am

Post by KnEBeL »

spine version 0.8.7a

KnEBeL
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Runs well for us on RHEL 4. Did you compile it on your own or download it somewhere?
Reinhard
KnEBeL
Posts: 14
Joined: Wed May 14, 2008 9:36 am

Post by KnEBeL »

I downloaded the sources from cacti.net site, and compiled then on my own

I remember i had to do something like
libtoolize --copy --force
autoreconf --force --install --symlink

But then it was installed successfully.[/code]
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Spine is very sensitive to user output. It will not wait on either a "\n" or a "\r". Therefore, you must write the data at once. The following is not acceptable:

Code: Select all

echo "1:stuff";
do something;
echo " 2:morestuff";
do something else;
echo " 3:doevenmore\n"
exit;
TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
KnEBeL
Posts: 14
Joined: Wed May 14, 2008 9:36 am

Post by KnEBeL »

Hi TheWitness,

that matches my script.

I'll manage my output now different.

thx a lot

KnEBeL
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

TheWitness wrote:Spine is very sensitive to user output. It will not wait on either a "\n" or a "\r". Therefore, you must write the data at once. The following is not acceptable:

Code: Select all

echo "1:stuff";
do something;
echo " 2:morestuff";
do something else;
echo " 3:doevenmore\n"
exit;
TheWitness
Oh, oh, sometimes it's just that easy. And I was pulling my hair out on it
Reinhard
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest