no values in graphs (0.8.6d)

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
noskill
Posts: 32
Joined: Mon Feb 21, 2005 12:32 am

no values in graphs (0.8.6d)

Post by noskill »

Hi.

I have a script to dump mail, but the values are always showing up as NaN

Log shows this:

05/19/2005 10:49:00 AM - CACTID: Poller[0] Host[1] ERROR: Empty result [127.0.0.1]: '/usr/bin/perl /cacti/scripts/email1.pl'
05/19/2005 10:49:00 AM - CACTID: Poller[0] Host[1] WARNING: Result from SCRIPT not valid. Partial Result: U...
05/19/2005 10:49:00 AM - CACTID: Poller[0] Host[1] SCRIPT: /usr/bin/perl /cacti/scripts/email1.pl, output: U
05/19/2005 10:49:00 AM - CACTID: Poller[0] DEBUG: SQLCMD: insert into poller_output (local_data_id,rrd_name,time,output) values (15$
05/19/2005 10:49:00 AM - CACTID: Poller[0] Host[1] DEBUG: The POPEN returned the following File Descriptor 18

Seems normal, graphs are blank, but the script does work:

/usr/bin/perl /cacti/scripts/email1.pl
frozen:2 queued:36 todeliver:72 kb:95211 largest:47104 nrin:127 nrout:198 spam:101 spamd:0root@porta-pottie#

This also happens on serveral other scripts, some Bind8/9 scripts (from this site) and a BGP script I wrote to yank data from a 6509..

Any ideas would be great

-ns
User avatar
TheWitness
Developer
Posts: 16997
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Why is the no linefeed after the following:
frozen:2 queued:36 todeliver:72 kb:95211 largest:47104 nrin:127 nrout:198 spam:101 spamd:0root@porta-pottie#
Please run in DEBUG one time. That could be a problem. Was this running before?

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?
noskill
Posts: 32
Joined: Mon Feb 21, 2005 12:32 am

Post by noskill »

Actually, Since I started using cactid some things don't seem to graph . I ran cmd.php manually and guess what, they are graphing (strange)

I fixed the line feed, then I tried switching pollers from cmd to cacti.. However it doesn't seem to work correctly with cactid, but if I run cmd.php manually I do see the datafeed in the logfile and the graph updates

I'll post some more debugging
noskill
Posts: 32
Joined: Mon Feb 21, 2005 12:32 am

Post by noskill »

Strange.. It's working now, I set the number of cactid threads down to 1 and it's parsing now. Plus, i'm not using a newline in the script either (I reverted the changes)

I had cactid threads set to 5 because of the amount of hosts we have (almost 70 machines, 4 switches, etc)

Code: Select all

05/19/2005 10:05:01 PM - CACTID: Poller[0] Host[1] SCRIPT: /usr/bin/perl /cacti/scripts/email1.pl, output: frozen:2 queued:115 todeliver:234 kb:207608 largest:47104 nrin:563 nrout:724 spam:196 spamd:0
05/19/2005 10:10:01 PM - CACTID: Poller[0] Host[1] SCRIPT: /usr/bin/perl /cacti/scripts/email1.pl, output: frozen:2 queued:113 todeliver:226 kb:205209 largest:47104 nrin:568 nrout:744 spam:196 spamd:0
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Um... What is your operating system? Just curious.
[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]
noskill
Posts: 32
Joined: Mon Feb 21, 2005 12:32 am

Post by noskill »

Freebsd 4.11
noskill
Posts: 32
Joined: Mon Feb 21, 2005 12:32 am

Post by noskill »

Here's from cmd.php on the command line, 2 scripts that generate the same output (you'll see)

Code: Select all

05/20/2005 01:57:42 AM - CMDPHP: Poller[0] Host[1] CMD: /usr/bin/perl /cacti/scripts/email1.pl, output: frozen:1 queued:147 todeliver:294 kb:327450 largest:47104 nrin:865 nrout:1462 spam:20 spamd:0
05/20/2005 01:57:42 AM - CMDPHP: Poller[0] Host[1] CMD: perl /usr/local/share/cacti/scripts/bind9-stats.pl getall GLOBAL, output: recursion:12986 success:19781 failure:443 nxrrset:2486 referral:56400 nxdomain:2200
Here's from log with debugging (cactid poller with 1 thread):

Code: Select all

05/20/2005 01:57:42 AM - CMDPHP: Poller[0] Host[1] CMD: /usr/bin/perl /cacti/scripts/email1.pl, output: frozen:1 queued:147 todeliver:294 kb:327450 largest:47104 nrin:865 nrout:1462 spam:20 spamd:0
05/20/2005 01:57:42 AM - CMDPHP: Poller[0] Host[1] CMD: perl /usr/local/share/cacti/scripts/bind9-stats.pl getall GLOBAL, output: recursion:12986 success:19781 failure:443 nxrrset:2486 referral:56400 nxdomain:2200
05/20/2005 01:57:42 AM - CMDPHP: Poller[0] Host[1] CMD: perl /usr/local/share/cacti/scripts/bind9-stats.pl getall GLOBAL, output: recursion:12986 success:19781 failure:443 nxrrset:2486 referral:56400 nxdomain:2200
I don't see any errors in my graph/data templates either.. I do clearly remember earlier versions of cacti worked good with the scripts I have running.

Ok, I switched the poller over to cmd.php with 1 process and everything appears to be graphing correctly now.. Which is strange..
User avatar
TheWitness
Developer
Posts: 16997
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

How long do these scripts take to run?

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?
noskill
Posts: 32
Joined: Mon Feb 21, 2005 12:32 am

Post by noskill »

05/20/2005 08:49:19 AM - CMDPHP: Poller[0] Time: 308.4121 s, Theads: N/A, Hosts: 54

Before I changed anything (and when my scripts weren't graphing, I tried using cmd.php with 5 threads, and cactid with 5 threads)

I reduced the thread count down to default setting and it's graphing now.
User avatar
TheWitness
Developer
Posts: 16997
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

With cmd.php you can increase concurrent processes until your processor load get's too high. With Cactid you should start at 2 times the number of processors as the number of proccesses and 5-10 threads. Then you can increase "tweak" to find the sweat spot.

Please keep in mind that you must align the number of MySQL connections in Cactid more so than with cmd.php. Make it a very high number > 300 and you should be ok.

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?
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests