Cacti 1.2.10 - Script query - Empty graph - DS Last OK but still showing NaN

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
nerodeny
Posts: 6
Joined: Tue Mar 07, 2023 5:16 pm
Location: Paris

Cacti 1.2.10 - Script query - Empty graph - DS Last OK but still showing NaN

Post by nerodeny »

Hello everybody hope you're fine,

I am using CACTI from years, thanks for every contributors it is the better tool I used for interfacing PBX systems.

I am facing an issue with a new dev, I created a script to output the usage of a specific process who is critical for VOIP usage.

I already did different perl script without issue but this time I followed the HowTo who is really detailled and I did it via PHP.
No problem to attempt my goal and the script provide the right output.

I was surprised to see that my graph doesn't show any line or value.
Even if I see on the rrd the LAST value and I can see on the log the output is correct. When I check the rrd file I can see several NaN value.

I tried to change the MAX value to U who was fixed to 100, because the output is in percentage. I changed the Data Source Profile from 1 mn to 5 mn.

You can see below some output. RRD file and poller output.


vmcacti@vmcacti-serveur:/opt/cacti/rra$ rrdtool info /opt/cacti/rra/pilote_ip_csm_cpu_iplink_504.rrd
filename = "/opt/cacti/rra/pilote_ip_csm_cpu_iplink_504.rrd"
rrd_version = "0003"
step = 60
last_update = 1678226282
header_size = 3704
ds[CPU_iplink].index = 0
ds[CPU_iplink].type = "COUNTER"
ds[CPU_iplink].minimal_heartbeat = 300
ds[CPU_iplink].min = 0,0000000000e+00
ds[CPU_iplink].max = NaN
ds[CPU_iplink].last_ds = "0.2"
ds[CPU_iplink].value = NaN
ds[CPU_iplink].unknown_sec = 2
rra[0].cf = "AVERAGE"
rra[0].rows = 43240
rra[0].cur_row = 34325
rra[0].pdp_per_row = 1
rra[0].xff = 5,0000000000e-01
rra[0].cdp_prep[0].value = NaN
rra[0].cdp_prep[0].unknown_datapoints = 0
rra[1].cf = "AVERAGE"
rra[1].rows = 8648
rra[1].cur_row = 38
rra[1].pdp_per_row = 5
rra[1].xff = 5,0000000000e-01
rra[1].cdp_prep[0].value = 0,0000000000e+00
rra[1].cdp_prep[0].unknown_datapoints = 3
rra[2].cf = "AVERAGE"
rra[2].rows = 6000
rra[2].cur_row = 4721
rra[2].pdp_per_row = 15
rra[2].xff = 5,0000000000e-01
rra[2].cdp_prep[0].value = 0,0000000000e+00
rra[2].cdp_prep[0].unknown_datapoints = 13
rra[3].cf = "AVERAGE"
rra[3].rows = 17520
rra[3].cur_row = 14840
rra[3].pdp_per_row = 60
rra[3].xff = 5,0000000000e-01
rra[3].cdp_prep[0].value = 0,0000000000e+00
rra[3].cdp_prep[0].unknown_datapoints = 58
rra[4].cf = "MIN"
rra[4].rows = 43240
rra[4].cur_row = 13910
rra[4].pdp_per_row = 1
rra[4].xff = 5,0000000000e-01
rra[4].cdp_prep[0].value = NaN
rra[4].cdp_prep[0].unknown_datapoints = 0
rra[5].cf = "MIN"
rra[5].rows = 8648
rra[5].cur_row = 4700
rra[5].pdp_per_row = 5
rra[5].xff = 5,0000000000e-01
rra[5].cdp_prep[0].value = inf
rra[5].cdp_prep[0].unknown_datapoints = 3
rra[6].cf = "MIN"
rra[6].rows = 6000
rra[6].cur_row = 1884
rra[6].pdp_per_row = 15
rra[6].xff = 5,0000000000e-01
rra[6].cdp_prep[0].value = inf
rra[6].cdp_prep[0].unknown_datapoints = 13
rra[7].cf = "MIN"
rra[7].rows = 17520
rra[7].cur_row = 7168
rra[7].pdp_per_row = 60
rra[7].xff = 5,0000000000e-01
rra[7].cdp_prep[0].value = inf
rra[7].cdp_prep[0].unknown_datapoints = 58
rra[8].cf = "MAX"



2023/03/07 23:24:07 - POLLER: Poller[1] Device[2] DS[505] CMD: /usr/bin/php -q /opt/cacti/scripts/query_pabx_iplink.php 'get' 'PBX' '10.127.255.10' 'Memory' '2', output: 0.2
2023/03/07 23:24:04 - POLLER: Poller[1] Device[2] DS[504] CMD: /usr/bin/php -q /opt/cacti/scripts/query_pabx_iplink.php 'get' 'PBX' '10.127.255.10' 'Memory' '1', output: 0.2
nerodeny
Posts: 6
Joined: Tue Mar 07, 2023 5:16 pm
Location: Paris

Re: Cacti 1.2.10 - Script query - Empty graph - DS Last OK but still showing NaN

Post by nerodeny »

You can see that everything seems to be OK
Attachments
Data Source Troubleshooter
Data Source Troubleshooter
MicrosoftTeams-image (7).png (53.89 KiB) Viewed 490 times
nerodeny
Posts: 6
Joined: Tue Mar 07, 2023 5:16 pm
Location: Paris

Re: Cacti 1.2.10 - Script query - Empty graph - DS Last OK but still showing NaN

Post by nerodeny »

As you can see the graph is empty as the rrd doesnt contain valid value
Attachments
CACTI - Processus Empty graph
CACTI - Processus Empty graph
MicrosoftTeams-image (8).png (23.23 KiB) Viewed 489 times
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: Cacti 1.2.10 - Script query - Empty graph - DS Last OK but still showing NaN

Post by TheWitness »

Post the "SYSTEM STATS:" from your Cacti log.
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?
nerodeny
Posts: 6
Joined: Tue Mar 07, 2023 5:16 pm
Location: Paris

Re: Cacti 1.2.10 - Script query - Empty graph - DS Last OK but still showing NaN

Post by nerodeny »

Hello,

Here is the sysstat:

2023/03/08 08:54:13 - SYSTEM STATS: Time:11.5347 Method:cmd.php Processes:1 Threads:0 Hosts:14 HostsPerProcess:14 DataSources:434 RRDsProcessed:254
2023/03/08 08:53:09 - SYSTEM STATS: Time:7.4243 Method:cmd.php Processes:1 Threads:0 Hosts:14 HostsPerProcess:14 DataSources:233 RRDsProcessed:65
2023/03/08 08:52:09 - SYSTEM STATS: Time:7.4254 Method:cmd.php Processes:1 Threads:0 Hosts:14 HostsPerProcess:14 DataSources:234 RRDsProcessed:65
2023/03/08 08:51:09 - SYSTEM STATS: Time:7.4279 Method:cmd.php Processes:1 Threads:0 Hosts:14 HostsPerProcess:14 DataSources:234 RRDsProcessed:66
2023/03/08 08:50:09 - SYSTEM STATS: Time:7.4262 Method:cmd.php Processes:1 Threads:0 Hosts:14 HostsPerProcess:14 DataSources:233 RRDsProcessed:65
2023/03/08 08:49:13 - SYSTEM STATS: Time:11.4887 Method:cmd.php Processes:1 Threads:0 Hosts:14 HostsPerProcess:14 DataSources:434 RRDsProcessed:254
2023/03/08 08:48:09 - SYSTEM STATS: Time:7.4231 Method:cmd.php Processes:1 Threads:0 Hosts:14 HostsPerProcess:14 DataSources:233 RRDsProcessed:65
2023/03/08 08:47:09 - SYSTEM STATS: Time:7.4227 Method:cmd.php Processes:1 Threads:0 Hosts:14 HostsPerProcess:14 DataSources:234 RRDsProcessed:65
2023/03/08 08:46:10 - SYSTEM STATS: Time:8.4296 Method:cmd.php Processes:1 Threads:0 Hosts:14 HostsPerProcess:14 DataSources:234 RRDsProcessed:66
2023/03/08 08:45:08 - SYSTEM STATS: Time:7.4159 Method:cmd.php Processes:1 Threads:0 Hosts:14 HostsPerProcess:14 DataSources:233 RRDsProcessed:65
2023/03/08 08:44:12 - SYSTEM STATS: Time:11.4889 Method:cmd.php Processes:1 Threads:0 Hosts:14 HostsPerProcess:14 DataSources:434 RRDsProcessed:254
2023/03/08 08:43:08 - SYSTEM STATS: Time:7.4147 Method:cmd.php Processes:1 Threads:0 Hosts:14 HostsPerProcess:14 DataSources:233 RRDsProcessed:65
2023/03/08 08:42:08 - SYSTEM STATS: Time:7.4252 Method:cmd.php Processes:1 Threads:0 Hosts:14 HostsPerProcess:14 DataSources:234 RRDsProcessed:65
2023/03/08 08:41:09 - SYSTEM STATS: Time:8.4228 Method:cmd.php Processes:1 Threads:0 Hosts:14 HostsPerProcess:14 DataSources:234 RRDsProcessed:66
2023/03/08 08:40:08 - SYSTEM STATS: Time:7.4227 Method:cmd.php Processes:1 Threads:0 Hosts:14 HostsPerProcess:14 DataSources:233 RRDsProcessed:65
2023/03/08 08:39:12 - SYSTEM STATS: Time:11.4994 Method:cmd.php Processes:1 Threads:0 Hosts:14 HostsPerProcess:14 DataSources:434 RRDsProcessed:254
2023/03/08 08:38:08 - SYSTEM STATS: Time:7.4206 Method:cmd.php Processes:1 Threads:0 Hosts:14 HostsPerProcess:14 DataSources:233 RRDsProcessed:65
2023/03/08 08:37:08 - SYSTEM STATS: Time:7.4141 Method:cmd.php Processes:1 Threads:0 Hosts:14 HostsPerProcess:14 DataSources:234 RRDsProcessed:65
2023/03/08 08:36:08 - SYSTEM STATS: Time:7.4174 Method:cmd.php Processes:1 Threads:0 Hosts:14 HostsPerProcess:14 DataSources:234 RRDsProcessed:66
2023/03/08 08:35:08 - SYSTEM STATS: Time:7.4259 Method:cmd.php Processes:1 Threads:0 Hosts:14 HostsPerProcess:14 DataSources:233 RRDsProcessed:65
2023/03/08 08:34:13 - SYSTEM STATS: Time:11.5426 Method:cmd.php Processes:1 Threads:0 Hosts:14 HostsPerProcess:14 DataSources:434 RRDsProcessed:254
2023/03/08 08:33:09 - SYSTEM STATS: Time:7.4236 Method:cmd.php Processes:1 Threads:0 Hosts:14 HostsPerProcess:14 DataSources:233 RRDsProcessed:65
2023/03/08 08:32:09 - SYSTEM STATS: Time:7.4278 Method:cmd.php Processes:1 Threads:0 Hosts:14 HostsPerProcess:14 DataSources:234 RRDsProcessed:65
2023/03/08 08:31:09 - SYSTEM STATS: Time:7.4251 Method:cmd.php Processes:1 Threads:0 Hosts:14 HostsPerProcess:14 DataSources:234 RRDsProcessed:66
2023/03/08 08:30:09 - SYSTEM STATS: Time:7.4276 Method:cmd.php Processes:1 Threads:0 Hosts:14 HostsPerProcess:14 DataSources:233 RRDsProcessed:65
2023/03/08 08:29:13 - SYSTEM STATS: Time:11.4763 Method:cmd.php Processes:1 Threads:0 Hosts:14 HostsPerProcess:14 DataSources:434 RRDsProcessed:254
2023/03/08 08:28:09 - SYSTEM STATS: Time:7.4238 Method:cmd.php Processes:1 Threads:0 Hosts:14 HostsPerProcess:14 DataSources:233 RRDsProcessed:65
2023/03/08 08:27:09 - SYSTEM STATS: Time:7.4214 Method:cmd.php Processes:1 Threads:0 Hosts:14 HostsPerProcess:14 DataSources:234 RRDsProcessed:65
2023/03/08 08:26:09 - SYSTEM STATS: Time:7.4280 Method:cmd.php Processes:1 Threads:0 Hosts:14 HostsPerProcess:14 DataSources:234 RRDsProcessed:66
2023/03/08 08:25:09 - SYSTEM STATS: Time:7.4157 Method:cmd.php Processes:1 Threads:0 Hosts:14 HostsPerProcess:14 DataSources:233 RRDsProcessed:65
2023/03/08 08:24:13 - SYSTEM STATS: Time:11.4781 Method:cmd.php Processes:1 Threads:0 Hosts:14 HostsPerProcess:14 DataSources:434 RRDsProcessed:254
2023/03/08 08:23:09 - SYSTEM STATS: Time:7.4249 Method:cmd.php Processes:1 Threads:0 Hosts:14 HostsPerProcess:14 DataSources:233 RRDsProcessed:65
2023/03/08 08:22:09 - SYSTEM STATS: Time:7.4237 Method:cmd.php Processes:1 Threads:0 Hosts:14 HostsPerProcess:14 DataSources:234 RRDsProcessed:65
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: Cacti 1.2.10 - Script query - Empty graph - DS Last OK but still showing NaN

Post by TheWitness »

Let's finish the conversation on GitHub.
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?
nerodeny
Posts: 6
Joined: Tue Mar 07, 2023 5:16 pm
Location: Paris

Re: Cacti 1.2.10 - Script query - Empty graph - DS Last OK but still showing NaN

Post by nerodeny »

Ok, how ?
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: Cacti 1.2.10 - Script query - Empty graph - DS Last OK but still showing NaN

Post by TheWitness »

So, I see that the step is 60 on the RRDfile, but it appears your poller interval is 5 minutes. Switch the poller interval to 1 minute, and then repopulate the poller cache.
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?
nerodeny
Posts: 6
Joined: Tue Mar 07, 2023 5:16 pm
Location: Paris

Re: Cacti 1.2.10 - Script query - Empty graph - DS Last OK but still showing NaN

Post by nerodeny »

THank you,

firstly I did it with 1 mn interval but as it doesnt work I change it to 5 mn.

But it doesn't work in the both cases.

Regards,
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: Cacti 1.2.10 - Script query - Empty graph - DS Last OK but still showing NaN

Post by TheWitness »

Well, 5 minutes is definitely wrong. If you switch the Poller Interval to 5 minutes, you lowest data source profile must also be 5 minutes. If that's what you want to run with, you can update your Data Templates and Data Sources to 5 minutes, but then, you also need to delete ALL the RRDfiles, and repopulate the poller cache. Sounds like you are beginner, so go for it.
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?
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests