Unable to add iDirect NMS Graph

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

Moderators: Developers, Moderators

Atochi
Posts: 39
Joined: Fri Dec 08, 2023 10:17 am

Re: Unable to add iDirect NMS Graph

Post by Atochi »

Hello TheWitness,

Please were you able to add idirect graph?

If not, what is the error message you are getting?
User avatar
Osiris
Cacti Guru User
Posts: 1424
Joined: Mon Jan 05, 2015 10:10 am

Re: Unable to add iDirect NMS Graph

Post by Osiris »

Did you update lib/data_query.php from the 1.2.x branch yet? I don't think so.
Before history, there was a paradise, now dust.
User avatar
Osiris
Cacti Guru User
Posts: 1424
Joined: Mon Jan 05, 2015 10:10 am

Re: Unable to add iDirect NMS Graph

Post by Osiris »

Record a screen2gif of how you add the graph too.
Before history, there was a paradise, now dust.
Atochi
Posts: 39
Joined: Fri Dec 08, 2023 10:17 am

Re: Unable to add iDirect NMS Graph

Post by Atochi »

Hello Osiris,

Yes I did. This was a recent installation(this month).

See the code I used.

git clone -b 1.2.x https://github.com/Cacti/cacti.git
Atochi
Posts: 39
Joined: Fri Dec 08, 2023 10:17 am

Re: Unable to add iDirect NMS Graph

Post by Atochi »

Hello Osiris,

I am getting the error below if I am attaching gif as requested
error.png
error.png (69.73 KiB) Viewed 1278 times
Atochi
Posts: 39
Joined: Fri Dec 08, 2023 10:17 am

Re: Unable to add iDirect NMS Graph

Post by Atochi »

I just took a screenshot, see below it will remain like this forever until I press cancel
idirectgragh.png
idirectgragh.png (78.02 KiB) Viewed 1278 times
User avatar
Osiris
Cacti Guru User
Posts: 1424
Joined: Mon Jan 05, 2015 10:10 am

Re: Unable to add iDirect NMS Graph

Post by Osiris »

Post the lines from lib/data-query where the issue occurs. Screen shot from vim
Before history, there was a paradise, now dust.
Atochi
Posts: 39
Joined: Fri Dec 08, 2023 10:17 am

Re: Unable to add iDirect NMS Graph

Post by Atochi »

We have Line 106, 834 and 2383. Also attached the whole data_query.php file
834.png
834.png (49.78 KiB) Viewed 1225 times
2383.png
2383.png (43.44 KiB) Viewed 1225 times
106.png
106.png (57.23 KiB) Viewed 1225 times
Attachments
data_query.txt
(95.7 KiB) Downloaded 75 times
Atochi
Posts: 39
Joined: Fri Dec 08, 2023 10:17 am

Re: Unable to add iDirect NMS Graph

Post by Atochi »

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

Re: Unable to add iDirect NMS Graph

Post by TheWitness »

You are using an old lib/data_query.php. I just looked at the file that you uploaded and it's out of date. I've attached a screen shot showing what those lines should look like.
Attachments
LibDataQuery.png
LibDataQuery.png (38.85 KiB) Viewed 1173 times
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?
Atochi
Posts: 39
Joined: Fri Dec 08, 2023 10:17 am

Re: Unable to add iDirect NMS Graph

Post by Atochi »

Hello

Please share the whole file with me. what about the other lines (106, 834), are they same with your?

Please assist by sharing the whole file with me or share the link to where to download it.

See the link from github: https://github.com/Cacti/cacti/blob/rel ... _query.php

it is the same with mine.

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

Re: Unable to add iDirect NMS Graph

Post by TheWitness »

That's the released version, which is static. The version you wanted to pull is the 1.2.x branch. You can find it here:

https://github.com/Cacti/cacti/blob/1.2 ... _query.php
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?
Atochi
Posts: 39
Joined: Fri Dec 08, 2023 10:17 am

Re: Unable to add iDirect NMS Graph

Post by Atochi »

Hello Thewitness,

This is noted. I will install a new one using the URL you shared and revert.

Thank you so much for your help.
Atochi
Posts: 39
Joined: Fri Dec 08, 2023 10:17 am

Re: Unable to add iDirect NMS Graph

Post by Atochi »

Hello TheWitness,

Please how do I clone 1.2.x branch with the latest commit

I have tried the below commands and it is giving me the old files

git clone -b 1.2.x --single-branch https://github.com/Cacti/cacti/
git clone -b 1.2.x https://github.com/Cacti/cacti/
Atochi
Posts: 39
Joined: Fri Dec 08, 2023 10:17 am

Re: Unable to add iDirect NMS Graph

Post by Atochi »

Hello

Done. See below the current error. Currently running php8.2 and cacti 1.2.26

2023-12-23 15:53:57 - CMDPHP PHP ERROR Backtrace: (CactiShutdownHandler())
2023-12-23 15:53:57 - ERROR PHP ERROR: Uncaught TypeError: Cannot access offset of type string on string in /var/www/html/cacti/lib/data_query.php:985 Stack trace: #0 /var/www/html/cacti/lib/data_query.php(106): query_snmp_host() #1 /var/www/html/cacti/lib/api_device.php(1289): run_data_query() #2 /var/www/html/cacti/lib/api_device.php(1131): api_device_update_host_template() #3 /var/www/html/cacti/host.php(273): api_device_save() #4 /var/www/html/cacti/host.php(62): form_save() #5 {main} thrown in file: /var/www/html/cacti/lib/data_query.php on line: 985

line 2382
Screenshot 2023-12-23 160058.png
Screenshot 2023-12-23 160058.png (78.79 KiB) Viewed 1115 times
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests