Cacti not able to execute rrdtool - no graphs

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

Moderators: Developers, Moderators

Post Reply
3d3lmk5
Posts: 4
Joined: Tue Jan 15, 2013 9:41 am

Cacti not able to execute rrdtool - no graphs

Post by 3d3lmk5 »

Hi all,

I search through similar posts in this forum for 2 days now, trying to solve my problem, but didn´t succeed.

Symptoms:
- No Graphs appear in Cacti
- Technical support page states : "ERROR: Installed RRDTool version does not match configured version.
Please visit the Configuration Settings and select the correct RRDTool Utility Version.
"

My setup:
OS: Windows Server 2008
Webserver: IIS
Cacti: 0.8.8a
PHP: 5.3.17
RRDTool (Cygwin or Win32 build): 1.4.5

What I did so far:

- Checked "Settings -> Paths" as proposed by the error message - everything fine here.
- Checked RRDTool version via cmd line - it´s 1.4.5
- Checked configured rrdtool version in Cacti - it´s 1.4.x
- Checked access rights on c:\rrdtool\rrdtool.exe - IUSR is allowed to read & execute rrdtool.exe
- Fed the graph debug output into rrdtool.exe on the command line and succesfully generated a png showing a grpah with the collected interface statistics.
- Played a bit with the php code in utilities.php to get more verbose output: after execution of line

Code: Select all

246 : exec(cacti_escapeshellcmd(read_config_option("path_rrdtool")), $out_array);
out_array is still empty. It looks like rrdtool doesn´t get called at all. That would explain the missing grpahs...

Maybe I missed something or the permissions on rrdtool or somewhere else are still not correct. Any hint is appreciated ...

Thanks in advance!
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Re: Cacti not able to execute rrdtool - no graphs

Post by BSOD2600 »

rrdtool.exe is executed by cmd.exe. Are the permissions on cmd.exe properly configured too?
A Graph Debug output is empty, I assume?
The poller properly running every 5 min? Any errors in cacti.log?
3d3lmk5
Posts: 4
Joined: Tue Jan 15, 2013 9:41 am

Re: Cacti not able to execute rrdtool - no graphs

Post by 3d3lmk5 »

Indeed permissions on cmd.exe were missing. I added "Read & Execute" for IUSR and IIS_IUSRS. I actually expected that to solve the problem, but unfortunately it didn´t. Still same error message on "Technical Support" page and still no graphs.

Regarding graph debug output ("Graph source/properties"): I see the command that is used to create the graph with rrdtool, but the picture is not shown. Trying the command on shell with "-" substituted by a file name created a graph image as I would expect to see it.

What does the poller actually do? Fetching the data from the sources - that seems to be working.

Cacti log show Warnings regarding "SNMP Get Timeouts"(still testing the nodes, so these warnings are not unexpected), but nothing related to the graphs or graph creation.

Is there anything I can test (maybe via shell)? Can I test if the cmd.exe permissions are correctly configured now?
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Re: Cacti not able to execute rrdtool - no graphs

Post by BSOD2600 »

3d3lmk5 wrote:Regarding graph debug output ("Graph source/properties")
Actually I was meaning graph management -> select graph -> show graph debug.
3d3lmk5 wrote:What does the poller actually do? Fetching the data from the sources - that seems to be working.
Test if devices are online, collect data (snmp, scripts, etc), store the data into the *.rrd files, invoke plugin pollers/tasks, etc.
3d3lmk5 wrote:Cacti log show Warnings regarding "SNMP Get Timeouts"(still testing the nodes, so these warnings are not unexpected), but nothing related to the graphs or graph creation.
Well, timeouts for data collection could mean no data... but you should still have an empty graph.
3d3lmk5 wrote:Is there anything I can test (maybe via shell)? Can I test if the cmd.exe permissions are correctly configured now?
what level user account does the cacti task run as currently? Try to manually run the poller (php poller.php) with an administrator account from the CLI, with the cacti.log logging level set to high, and see what happens. If the *.rrd files are now created, there is still a permission problem somewhere. Sysinternals Process Monitor should reveal these.
3d3lmk5
Posts: 4
Joined: Tue Jan 15, 2013 9:41 am

Re: Cacti not able to execute rrdtool - no graphs

Post by 3d3lmk5 »

Hi BSOD,

thanks for your help so far - I think we are approaching it now :

Graph debug is "empty" - meaning the region below "RRDTool says:" is empty.

Code: Select all

RRDTool Command:

C:/rrdtool/rrdtool.exe graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="192.168.0.50 - Traffic" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit="0" \
--vertical-label="bits per second" \
--slope-mode \
--font TITLE:10: \
--font AXIS:7: \
--font LEGEND:8: \
--font UNIT:7: \
DEF:a="C\:/wwwroot/cacti/rra/12/9778.rrd":"traffic_in":AVERAGE \
DEF:b="C\:/wwwroot/cacti/rra/12/9778.rrd":"traffic_out":AVERAGE \
CDEF:cdefa="a,8,*" \
CDEF:cdefe="b,8,*" \
AREA:cdefa#00CF00FF:"Inbound"  \
GPRINT:cdefa:LAST:" Current\:%8.2lf %s"  \
GPRINT:cdefa:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:cdefa:MAX:"Maximum\:%8.2lf %s\n"  \
LINE1:cdefe#002A97FF:"Outbound"  \
GPRINT:cdefe:LAST:"Current\:%8.2lf %s"  \
GPRINT:cdefe:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:cdefe:MAX:"Maximum\:%8.2lf %s\n" 
RRDTool Says:

There seems to be something wrong with the way rrdtool is called:
Image

The first part of the trace - called by php-cgi.exe was triggerd by the "System Utilities -> Technical Support" page. The rest was triggered by the poller I guess...

Those "NO SUCH FILE" messages are interesting - looks like the "-" after rrdtool.exe is confusing it...
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Re: Cacti not able to execute rrdtool - no graphs

Post by BSOD2600 »

3d3lmk5 wrote:The first part of the trace - called by php-cgi.exe was triggerd by the "System Utilities -> Technical Support" page. The rest was triggered by the poller I guess...
Correct, there are two separate methods and users which are utilized. One via the web server and the other via the poller. Did testing the poller with admin creds solve the rrd creation problem?
3d3lmk5 wrote:Those "NO SUCH FILE" messages are interesting - looks like the "-" after rrdtool.exe is confusing it...
Possibly, but I'd doubt it. Desired access is read/list, so just appears to be looking for the files. If you got properties on that cmd.exe entry, it'd show you more details about what was going on too. ultimately in the end though, rrdtool.exe was launched by cmd.exe in that capture it appears (getting properties on that entry will show what PID was its parent; should be cmd.exe).
3d3lmk5
Posts: 4
Joined: Tue Jan 15, 2013 9:41 am

Re: Cacti not able to execute rrdtool - no graphs

Post by 3d3lmk5 »

Hi,

I finally gave up upon running cacti via IIS. After checking the permissions several times I discovered that the netadmin user (who was actually running things, when cacti was used via IIS) wasn´t able to write to the php error log. After giving it the permission, the log filled with "Unable to fork" messages each time the technical support page was used. But I was not able to find out how to setup the correct permissions and settings in IIS.

To make a long story short: I installed an Apache via XAMPP and finally got graphs on the screen. The user used by Apache is the System user - which seems to be allowed to do everything necessary to draw graphs.

So - obviuosly everything else was already running fine - even netadmin was allowed to call rrdtool (tested via netadmin user on the cli), but calling it via ISS->PHP is not possible.

However, thanks for the support!
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Re: Cacti not able to execute rrdtool - no graphs

Post by BSOD2600 »

Glad you got it working in the end. would've loved to figure out the root problem, as you're not the first one to have it. however, I've not been able to reproduce it with a fresh VM.
zunixaani
Posts: 1
Joined: Thu Feb 26, 2015 7:06 am

Re: Cacti not able to execute rrdtool - no graphs

Post by zunixaani »

Thank you VERY much. I need all the help I can get :-(
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests