cactid generating Empty result errors

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

Moderators: Developers, Moderators

Post Reply
cogo
Posts: 6
Joined: Mon Oct 30, 2006 4:59 am

cactid generating Empty result errors

Post by cogo »

I just installed cacti using apt-get on debian and when I try to run the cactid binary it gives me the following errors:

Code: Select all

CACTID: Using cactid config file [/etc/cacti/cactid.conf]
CACTID: Version 0.8.6f starting
CACTID: Host[1] ERROR: Empty result [127.0.0.1]: 'perl /usr/share/cacti/site/scripts/linux_memory.pl MemFree:'
CACTID: Host[1] DS[3] WARNING: Result from SCRIPT not valid. Partial Result: ...
CACTID: Host[1] ERROR: Empty result [127.0.0.1]: 'perl /usr/share/cacti/site/scripts/linux_memory.pl SwapFree:'
CACTID: Host[1] DS[4] WARNING: Result from SCRIPT not valid. Partial Result: ...
CACTID: Host[1] ERROR: Empty result [127.0.0.1]: 'perl /usr/share/cacti/site/scripts/loadavg_multi.pl'
CACTID: Host[1] DS[5] WARNING: Result from SCRIPT not valid. Partial Result: ...
CACTID: Host[1] ERROR: Empty result [127.0.0.1]: 'perl /usr/share/cacti/site/scripts/unix_processes.pl'
CACTID: Host[1] DS[7] WARNING: Result from SCRIPT not valid. Partial Result: ...
CACTID: Host[1] ERROR: Empty result [127.0.0.1]: 'perl /usr/share/cacti/site/scripts/unix_users.pl '
CACTID: Host[1] DS[6] WARNING: Result from SCRIPT not valid. Partial Result: ...
If i try to run all the perl scripts manually they all output something... Anyone know what might be wrong here? The cacti.conf file contain correct information regarding the database user.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Please provide the /full/path/to/perl for all perl scripts in Data Input Methods as stated in the cactid section of cacti's main page.
Reinhard
cogo
Posts: 6
Joined: Mon Oct 30, 2006 4:59 am

Post by cogo »

I am not sure if I understand you here. In the webgui I have already set all the perl paths correctly (/usr/bin/perl) but when I run the cactid binary the errors I pasted above appears anyway. Do I have to change the paths somewhere else as well?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Then, please run

Code: Select all

php rebuild_poller_cache.php
from command line to update all poller cache entries
Reinhard
cogo
Posts: 6
Joined: Mon Oct 30, 2006 4:59 am

Post by cogo »

I already did that. Tried it once again now and the same errors appear once I try to run cactid.

If I look at the data input methods in the webgui I can see the correct paths...

I have tried both cmd.php and cactid as poller but none of them seem to work.
User avatar
TheWitness
Developer
Posts: 17062
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Ah, how long does it take to poll this item? Is it a timeout? Can the poller user exec this script. Can you "su - <poller_user>" and run the command?

Does perl output the entire string at once. This is one thing that you must insure. If you use multiple print/echo statements to output data, Cactid does not like that.

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?
cogo
Posts: 6
Joined: Mon Oct 30, 2006 4:59 am

Post by cogo »

The errors from cactid appear at once so I guess there is no timeout here. I have also tried to start cactid as root to be sure that it should have the correct permissions, but the same errors appear then. And the output from the scripts looks clean too me. They only output numbers with no appended newline.
User avatar
TheWitness
Developer
Posts: 17062
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

What happens in cmd.php when you add the newline:

php <path_cacti>/cmd.php <hostid> <hostid>

Where <hostid> is the hostid for the host that you have issues with. Do that in debug. Post your results.

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?
cogo
Posts: 6
Joined: Mon Oct 30, 2006 4:59 am

Post by cogo »

I just did a search for perl in the database and found some stuff in the poller_item table:

Code: Select all

perl /usr/share/cacti/site/scripts/query_unix_partitions.pl  get available /dev/hda2
When I run cactid with verbosity DEBUG I can see that some of the graphs now gather data but the errors is the same as the line I pasted above here. I have looked everywhere but cannot find the line above in the webgui. In the Data Input Methods I have the following:

Code: Select all

Get Script Data (Indexed)
Get Script Server Data (Indexed)
Get SNMP Data
Get SNMP Data (Indexed)
Linux - Get Memory Usage
Unix - Get Free Disk Space
Unix - Get Load Average
Unix - Get Logged In Users
Unix - Get System Processes
Unix - Get TCP Connections
Unix - Get Web Hits
Unix - Ping Host
None of these inputs lack the full perl path...

TheWitness: When you say hostid ... is that just the id in the database of the host? I only have one host (localhost) and the id of that host seems to 1. You want me to run:

Code: Select all

php <path_cacti>/cmd.php 1 1
?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

cogo wrote:I just did a search for perl in the database and found some stuff in the poller_item table:

Code: Select all

perl /usr/share/cacti/site/scripts/query_unix_partitions.pl  get available /dev/hda2
Please

Code: Select all

grep -R perl ./resource/*
and change all matches accordingly
Reinhard
cogo
Posts: 6
Joined: Mon Oct 30, 2006 4:59 am

Post by cogo »

Thanks!

That did the trick (at least for the Unix - Available Disk Space graphs)

All other graphs are empty though. One of them is "Linux - Memory Usage". When I look at how the script is run it is supposed to have a grepstr. When I look at the grepstr input field there is a Regular Expression Match field that is empty. I also took a peek at the perl script that it uses, and it just does a cat /proc/meminfo and expects a grep pattern (grepstr). Is the pattern supposed to be empty or do I have to specify my own pattern?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Perhaps I might help you on this. But it is my explicit wish not to talk about those "localhost only" templates (that are templates, that you may associate with each and every target, but it always reports localhost data only - sigh).
I would recommend those "ucd/net-snmp host" host templates, which hold templates for most of those localhost stuff. Please find the memory stuff in there
Reinhard
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest