cmd.php works - cactid fails: Result from SCRIPT not valid

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

Moderators: Developers, Moderators

User avatar
Wernicke
Cacti User
Posts: 61
Joined: Tue Jun 08, 2004 3:07 am
Location: Bodø, Norway
Contact:

Post by Wernicke »

Sorry, I just assumed you used linux since we are in the Linux/unix messageboard

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

Post by TheWitness »

tapufd,

Cactid returns better error messaging. cmd.php simply returns a blank which is valid data unfortunately.

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?
Guest

Post by Guest »

Here are the version numbers you requested.

net-snmp version: 5.0.9
OS version: Fedora Core 2 (2.6.7-1.494.2.2smp)
PHP version: 4.3.6 (cli)
MySQL version: 12.22 Distrib 4.0.18
gcc version: 3.3.3 20040412
tapufd
Cacti User
Posts: 55
Joined: Thu Aug 19, 2004 9:14 am
Location: Belgium

Post by tapufd »

I checked the OID .1.3.6.1.4.1.23.2.27.3.16.1.4.1 with GetIf and it contains data.
So the OID .1.3.6.1.4.1.23.2.27.3.16.1.4.1 exists and it returns the value : 6
A timeout seems unlikely because a ping gives times<1ms (server is located few meters from me).

/tap
tapufd
Cacti User
Posts: 55
Joined: Thu Aug 19, 2004 9:14 am
Location: Belgium

Post by tapufd »

As you can see, the errors are not always for the same hosts :

09/22/2004 07:02:51 PM - CACTID: Poller[0] Host[9] WARNING: Result from SERVER not valid. Partial Result: U...
09/22/2004 07:02:51 PM - CACTID: Poller[0] Host[8] WARNING: Result from SERVER not valid. Partial Result: U...
09/22/2004 07:02:50 PM - CACTID: Poller[0] Host[10] WARNING: Result from SERVER not valid. Partial Result: U...
09/22/2004 07:02:44 PM - CACTID: Poller[0] Host[2] WARNING: Result from SNMP not valid. Partial Result: U...
09/22/2004 07:02:44 PM - CACTID: Poller[0] Host[2] WARNING: Result from SNMP not valid. Partial Result: U...
09/22/2004 07:02:44 PM - CACTID: Poller[0] Host[2] WARNING: Result from SNMP not valid. Partial Result: U...
09/22/2004 07:02:44 PM - CACTID: Poller[0] Host[2] WARNING: Result from SNMP not valid. Partial Result: U...
09/22/2004 07:02:44 PM - CACTID: Poller[0] Host[2] WARNING: Result from SNMP not valid. Partial Result: U...
09/22/2004 07:02:44 PM - CACTID: Poller[0] Host[2] WARNING: Result from SNMP not valid. Partial Result: U...
09/22/2004 07:02:44 PM - CACTID: Poller[0] Host[2] WARNING: Result from SNMP not valid. Partial Result: U...
09/22/2004 07:02:44 PM - CACTID: Poller[0] Host[2] WARNING: Result from SNMP not valid. Partial Result: U...
09/22/2004 07:02:44 PM - CACTID: Poller[0] Host[2] WARNING: Result from SNMP not valid. Partial Result: U...
09/22/2004 07:02:44 PM - CACTID: Poller[0] Host[2] WARNING: Result from SNMP not valid. Partial Result: U...
09/22/2004 07:02:44 PM - CACTID: Poller[0] Host[2] WARNING: Result from SNMP not valid. Partial Result: U...
09/22/2004 07:02:44 PM - CACTID: Poller[0] Host[2] WARNING: Result from SNMP not valid. Partial Result: U...
09/22/2004 07:00:19 PM - SYSTEM STATS: Time: 18.4322 s, Method: cactid, Processes: 3, Threads: 3, Hosts: 9, Hosts/Process: 3
09/22/2004 07:00:03 PM - CACTID: Poller[0] Host[5] WARNING: Result from SNMP not valid. Partial Result: U...
09/22/2004 07:00:03 PM - CACTID: Poller[0] Host[7] WARNING: Result from SNMP not valid. Partial Result: U...
09/22/2004 07:00:03 PM - CACTID: Poller[0] Host[5] WARNING: Result from SNMP not valid. Partial Result: U...
09/22/2004 07:00:03 PM - CACTID: Poller[0] Host[7] WARNING: Result from SNMP not valid. Partial Result: U...
09/22/2004 07:00:03 PM - CACTID: Poller[0] Host[4] WARNING: Result from SNMP not valid. Partial Result: U...
09/22/2004 07:00:03 PM - CACTID: Poller[0] Host[7] WARNING: Result from SNMP not valid. Partial Result: U...
09/22/2004 07:00:02 PM - CACTID: Poller[0] Host[7] WARNING: Result from SNMP not valid. Partial Result: U...
09/22/2004 07:00:02 PM - CACTID: Poller[0] Host[7] WARNING: Result from SNMP not valid. Partial Result: U...
09/22/2004 07:00:02 PM - CACTID: Poller[0] Host[7] WARNING: Result from SNMP not valid. Partial Result: U...
09/22/2004 07:00:02 PM - CACTID: Poller[0] Host[7] WARNING: Result from SNMP not valid. Partial Result: U...
09/22/2004 07:00:02 PM - CACTID: Poller[0] Host[7] WARNING: Result from SNMP not valid. Partial Result: U...
09/22/2004 06:55:17 PM - SYSTEM STATS: Time: 17.3060 s, Method: cactid, Processes: 3, Threads: 3, Hosts: 9, Hosts/Process: 3
09/22/2004 06:55:03 PM - CACTID: Poller[0] Host[7] WARNING: Result from SNMP not valid. Partial Result: U...
09/22/2004 06:55:03 PM - CACTID: Poller[0] Host[7] WARNING: Result from SNMP not valid. Partial Result: U...
09/22/2004 06:55:03 PM - CACTID: Poller[0] Host[7] WARNING: Result from SNMP not valid. Partial Result: U...
09/22/2004 06:55:02 PM - CACTID: Poller[0] Host[7] WARNING: Result from SNMP not valid. Partial Result: U...
09/22/2004 06:55:02 PM - CACTID: Poller[0] Host[7] WARNING: Result from SNMP not valid. Partial Result: U...
09/22/2004 06:55:02 PM - CACTID: Poller[0] Host[7] WARNING: Result from SNMP not valid. Partial Result: U...
09/22/2004 06:55:02 PM - CACTID: Poller[0] Host[7] WARNING: Result from SNMP not valid. Partial Result: U...
09/22/2004 06:50:15 PM - SYSTEM STATS: Time: 14.5879 s, Method: cactid, Processes: 3, Threads: 3, Hosts: 9, Hosts/Process: 3
09/22/2004 06:50:03 PM - CACTID: Poller[0] Host[7] WARNING: Result from SNMP not valid. Partial Result: U...
09/22/2004 06:50:03 PM - CACTID: Poller[0] Host[7] WARNING: Result from SNMP not valid. Partial Result: U...
09/22/2004 06:45:16 PM - SYSTEM STATS: Time: 15.3576 s, Method: cactid, Processes: 3, Threads: 3, Hosts: 9, Hosts/Process: 3
09/22/2004 06:45:03 PM - CACTID: Poller[0] Host[7] WARNING: Result from SNMP not valid. Partial Result: U...
09/22/2004 06:45:03 PM - CACTID: Poller[0] Host[7] WARNING: Result from SNMP not valid. Partial Result: U...
09/22/2004 06:45:03 PM - CACTID: Poller[0] Host[4] WARNING: Result from SNMP not valid. Partial Result: U...
09/22/2004 06:45:03 PM - CACTID: Poller[0] Host[7] WARNING: Result from SNMP not valid. Partial Result: U...
09/22/2004 06:45:03 PM - CACTID: Poller[0] Host[7] WARNING: Result from SNMP not valid. Partial Result: U...
09/22/2004 06:45:03 PM - CACTID: Poller[0] Host[7] WARNING: Result from SNMP not valid. Partial Result: U...
09/22/2004 06:45:02 PM - CACTID: Poller[0] Host[7] WARNING: Result from SNMP not valid. Partial Result: U...
09/22/2004 06:40:15 PM - SYSTEM STATS: Time: 15.1866 s, Method: cactid, Processes: 3, Threads: 3, Hosts: 9, Hosts/Process: 3
09/22/2004 06:40:03 PM - CACTID: Poller[0] Host[7] WARNING: Result from SNMP not valid. Partial Result: U...
09/22/2004 06:40:03 PM - CACTID: Poller[0] Host[7] WARNING: Result from SNMP not valid. Partial Result: U...
09/22/2004 06:40:03 PM - CACTID: Poller[0] Host[4] WARNING: Result from SNMP not valid. Partial Result: U...
09/22/2004 06:40:03 PM - CACTID: Poller[0] Host[7] WARNING: Result from SNMP not valid. Partial Result: U...
09/22/2004 06:40:03 PM - CACTID: Poller[0] Host[7] WARNING: Result from SNMP not valid. Partial Result: U...
09/22/2004 06:40:02 PM - CACTID: Poller[0] Host[7] WARNING: Result from SNMP not valid. Partial Result: U...
09/22/2004 06:40:02 PM - CACTID: Poller[0] Host[7] WARNING: Result from SNMP not valid. Partial Result: U...
09/22/2004 06:40:02 PM - CACTID: Poller[0] Host[7] WARNING: Result from SNMP not valid. Partial Result: U...
09/22/2004 06:35:16 PM - SYSTEM STATS: Time: 15.5060 s, Method: cactid, Processes: 3, Threads: 3, Hosts: 9, Hosts/Process: 3
09/22/2004 06:35:04 PM - CACTID: Poller[0] Host[4] WARNING: Result from SNMP not valid. Partial Result: U...
09/22/2004 06:35:04 PM - CACTID: Poller[0] Host[4] WARNING: Result from SNMP not valid. Partial Result: U...
09/22/2004 06:35:03 PM - CACTID: Poller[0] Host[4] WARNING: Result from SNMP not valid. Partial Result: U...
09/22/2004 06:35:02 PM - CACTID: Poller[0] Host[7] WARNING: Result from SNMP not valid. Partial Result: U...
09/22/2004 06:35:02 PM - CACTID: Poller[0] Host[7] WARNING: Result from SNMP not valid. Partial Result: U...
09/22/2004 06:35:02 PM - CACTID: Poller[0] Host[7] WARNING: Result from SNMP not valid. Partial Result: U...
09/22/2004 06:35:02 PM - CACTID: Poller[0] Host[7] WARNING: Result from SNMP not valid. Partial Result: U...
09/22/2004 06:35:02 PM - CACTID: Poller[0] Host[7] WARNING: Result from SNMP not valid. Partial Result: U...
09/22/2004 06:35:02 PM - CACTID: Poller[0] Host[7] WARNING: Result from SNMP not valid. Partial Result: U...
09/22/2004 06:35:02 PM - CACTID: Poller[0] Host[7] WARNING: Result from SNMP not valid. Partial Result: U...
09/22/2004 06:35:02 PM - CACTID: Poller[0] Host[7] WARNING: Result from SNMP not valid. Partial Result: U...
09/22/2004 06:35:02 PM - CACTID: Poller[0] Host[7] WARNING: Result from SNMP not valid. Partial Result: U...

So sometimes it has problems reading SNMP data from one host, then from another host. All hosts have good connectivity.

/tap
User avatar
TheWitness
Developer
Posts: 17061
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Can you please remake using Net-SNMP 5.1.2 and try again.

Thanks,

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?
guerra6880
Posts: 33
Joined: Mon Apr 19, 2004 7:47 am

Post by guerra6880 »

Sorry wrong forum :oops:
tanchez37

Post by tanchez37 »

Okay, I configured/installed net-snmp 5.1.2, then re-made and re-installed cactid, and I get this when cactid runs the script:

Result from SCRIPT not valid. Partial Result: cpu1:1 cpu5:1 cöselect data_query_id,action,op,assert_value,arg1 from poller_reindex where host_id=2...

However, this is the result I get if the same script is run from command line:

cpu1:1 cpu5:1 cpu15:1 memory_allocated:20278304 memoryAvailable:94016480 memoryFragmented:6919 sessionsAllocated:3 sessionsMaximum:8000 sessionsFailed:0
User avatar
TheWitness
Developer
Posts: 17061
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

The error message has been fixed. Please check your script to insure that you have no extra white space at the end of the line. You can download the latest poller.c from CVS to correct.

Make sure ":" count == " " count + 1 on your output. That's the rule.

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?
tapufd
Cacti User
Posts: 55
Joined: Thu Aug 19, 2004 9:14 am
Location: Belgium

Post by tapufd »

Should the latest poller.c from CVS also correct my problem? I downloaded the latest nightly cactid-release and recreated the cactid.exe, but I still have the same problem. :cry:
I still got the same errors :
WARNING: Result from SNMP not valid. Partial Result: U...
I even got new errors with the new cactid.exe :
ERROR: The PHP Script Server Did not Respond in Time
WARNING: Result from SERVER not valid. Partial Result: U...

As I said in a previous post, I checked the OID .1.3.6.1.4.1.23.2.27.3.16.1.4.1 with GetIf and it contains data.
So the OID .1.3.6.1.4.1.23.2.27.3.16.1.4.1 exists and it returns the value : 6
A timeout seems unlikely because a ping gives times<1ms (server is located few meters from me).

Also in a previous post, it seems that cactid is not always having problems on the same server (it depends from poll to poll). Could it be, that cactid it not waiting long enough for an answer from the servers (waiting for a snmp result)?

I really want this cactid.exe to work, because I have a lot of servers to poll and every seconds I win, is good.

/tap

Windows XP (should be on win32 :oops: )
NET-SNMP 5.1.2
MySQL 4.0.20d
Cactid + Cacti 0.8.6a on latest nightly release.
User avatar
TheWitness
Developer
Posts: 17061
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Need another debug. I made changes to poller.c to strip off the invalid characters from the debug output. So, follow the previous instructions running in DEBUG and post the output. Thanks!!

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?
Speedster
Posts: 27
Joined: Wed Feb 11, 2004 7:53 pm
Location: Perth, Australia

Post by Speedster »

This still happens in the 0.8.6a-pre20040928 version of cactid.
09/29/2004 09:50:20 AM - CACTID: Poller[0] Host[93] WARNING: Result from SCRIPT not valid. Partial Result: U...
09/29/2004 09:50:20 AM - CACTID: Poller[0] Host[93] SCRIPT: /home/httpd/html/newcacti/scripts/win-wwwsessions.sh webmail asp, output: U
09/29/2004 09:50:20 AM - CACTID: Poller[0] DEBUG: SQLCMD: insert into poller_output (local_data_id,rrd_name,time,output) values (2435,'asp',NOW(),'U')
09/29/2004 09:50:20 AM - CACTID: Poller[0] Host[91] WARNING: Result from SCRIPT not valid. Partial Result: U...
09/29/2004 09:50:20 AM - CACTID: Poller[0] Host[91] SCRIPT: /home/httpd/html/newcacti/scripts/win-cpu.sh 203.xxx.xxx.xxx community, output: U
09/29/2004 09:50:20 AM - CACTID: Poller[0] DEBUG: SQLCMD: insert into poller_output (local_data_id,rrd_name,time,output) values (2094,'cpu',NOW(),'U')
09/29/2004 09:50:20 AM - CACTID: Poller[0] Host[127] WARNING: Result from SCRIPT not valid. Partial Result: U...
09/29/2004 09:50:20 AM - CACTID: Poller[0] Host[127] SCRIPT: /home/httpd/html/newcacti/scripts/win-cpu.sh 192.xxx.xxx.xxx community, output: U
09/29/2004 09:50:20 AM - CACTID: Poller[0] DEBUG: SQLCMD: insert into poller_output (local_data_id,rrd_name,time,output) values (3034,'cpu',NOW(),'U')
Running the scripts manually are fine and there is no whitespace at the end of the result line.
[dean@server log]$ /home/httpd/html/newcacti/scripts/win-cpu.sh 203.xxx.xxx.xxx community
123
Yes I have run it once in debug mode (which got the above log segment), I have tried cmd.php which works - but with over 100 hosts it does not complete within 5 minutes. It appears that cactid may not be waiting long enough for the script to provide it's output.
User avatar
TheWitness
Developer
Posts: 17061
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Cactid wait's 5 seconds for scripts to complete. Is this long enough? There may be an issue with RH and the Select syntax.

Thanks,

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?
tapufd
Cacti User
Posts: 55
Joined: Thu Aug 19, 2004 9:14 am
Location: Belgium

Post by tapufd »

Where can we change these 5 seconds? Maybe you can put an variable in the cactid.conf that allows us to change these 5 seconds?

/tap
User avatar
TheWitness
Developer
Posts: 17061
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

For now, open the file poller.c in the Cactid source directory and search for the fillowing string "timeout.tv_sec = 5;" and change "5" to be something different. Then, from a shell script in the Cactid directory type the following:

make clean
make
make install

Please post your results, I am VERRRRYYYY Interested in it.

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