cactid does not like php script server?

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

Moderators: Developers, Moderators

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

cactid does not like php script server?

Post by gandalf »

Hello,
I started using script_server for two scripts. But in both cases, only the first output parm is updated using cactid. All runs well using cmd.php.
Tried cactid-0.8.6e and some of the cactid-0.8.6f-rc*; always same result. Attached, you'll find a snippet from the log in DEBUG level.
Anyone experiencing this?

Reinhard

cacti 0.8.6g
PHP 4.3.9 (cgi) (built: Nov 24 2004 08:48:16)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
RRDtool 1.2.11 Copyright 1997-2005 by Tobias Oetiker <tobi@oetiker.ch>
mysql Ver 14.7 Distrib 4.1.7, for redhat-linux-gnu (i386)
gcc (GCC) 3.4.3 20041212 (Red Hat 3.4.3-9.EL4)
Attachments
cactid-poller-prb.txt
cactid.log output
(3.24 KiB) Downloaded 929 times
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

This is not a poller issue, but rather a template issue unfortunately. I would realy like to understand how it got damaged though. I will be on IM at about 8:00pm EDT if you want to ping me.

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?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

TheWitness wrote:This is not a poller issue, but rather a template issue unfortunately.
Sorry, german cacti fan. And I don't have a cacti installation at home at the moment. But if this is a template issue, I'll dig through this (perhaps starting with some other ss_* scripts/templates). Is there any starting point? I'm not afraid of programming, either C or php or whatever, but not an expert. More labour to be done this weekend ...
Reinhard
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

TheWitness,
after some debugging I filed an error report at http://bugs.cacti.net/view.php?id=577. You'll find my solution there. After this "patch" everything works fine for me. So, at the moment, I don't think this is a template issue.
Reinhard
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

lvm,

What code are you dealing with. The references to "spaceloc" do not even exist in the current code base...

Larry
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?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Sorry for the inconvenience.
My codebase was cactid 0.8.6e (did I forget this reference in the bug description?). I'm not sure, but this might have been a 0.8.6e-rc<somewhat>. Just looked at the source. The zip is dated March,19 2005. Sorry for that, but the version code in the log did not complain about any rc<somewhat>.
I'm currently struggeling with cactid 0.8.6f rc11 (see thread) due to locking problems. I'm looking forward to that new version.
Reinhard
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Try this. Just replace you current source with the source attached. Let me know how it goes. I am not quite ready to release.

TheWitness
Attachments
Cactid086f-rc12.zip
(47.67 KiB) Downloaded 592 times
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?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

TheWitness,
I've copied the cactid-0.8.6f-rc11 sources. Then replaced old stuff with newer from your zip. Run aclocal, autoconf, autoheader, automake, make: all went fine. Does not hang opening MYSQL any more. Now, all scripts (perl, php script server) are fine. But all snmp queries return U. Had this issue already with former 0.8.6f-rc* code (see threads). Attached, you'll find a snipped from the cacti.log. If you need additional info, please let me know.
Reinhard
Attachments
cactid-0.8.6-rc11-patched.gz
DEBUG log of cactid-0.8.6f-rc11-patched
(5.5 KiB) Downloaded 633 times
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Run Cactid from the command line. There will likely be some additional error messages. It is Ok to do so. Records will be placed in the poller_output table. It's no problem. I figure the snmp stuff has something to do with your config.

Larry
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?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

TheWitness,
piped the output into the file attached. But I don't see anything new. And my 0.8.6e(patched) cactid is working fine ...
Reinhard
Attachments
cactid-0.8.6f-rc11-patched.gz
new log output from cactid at cli
(3.06 KiB) Downloaded 635 times
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Did you also pipe stderr? That's what I wanted to see. You can run the following from a shell:

cactid <host_id> <host_id>

Where <host_id> is a host with some snmp queries.

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?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Sorry, there is no stderr (I would have posted it, of course). Again run cactid-rc11-patched, again no stderr. Attached, please find output from host 2 (this host has snmp queries)
Reinhard
Attachments
cactid-0.8.6f-rc11-patched.gz
new output from HOST[2]
(1.97 KiB) Downloaded 653 times
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Bump the Maximum OID Get Size to 5 and see if that makes a difference.

Larry
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?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Log now shows

Code: Select all

CACTID: DEBUG:  The Maximum SNMP OID Get Size is 5
. But no stderr and snmp results still "U". Sorry
Reinhard
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Did some "debugging". Commented out lines 507, 515, 622, 630 of poller.c. There are some calls to "strip_quotes":

Code: Select all

/* remove double or single quotes from string
snprintf(snmp_oids[j].result, sizeof(snmp_oids[j].result)-1, "%s", strip_alpha(strip_quotes(snmp_oids[j].result)));*/
/* remove double or single quotes from string
snprintf(snmp_oids[j].result, sizeof(snmp_oids[j].result)-1, "%s", strip_quotes(snmp_oids[j].result));*/
Now it works for me. But I don't really know why this happens (not that C guy, sorry).
Log is attached; stderr still NULL
Reinhard

[edit]
even with this code in util.c

Code: Select all

char *strip_quotes(char *string) {
        int length;
        char *posptr, *startptr;
        char type;

return string;
the problem still happens. And of course, this code was not changed. I'm confused ...
[/edit]
Attachments
cactid-rc12.gz
cactid-rc12 log after some tweaking of poller.c
(1.94 KiB) Downloaded 628 times
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests