Compile cactid 0.8.6c

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

Moderators: Developers, Moderators

laffen
Cacti User
Posts: 56
Joined: Tue Jul 13, 2004 2:57 am
Location: Norway

Compile cactid 0.8.6c

Post by laffen »

Hi,

I have problems compiling cactid 0.8.6c, make exits like this:
...
gcc -DHAVE_CONFIG_H -I. -I. -I./config -I/usr/include/ucd-snmp -I/usr/include/ucd-snmp/.. -I/usr/include/mysql -g -O2 -c `test -f 'php.c' || echo './'`php.c
gcc -I/usr/include/ucd-snmp -I/usr/include/ucd-snmp/.. -I/usr/include/mysql -g -O2 -L/usr/local/ssl/lib -L/usr/lib -L/usr/lib -o cactid sql.o cactid.o util.o snmp.o locks.o poller.o nft_popen.o php.o -lsnmp -lcrypto -lmysqlclient -lz -lpthread -lm -lnsl
poller.o(.text+0x13f): In function `poll_host':
/usr/src/cacti-cactid-0.8.6c/poller.c:99: undefined reference to `mysql_thread_init'
poller.o(.text+0xeca):/usr/src/cacti-cactid-0.8.6c/poller.c:392: undefined reference to `mysql_thread_end'
collect2: ld returned 1 exit status
make: *** [cactid] Error 1

System is Debian Linux - testing, mysql 4.0.22 and php 4.3.10. Earlier cactid has compiled without any problems.
User avatar
TheWitness
Developer
Posts: 17062
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

My bad. Please download the poller.c file from the following location. Then remake. Will solve you problem.

TheWitness

http://cvs.cacti.net/cgi-bin/viewcvs.cg ... _6#dirlist
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?
laffen
Cacti User
Posts: 56
Joined: Tue Jul 13, 2004 2:57 am
Location: Norway

Post by laffen »

TheWitness wrote:My bad. Please download the poller.c file from the following location. Then remake. Will solve you problem.

TheWitness

http://cvs.cacti.net/cgi-bin/viewcvs.cg ... _6#dirlist
Thanks! Compiled straight away.
Anthony

Post by Anthony »

Hello !

I had the same problem and I just did the same thing (compile 0.8.6c with last version of poller.c from the link you gave) and I get this error :

gcc -DHAVE_CONFIG_H -I. -I. -I./config -I/usr/local/include/net-snmp -I/usr/local/include/net-snmp/.. -I/usr/include/mysql -g -O2 -c `test -f 'poller.c' || echo './'`poller.c
poller.c: In function `poll_host':
poller.c:130: structure has no member named `snmpv3_auth_username'
poller.c:130: structure has no member named `snmpv3_auth_username'
poller.c:131: structure has no member named `snmpv3_auth_password'
poller.c:131: structure has no member named `snmpv3_auth_password'
poller.c:132: structure has no member named `snmpv3_auth_protocol'
poller.c:132: structure has no member named `snmpv3_auth_protocol'
poller.c:133: structure has no member named `snmpv3_priv_passphrase'
poller.c:133: structure has no member named `snmpv3_priv_passphrase'
poller.c:134: structure has no member named `snmpv3_priv_protocol'
poller.c:134: structure has no member named `snmpv3_priv_protocol'
poller.c:137: structure has no member named `availability_method'
poller.c:138: structure has no member named `ping_method'
poller.c:160: structure has no member named `availability_method'
poller.c:161: structure has no member named `availability_method'
poller.c:161: `AVAIL_NONE' undeclared (first use in this function)
poller.c:161: (Each undeclared identifier is reported only once
poller.c:161: for each function it appears in.)
poller.c:162: structure has no member named `availability_method'
poller.c:170: structure has no member named `availability_method'
poller.c:173: structure has no member named `availability_method'
poller.c:294: structure has no member named `snmpv3_auth_username'
poller.c:294: structure has no member named `snmpv3_auth_username'
poller.c:295: structure has no member named `snmpv3_auth_password'
poller.c:295: structure has no member named `snmpv3_auth_password'
poller.c:296: structure has no member named `snmpv3_auth_protocol'
poller.c:296: structure has no member named `snmpv3_auth_protocol'
poller.c:297: structure has no member named `snmpv3_priv_passphrase'
poller.c:297: structure has no member named `snmpv3_priv_passphrase'
poller.c:298: structure has no member named `snmpv3_priv_protocol'
poller.c:298: structure has no member named `snmpv3_priv_protocol'
poller.c:301: structure has no member named `availability_method'
poller.c:302: structure has no member named `ping_method'
poller.c: In function `exec_poll':
poller.c:497: structure has no member named `max_script_runtime'
make: *** [poller.o] Error 1

What can I do to resolve this ?
The poller.c is version 1.72.2.4

Thank you for your help
User avatar
monideth
Cacti User
Posts: 95
Joined: Thu Apr 03, 2003 3:29 am
Contact:

Post by monideth »

Hi

I had the same problem.

however, the problem was resolved when I downloaded the poller.c code from the following link:

http://cvs.cacti.net/cgi-bin/viewcvs.cg ... ANCH_0_8_6

("Revision 1.72.2.4 / (view) - annotate - [select for diffs] , Mon Dec 20 02:27:45 2004 UTC (3 weeks, 2 days ago) by thewitness") - view link.

I had the problem when I downloaded the poller.c file from the following link:

http://cvs.cacti.net/cgi-bin/viewcvs.cg ... text/plain

i.e. I downloaded the "Bookmark a link to: HEAD / (download)" link

Hope that helps.

Regards,

Mon
'They'll be sorry. They'll be sorry if I die - except that I can't. Whatever you do it ends up raining. What's it all for? What's the point of it all? And if it hasn't got a point, what's the point of that?'
Monkey (2:2)
User avatar
TheWitness
Developer
Posts: 17062
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

We have plans on re-releasing Cactid 0.8.6c. There was a mixup that caused 0.8.7 code to make it into 0.8.6c. It's a bumber. :oops:
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?
Wyvern
Posts: 9
Joined: Mon Jul 28, 2003 2:51 am

Post by Wyvern »

TheWitness wrote:We have plans on re-releasing Cactid 0.8.6c. There was a mixup that caused 0.8.7 code to make it into 0.8.6c. It's a bumber. :oops:
Damn, because I am having problems running cactid, in that the process runs, but does not update the rrd files.

Now cacti has the correct path to rrdtool installed in it's settings -> path. I have turned the logging for the poller to debug and I can't see why it's not updating the rrd files.

Here is a snippet of the process as it runs.

[root@monitor bin]# ./cactid | more
CACTID: Using cactid config file [cactid.conf]
CACTID: DEBUG: The path_php_server variable is /var/www/cacti/script_server.php
CACTID: DEBUG: The path_cactilog variable is /var/www/cacti/log/cacti.log
CACTID: DEBUG: The log_destination variable is 1
CACTID: DEBUG: The path_php variable is /usr/bin/php
CACTID: DEBUG: The availability_method variable is 2
CACTID: DEBUG: The ping_recovery_count variable is 3
CACTID: DEBUG: The ping_failure_count variable is 2
CACTID: Non Window envrionment, running as root, ICMP Ping available
CACTID: DEBUG: The ping_method variable is 2
CACTID: DEBUG: The ping_retries variable is 1
CACTID: DEBUG: The ping_timeout variable is 400
CACTID: DEBUG: The log_perror variable is 1
CACTID: DEBUG: The log_pwarn variable is 1
CACTID: DEBUG: The log_pstats variable is 1
CACTID: DEBUG: The threads variable is 5
CACTID: CACTID: Version 0.8.6c starting
CACTID: MYSQL: Connecting to MySQL database 'cacti' on 'localhost'...
CACTID: DEBUG: PHP Script Server Routine Started
CACTID: DEBUG: PHP Script Server About to FORK Child Process
CACTID: DEBUG: PHP Script Server Child FORK Success
CACTID: DEBUG: Confirmed PHP Script Server Running
CACTID: DEBUG: Initial Value of Active Threads is 0
CACTID: DEBUG: Valid Thread to be Created
CACTID: DEBUG: The Value of Active Threads is 1
CACTID: DEBUG: In Poller, About to Start Polling of Host
CACTID: MYSQL: Connecting to MySQL database 'cacti' on 'localhost'...
CACTID: Host[1] SNMP Result: Host does not require SNMP
CACTID: DEBUG: SQLCMD: update host set status='3',status_event_count='0', status_fail_date='0000-00-00 00:00:00',status_rec_date='2005-01-12 05:59:00',status
_last_error='Ping not performed due to setting.',min_time='0.000000',max_time='0.000000',cur_time='0.000000',avg_time='0.000000',total_polls='4047',failed_po
lls='6',availability='99.0000' where id='1'

CACTID: Host[1] DEBUG: The POPEN returned the following File Descriptor 9
CACTID: Host[1] SCRIPT: perl /var/www/cacti/scripts/loadavg_multi.pl, output: 1min:0.54 5min:0.35 10min:0.31
CACTID: DEBUG: SQLCMD: insert into poller_output (local_data_id,rrd_name,time,output) values (5,'','2005-01-13 09:20:29','1min:0.54 5min:0.35 10min:0.31')
CACTID: Host[1] DEBUG: The POPEN returned the following File Descriptor 9
CACTID: Host[1] SCRIPT: perl /var/www/cacti/scripts/linux_memory.pl MemFree:, output: 107780
CACTID: DEBUG: SQLCMD: insert into poller_output (local_data_id,rrd_name,time,output) values (3,'mem_buffers','2005-01-13 09:20:29','107780')
CACTID: Host[1] DEBUG: The POPEN returned the following File Descriptor 9
CACTID: Host[1] SCRIPT: perl /var/www/cacti/scripts/linux_memory.pl SwapFree:, output: 1011316
CACTID: DEBUG: SQLCMD: insert into poller_output (local_data_id,rrd_name,time,output) values (4,'mem_swap','2005-01-13 09:20:29','1011316')
CACTID: Host[1] DEBUG: The POPEN returned the following File Descriptor 9
CACTID: Host[1] SCRIPT: perl /var/www/cacti/scripts/unix_processes.pl, output: 62
CACTID: DEBUG: SQLCMD: insert into poller_output (local_data_id,rrd_name,time,output) values (7,'proc','2005-01-13 09:20:29','62')
CACTID: Host[1] DEBUG: The POPEN returned the following File Descriptor 9
CACTID: Host[1] SCRIPT: perl /var/www/cacti/scripts/unix_users.pl, output: 1
CACTID: DEBUG: SQLCMD: insert into poller_output (local_data_id,rrd_name,time,output) values (6,'users','2005-01-13 09:20:29','1')
CACTID: Host[1] DEBUG: HOST COMPLETE: About to Exit Host Polling Thread Function
CACTID: DEBUG: Valid Thread to be Created
CACTID: DEBUG: The Value of Active Threads is 2
CACTID: DEBUG: In Poller, About to Start Polling of Host
CACTID: MYSQL: Connecting to MySQL database 'cacti' on 'localhost'...
CACTID: Host[2] SNMP Result: Host responded to SNMP
CACTID: DEBUG: SQLCMD: update host set status='3',status_event_count='0', status_fail_date='2005-01-12 06:55:00',status_rec_date='2005-01-12 06:40:00',status
_last_error='Host did not respond to SNMP',min_time='1.841070',max_time='999.999990',cur_time='2.611160',avg_time='89.432224',total_polls='4047',failed_polls
='9',availability='99.0000' where id='2'

any idea's?

Cheers,
Warrick
User avatar
TheWitness
Developer
Posts: 17062
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Cactid does not update RRD files in 0.8.6x. Poller.php does. Poller.php call's either cmd.php or cactid based upon setting.

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?
Wyvern
Posts: 9
Joined: Mon Jul 28, 2003 2:51 am

Post by Wyvern »

TheWitness wrote:Cactid does not update RRD files in 0.8.6x. Poller.php does. Poller.php call's either cmd.php or cactid based upon setting.

TheWitness
Okay, I am not quite sure where I have gone wrong then. Here is what I have configured in the Cacti web interface Settings -> Poller

Poller is enabled
Poller type is cactid
Maximum Concurrent Poller Processes 1
Maximum Threads per Process 5

And every five minutes in cron it runs

*/5 * * * * cd /var/www/cacti/bin ; ./cactid > /dev/null 2>&1

so where am I going wrong then? What other process do I have to call to get it to create the graphs?

Cheers,
Warrick
Wyvern
Posts: 9
Joined: Mon Jul 28, 2003 2:51 am

Post by Wyvern »

Wyvern wrote:
TheWitness wrote:Cactid does not update RRD files in 0.8.6x. Poller.php does. Poller.php call's either cmd.php or cactid based upon setting.

TheWitness
Okay, I am not quite sure where I have gone wrong then. Here is what I have configured in the Cacti web interface Settings -> Poller

Poller is enabled
Poller type is cactid
Maximum Concurrent Poller Processes 1
Maximum Threads per Process 5

And every five minutes in cron it runs

*/5 * * * * cd /var/www/cacti/bin ; ./cactid > /dev/null 2>&1

so where am I going wrong then? What other process do I have to call to get it to create the graphs?

Cheers,
Warrick
My bad, didn't notice the change to using poller.php from the old version I was running. My apologies.

I have since changed it to

*/5 * * * * php /var/www/cacti/poller.php > /dev/null 2>&1

but still don't get rrd files. :(

Sorry,
Warrick
User avatar
TheWitness
Developer
Posts: 17062
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Please run poller.php from the command line on time with logging set to DEBUG. Post your output.

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?
Wyvern
Posts: 9
Joined: Mon Jul 28, 2003 2:51 am

Post by Wyvern »

TheWitness wrote:Please run poller.php from the command line on time with logging set to DEBUG. Post your output.

TheWitness
It's now working, but I had to remove the cacti database, and restart it from scratch, but it is now polling with cactid and creating rrd files.

Thanks for your help tho!
Cheers,
Warrick
bdbrumm
Cacti User
Posts: 51
Joined: Mon Aug 12, 2002 3:16 pm

rrd file creation issues with cactid

Post by bdbrumm »

I'm having a similar issue with cactid -- it seems to skip the SNMP-based hosts and seems to only execute the scripts. I've validated this by swapping back and forth between poller types (cactid vs. cmd.php). cmd.php always runs correctly. I'm building a new system and need to poll quite a few hosts and desire the speed from cactid. I ran cactid from the command line with debug level set on. I've attached the output as a file. I've also included the rra directory listing showing that the rra's are skipped.
Also, I noted that after 2 poll cycles, using only snmp as an uptime/availability indicator, that the snmp devices are marked as down in the device list. Running cmd.php from the command line a couple times restores them and this is expected behavior.
Having the hosts marked down though seems to indicate that the SNMP queries in cactid are failing somehow; I don't know how to further validate this. Please advise and I can test further.
Attachments
cacti-dbg.txt
cactid DEBUG output and rra directory listing showing that the snmp hosts were skipped.
(2.37 KiB) Downloaded 168 times
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

What version of NET-SNMP are you running?
[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]
bdbrumm
Cacti User
Posts: 51
Joined: Mon Aug 12, 2002 3:16 pm

versions in use

Post by bdbrumm »

net-snmp-5.2.1.rc2

cacti-0.8.6c
cacti-cactid-0.8.6c
httpd-2.0.52
mysql-4.1.8a
php-4.3.10
rrdtool-1.0.48

Fedora, Core 3
Linux calvin 2.6.9-1.667 #1 Tue Nov 2 14:41:25 EST 2004 i686 i686 i386 GNU/Linux
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest