cactid doesn't seem to work

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

Moderators: Developers, Moderators

Post Reply
The00Dustin
Posts: 24
Joined: Thu Jan 05, 2006 5:52 pm

cactid doesn't seem to work

Post by The00Dustin »

Every time I try to set the poller as cactid and remove the php cronjob, the graphs stop getting data (a gap comes on to the graph where data should be / have been). I am not sure what I am overlooking, but i do suspect that I am overlooking something.
Does the php command need to stay in crontab?
Does the cactid command need to be a cron job?
I am currently trying cactid 0.8.6g... I put the full path to perl everywhere I saw it. Does <path_cacti> need replaced with the full path to cacti as well?
I had no luck with previous versions, but I believe that was because I had the wrong path to cactid. That path is correct now (onthe poller tab).
Is there anything else I might be overlooking?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

It is not that complicated (at least, to me :wink: ). You _always_ keep the crontab as is and call poller.php every 5 min. The poller itself now gets his configuration from the settings table of the mysql database. There are only two options, to be configured in the Poller tab of the Settings:
- cmd.php or
- cactid
In neither case you will change the crontab.
Reinhard
The00Dustin
Posts: 24
Joined: Thu Jan 05, 2006 5:52 pm

Post by The00Dustin »

cmd.php and the poller.php cronjob was working fine, but when I switched cacti to cactid the graphs stopped receiving data again. It is the latest version and I did use complete paths. Any suggestions?
farhan
Posts: 47
Joined: Sat Nov 12, 2005 6:55 am

Post by farhan »

Hello,

I have been facing the same problem since i upgraded cacid.
php poller.php is running though crontab. Please help me

Error is

Waiting on 1/1 pollers.
01/17/2006 04:21:31 PM - POLLER: Poller[0] Maximum runtime of 292 seconds exceeded. Exiting.
01/17/2006 04:21:31 PM - SYSTEM STATS: Time:292.7455 Method:cactid Processes:1 Threads:1 Hosts:3 HostsPerProcess:3 DataSources:33 RRDsProcessed:0
PHP Warning: pclose(): 47 is not a valid stream resource in /usr/local/cacti/lib/rrd.php on line 48
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

When you run cactid from command line, what does it return? e.g.

Code: Select all

cactid 0 5
Setting Logging Level to DEBUG (Settings!) will give more details
Reinhard
User avatar
mojiro
Cacti User
Posts: 121
Joined: Sun Jul 24, 2005 12:20 pm
Location: Ireland, Dublin

Post by mojiro »

recently I had a problem with my loopback hostname (I mean localhost)
you may change "localhost" to "127.0.0.1".

also before compiling / running cactid, check its config file. It is seperated
from the main cacti gui.
The00Dustin
Posts: 24
Joined: Thu Jan 05, 2006 5:52 pm

Finally!

Post by The00Dustin »

Sure enough, cactid never worked because I didn't change the cactid.conf before I compiled. It is running now. Thanks!
The00Dustin
Posts: 24
Joined: Thu Jan 05, 2006 5:52 pm

Post by The00Dustin »

Well, I ran cactid successfully after I recompiled, I got several errors, but I assumed that was because poller.php had to call it. When the next cronjob came around some of my graphs updated once, but then it stopped working again. When I run it I get the original error again,

Code: Select all

sudo /usr/local/cactid/bin/cactid
CACTID: MYSQL: Connection Failed: Access denied for user 'cactiuser'@'localhost' (using password: YES)
How much sense does that make?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

I would say its a cactid.conf issue. The user/pw must match those of include/config.php to get access to cacti's mysql tables
Reinhard
The00Dustin
Posts: 24
Joined: Thu Jan 05, 2006 5:52 pm

Post by The00Dustin »

I have been unable to find a cactid.conf to edit. I edited the one in the tarball before I compiled, and I found one in /var/net-snmp that says not to edit it. Aside from those two, there are no others. Do I need to manually copy the one from the tarball extraction location to another location? Thanks.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Putting cactid.conf in the same directory as cactid will work. AFAIK, /etc/cactid.conf will work either
Reinhard
The00Dustin
Posts: 24
Joined: Thu Jan 05, 2006 5:52 pm

Post by The00Dustin »

That did the trick. I guess I thought it was working before because cactid.conf was in my working directory (I was still in the source folder). Thanks!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest