[solved] Cacti Poller not functioning

Post support questions that relate to the Windows 2003/2000/XP operating systems.

Moderators: Developers, Moderators

Post Reply
just4jolly
Posts: 6
Joined: Mon Aug 17, 2009 6:55 pm

[solved] Cacti Poller not functioning

Post by just4jolly »

Hi,

I am very new to Cacti. These are my current configurations

Operating System: Windows XP Professional
Webserver:Apache 2.2.11
Cacti:0.8.7 d
Spine: Currently not using
MySQL:5.1.32
PHP:5.2.9-1
RRDTool (Cygwin or Win32 version):1.2.30-Win32 version
Net-SNMP:5.4.1-3
Cygwin (cygwin1.dll version):
Plugin Architecture:0.8.7d PA-v 2.4

I have recently patched it as well.

I am facing problems in getting my graphs to update when the poller runs. The graphs only update if i run the poller through the CLI manually. I have ensured that the rra directory and the log directoy within cacti have been given permissions for the creator of the scheduled task.

Could someone tell me how I can get the poller to run correctly every five minutes and update the graphs so that I could get a continous graph for my devices?

I have attached a file with my graph showing a single spike.

I have also attached the error that pops up in the application event logs as well for reference.

Thanks for the help in advance.

Just4jolly
Attachments
Cacti graph screenshot.gif
Cacti graph screenshot.gif (2.72 MiB) Viewed 5247 times
Application log error.gif
Application log error.gif (853.18 KiB) Viewed 5247 times
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

1) cacti 0.8.7e is the latest.
2) manually running the poller works, yet the scheduled task does not = you still have NTFS permission problems. Make sure the Apache service account has modify permissions to the \cacti\rra\ and \cacti\log\ folder. Also double-check the cacti scheduled task user does too AND that you use 'replace permission entries on all child objects...' in the advanced security dialog box in Windows.
just4jolly
Posts: 6
Joined: Mon Aug 17, 2009 6:55 pm

Installed 0.8.7e yet no change

Post by just4jolly »

Hi ,

I reinstalled 0.8.7e currently and made the changes that you had requested yet they don't seem to be helping. Any other suggestions on how I could work around this?

I am also getting the error stating that the scheduled task is out of sync with the poller interval when I run the poller manually. My scheduled task does not seem to be running correctly since the last run time column reflects only to the time when I run the poller manually.

My Poller Interval and Cron Interval in the cacti interface are set to Every 5 minutes.

I am sure I am missing something here, please help.

Thanks,

Just4jolly
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

1) please read through http://bsod2600.home.comcast.net/~bsod2 ... ndows.html.
2) the cacti scheduled task IS running every 5 minutes, right?
3) Does the scheduled task user, have read/execute permissions on cmd.exe?
just4jolly
Posts: 6
Joined: Mon Aug 17, 2009 6:55 pm

Post by just4jolly »

Hi BSOD2600,

I read through the instructions in your windows installation guide. Made a couple of more changes to my php.ini file as recommended.

1) The problem with my cacti scheduled task is that the "last run time" column never gets updated and neither are the graphs updated. But the status keep saying running with a result of 0x0.

I am using Apache so I am expecting that I would not have to create the IUSR_computer user account and provide it with the required permissions? I had used the same user account to install Apache, hence i am assuming that I would not have to give any other user account permissions?

I have given all permissions to the scheduled task user for the cmd.exe and the rrdtool.exe. In fact I have given that scheduled task user account full privileges on C:\ drive itself to make sure there are no permission issues.

Please bear with my silly questions, I am not very adept with computer fundamentals. :(

Thanks,

Just4jolly
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

just4jolly wrote:1) The problem with my cacti scheduled task is that the "last run time" column never gets updated and neither are the graphs updated. But the status keep saying running with a result of 0x0.
Then it's not actually running.

control panels -> scheduled tasks -> Advanced menu -> View Log.
Why is the cacti scheduled task failing?
just4jolly wrote:I am using Apache so I am expecting that I would not have to create the IUSR_computer user account and provide it with the required permissions? I had used the same user account to install Apache, hence i am assuming that I would not have to give any other user account permissions?
Correct. Apache typically runs under the SYSTEM account, so don't need to grant those extra permissions. The scheduled user account still needs the permissions applied though, per the installation guide.
just4jolly
Posts: 6
Joined: Mon Aug 17, 2009 6:55 pm

Post by just4jolly »

Hi,

I have looked through the logs for scheduled tasks and find that

"Cacti poller.job" (php.exe)
Started <date> <time>

The started date and time refer only to the time I had started the scheduled task to run. There is no information regarding when the task finished. The status of the task is always in running? Is that how it should be ? I don't see an error code either since the last result is 0x0.

I am using wamp server hence have 3 files php.exe, php-win.exe and php-cgi.exe. I am using the php.exe for the cacti poller. Is there anything specific besides the information mentioned in your installation that I need to look for in scheduling the task?

I did select the checkbox where it says "if task is still running, stop it at this time".

Still beats me as to why the scheduled task will not update? :x
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Please follow and double-check your settings:
#

You are going to need to schedule a task while logged on as an Administrator account, so poller.php can run every 5 minutes. Make sure the Task Scheduler service is started and follow the steps below to begin.

1.

Select Start --> Settings --> Control Panel and double click on Scheduled Tasks.
2.

Double click on Add Scheduled Task.
3.

Click Next and Browse on the following screen. Find c:\php and select php.exe. Choose Daily on and click Next.
4.

Click Next again without changing the time or date settings.
5.

When entering a username and password make sure the user has modify permissions to the following directories:

c:\inetpub\wwwroot\cacti\rra\
c:\inetpub\wwwroot\cacti\log\

Make sure the user has Read & Execute permissions to the following directories:

c:\php\
c:\inetpub\wwwroot\cacti\
c:\rrdtool\

6.

Click Next and Finish to close the wizard.
7.

Right click on the task you just created, and select Properties.
8.

Select the Schedule tab.
9.

Make sure Daily is selected and click the Advanced button.
10.

Check the Repeat checkbox, set the repetition for every 5 minutes, set the duration for 24 hours, and check the If the task is still running, stop it at this time checkbox.
11.

Click OK
12.

In the Run textbox enter the following text making sure to use the appropriate paths.

c:\php\php.exe c:\inetpub\wwwroot\cacti\poller.php

The start in box should say c:\inetpub\wwwroot\cacti.
toffuit
Posts: 11
Joined: Thu Jul 30, 2009 4:41 am

Post by toffuit »

One other thing to check in Win32 is whether you have the Task Scheduler started in service.msc.
just4jolly
Posts: 6
Joined: Mon Aug 17, 2009 6:55 pm

Problem solved

Post by just4jolly »

Hi,

I resolved the problem. It was the permission issue for the folders and this time I ensured that the correct information was provided for task scheduler to run.

Thanks a lot BSOD and toffuit, really appreciate your help and patience.

Just4jolly86
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests