Problem with my graphs (values empty and failed to open data file)

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

Moderators: Developers, Moderators

Post Reply
david78
Posts: 8
Joined: Thu Dec 09, 2021 5:33 am

Problem with my graphs (values empty and failed to open data file)

Post by david78 »

Hi,
I am posting this new post because I can't find the answer to my problems.
In order to set the context, I aim to migrate from an old OpenSuse 11 server to a new OpenSuse 12. We also move from version 0.8.8h to 1.2.17.
I'm contacting you because some files can't be read by Cacti. I have the impression that it cannot write to the rrd file, but also that it cannot create certain files unless I launch the "realtime" plugin. After launching "realtime", the graph is displayed but when I stop it, I have values in "-nan" or I have the following message again : « Failed to open data file, poller may not have run yet. »
So I looked on several forums and the solution that comes up is a concern about rights. I am however in :
wwwrun:wwwrun and 755 on all files. I also tried 777 on files that can't be read by Cacti. Unfortunately, this does not solve the problem.

I also specify that some graphs that are not readable on the new one but are well readable by the old one.
In order to continue and to provide as much information as possible in order to solve the problem, here is an example of rrdtool (first with a file that fails to create) :
RRDtool Command:

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start='-86400' \
--end='-300' \
--pango-markup \
--title='Name modified' \
--slope-mode \
--base=1000 \
--height=120 \
--width=500 \
--tabwidth '30' \
--alt-autoscale-max \
--lower-limit='0' \
COMMENT:"From 2021-12-08 08\:30\:04 To 2021-12-09 08\:25\:04\c" \
COMMENT:" \n" \
--color BACK#F3F3F3 \
--color CANVAS#FDFDFD \
--color SHADEA#CBCBCB \
--color SHADEB#999999 \
--color FONT#000000 \
--color AXIS#2C4D43 \
--color ARROW#2C4D43 \
--color FRAME#2C4D43 \
--border 1 --font TITLE:11:'Arial' \
--font AXIS:8:'Arial' \
--font LEGEND:8:'Courier' \
--font UNIT:8:'Arial' \
--font WATERMARK:6:'Arial' \
--slope-mode \
--watermark 'Generated by Cacti®' \
DEF:a='/CCI/user/rra/number/number.rrd':'ping':AVERAGE \
AREA:a#FFF200FF: \
GPRINT:a:LAST:'%8.2lf %s' \
GPRINT:a:AVERAGE:'%8.2lf %s' \
GPRINT:a:MAX:'%8.2lf %s'
RRDtool Command lengths = 840 charaters.
RRDtool Says:
ERROR: opening '/CCI/user/rra/number/number.rrd': No such file or directory

Second, a file with "-nan" :
RRDtool Command:

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start='1638967200' \
--end='1639053600' \
--pango-markup \
--title='Name modified' \
--vertical-label='label' \
--slope-mode \
--base=1000 \
--height=120 \
--width=600 \
--tabwidth '30' \
--rigid \
--alt-autoscale-max \
--lower-limit='0' \
COMMENT:"From 2021-12-08 12\:40\:00 To 2021-12-09 12\:40\:00\c" \
COMMENT:" \n" \
--color BACK#F3F3F3 \
--color CANVAS#FDFDFD \
--color SHADEA#CBCBCB \
--color SHADEB#999999 \
--color FONT#000000 \
--color AXIS#2C4D43 \
--color ARROW#2C4D43 \
--color FRAME#2C4D43 \
--border 1 --font TITLE:11:'Arial' \
--font AXIS:8:'Arial' \
--font LEGEND:8:'Courier' \
--font UNIT:8:'Arial' \
--font WATERMARK:6:'Arial' \
--slope-mode \
--watermark 'Generated by Cacti®' \
DEF:a='/CCI/user/rra/number/number1.rrd':'traffic_in':AVERAGE \
DEF:b='/CCI/user/rra/number/number1.rrd':'traffic_out':AVERAGE \
DEF:c='/CCI/user/rra/number/number2.rrd':'traffic_in':AVERAGE \
DEF:d='/CCI/user/rra/number/number2.rrd':'traffic_out':AVERAGE \
CDEF:cdefc='a,8,*' \
CDEF:cdefh='b,8,*' \
COMMENT:'Description' \
COMMENT:'Speed\: Mbps\n' \
AREA:cdefc#00CF00FF: \
LINE1:cdefc#00CF00FF:'Inbound\:' \
GPRINT:cdefc:LAST:'Current\:%8.2lf %s' \
GPRINT:a:AVERAGE:'Average\:%8.2lf %s' \
GPRINT:cdefc:MAX:'Maximum\:%8.2lf %s\n' \
AREA:cdefh#002A9733: \
LINE1:cdefh#002A97FF:'Outbound' \
GPRINT:cdefh:LAST:'Current\:%8.2lf %s' \
GPRINT:cdefh:AVERAGE:'Average\:%8.2lf %s' \
GPRINT:cdefh:MAX:'Maximum\:%8.2lf %s\n' \
COMMENT:'Total IN\: 0.00 B\n' \
COMMENT:'Total OUT\: 0.00 B\n'
RRDtool Command lengths = 1559 charaters.
RRDtool Says:
OK

Finally, we use the following versions:
Cacti : 1.2.17
Apache : 2.4.23
PHP : 7.4

Thanks for your help.

(picture in attachments)
Attachments
Realtime.pdf
(97.07 KiB) Downloaded 39 times
No_value.pdf
(123.72 KiB) Downloaded 48 times
Folder_doesnt_exist.pdf
(44.11 KiB) Downloaded 34 times
User avatar
macan
Cacti Guru User
Posts: 1106
Joined: Tue Mar 18, 2008 2:30 am
Location: Czech

Re: Problem with my graphs (values empty and failed to open data file)

Post by macan »

ls -dal /CCI/user/rra/number
ls -al /CCI/user/rra/number/

Any messages in log?
Let the Cacti grow!
david78
Posts: 8
Joined: Thu Dec 09, 2021 5:33 am

Re: Problem with my graphs (values empty and failed to open data file)

Post by david78 »

Sorry for the waiting time !
I don't have message in my log : cacti.log.
I have a message in cacti_stderr.log : PHP Warning: preg_replace(): Allocation of JIT memory failed, PCRE JIT will be disabled. This is likely caused by security restrictions. Either grant PHP permission to allocate executable memory, or set pcre.jit=0 in /CCI/cacti/include/global.php on line 234

Thanks for your help !
david78
Posts: 8
Joined: Thu Dec 09, 2021 5:33 am

Re: Problem with my graphs (values empty and failed to open data file)

Post by david78 »

I solved my last incident (log message with PHP). Now I try to solve this problem : PHP Notice: Undefined variable: poller_id in /CCI/user/cmd.php on line 811

Can you help me , please?

Thanks :)
User avatar
macan
Cacti Guru User
Posts: 1106
Joined: Tue Mar 18, 2008 2:30 am
Location: Czech

Re: Problem with my graphs (values empty and failed to open data file)

Post by macan »

please show file /CCI/user/include/config.php

Have you any restriction in PHP (open_basedir)?
Let the Cacti grow!
david78
Posts: 8
Joined: Thu Dec 09, 2021 5:33 am

Re: Problem with my graphs (values empty and failed to open data file)

Post by david78 »

I don't have restrictions in PHP (open_basedir)
david78
Posts: 8
Joined: Thu Dec 09, 2021 5:33 am

Re: Problem with my graphs (values empty and failed to open data file)

Post by david78 »

What informations on config.php?
User avatar
macan
Cacti Guru User
Posts: 1106
Joined: Tue Mar 18, 2008 2:30 am
Location: Czech

Re: Problem with my graphs (values empty and failed to open data file)

Post by macan »

There must be:
/*
* The poller_id of this system. set to `1` for the main cacti web server.
* Otherwise, you this value should be the poller_id for the remote poller.
*/

$poller_id = 1;
Let the Cacti grow!
david78
Posts: 8
Joined: Thu Dec 09, 2021 5:33 am

Re: Problem with my graphs (values empty and failed to open data file)

Post by david78 »

yes the poller is at 1
User avatar
macan
Cacti Guru User
Posts: 1106
Joined: Tue Mar 18, 2008 2:30 am
Location: Czech

Re: Problem with my graphs (values empty and failed to open data file)

Post by macan »

please try update to 1.2.19
Let the Cacti grow!
david78
Posts: 8
Joined: Thu Dec 09, 2021 5:33 am

Re: Problem with my graphs (values empty and failed to open data file)

Post by david78 »

I try now ! As soon as it is done, I will let you know.
david78
Posts: 8
Joined: Thu Dec 09, 2021 5:33 am

Re: Problem with my graphs (values empty and failed to open data file)

Post by david78 »

It is impossible to update Cacti, I tried in files apart in "zypper" mode but it does not work. I don't use Spine. Could Spine fix the problem? I tried to program it but it doesn't work.

Thanks for your help
User avatar
macan
Cacti Guru User
Posts: 1106
Joined: Tue Mar 18, 2008 2:30 am
Location: Czech

Re: Problem with my graphs (values empty and failed to open data file)

Post by macan »

Let the Cacti grow!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest