-
-
Notifications
You must be signed in to change notification settings - Fork 405
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add additional information to help when creating graphs from templates #4516
Comments
I'm marking this as confirmed, but the source of the problem is likely user error. Check the renaming of the issue for more clues. |
Unable to create Graphs due to one of the following Data Query Issues: permissions, incorrectly formatted, or missing XML file
Give users some clue as to the source of the issue.
I have updated the error message to help in diagnosis. |
Still didnt make any difference, updating the new graphs_new.php file 30-12-2021 20:39:33 - CMDPHP PHP ERROR WARNING Backtrace: (/graphs_new.php[68]:graphs(), /graphs_new.php[778]:CactiErrorHandler()) |
Note, the existing graphs are working fine, its only when new ones to create, ive checked permissions and nothing has changed |
Hmm, okay. |
Okay, that's quite odd. For the host in question, can you please verify the XML files for each Data Query and make sure that the XML file has valid syntax and is readable. Below is an example where you will find "fields". Every XML file should have it and in your case, there is one Data Query where either the XML file is not correct, or is missing that data. I can add more 'debug' to more closely isolate the specific data query also. |
This will trigger an error message when a problem with the XML files is seen.
I updated the graphs_new.php to throw an error and let you know which data query has a bad or missing XML file. Please apply and report back. |
ok , what you did is good, keep that debug modification, now it pops up an error Sorry, we could not process your last action. |
question is whats the reason for the error.. i just tried the same template in 0.8 cacti and it works fine, can it give anymore details why its erroring the parsing ? |
I turned on debug for the individual nas device and now i see errors like this, when i re-index the device 31-12-2021 11:59:16 - ERROR PHP NOTICE: Undefined index: fields in file: /usr/share/cacti/lib/data_query.php on line: 2273 |
Upload the device template and xml file. |
So, to be clear, you will upload >= 2 XML files. |
Here they are: cacti_host_template_synology_nas.txt = is the main template these sit in /cacti/resource/snmp_queries synology_disk_temp.txt |
Worked fine for me. You have placed the wrong file into the |
There appear to be other issues. I'm going a little further down the rabbit hole. |
I guess we should disable the "checkboxes" when this problem is encountered. |
Going to make another commit to help users when they encounter these basket of issues. |
This message will prevent a users from attempting to create a Graph for a Data Query that has not been finished, or is broken.
Okay, think this is good enough now. Closing. |
Hi Witness, In the path <path_cacti>/resource/snmp_queries/ I have both files synology_disk_temp.xml and synology_snmp_diskid.xml , I just renamed the above to .txt so I can upload the files. The screenshot above of yours is the same as mine. With your setup how many disks are you graphing ? I still can't get it to work but 0.8 works fine same setup. |
Not sure how it works in that your device template export did not include all the components. Did you export from 0.8.x or did you export from 1.x? Also, your file |
@alcatron, FYI. I've added the Synology NAS (my version with two of your Templates) to the 1.2.20 release. You should look for it. |
Im Running some custom graphs to monitor hard drive temperature on synology NAS device which worked fine in 1.2.17... now when i want to add additional disk temperature graphs in 1.2.19 i am seeing this error..
This happens when clicking on "Create" graphs button. Some bug i suppose in graphs_new.php ?
`
26-12-2021 14:27:23 - CMDPHP PHP ERROR WARNING Backtrace: (/graphs_new.php[68]:graphs(), /graphs_new.php[778]:CactiErrorHandler())
26-12-2021 14:27:23 - ERROR PHP WARNING: Invalid argument supplied for foreach() in file: /usr/share/cacti/graphs_new.php on line: 778
26-12-2021 14:27:23 - CMDPHP PHP ERROR NOTICE Backtrace: (/graphs_new.php[68]:graphs(), /graphs_new.php[778]:CactiErrorHandler())
26-12-2021 14:27:23 - ERROR PHP NOTICE: Undefined index: fields in file: /usr/share/cacti/graphs_new.php on line: 778
26-12-2021 14:27:23 - CMDPHP PHP ERROR WARNING Backtrace: (/graphs_new.php[68]:graphs(), /graphs_new.php[625]:CactiErrorHandler())
26-12-2021 14:27:23 - ERROR PHP WARNING: Invalid argument supplied for foreach() in file: /usr/share/cacti/graphs_new.php on line: 625
26-12-2021 14:27:23 - CMDPHP PHP ERROR NOTICE Backtrace: (/graphs_new.php[68]:graphs(), /graphs_new.php[625]:CactiErrorHandler())
26-12-2021 14:27:23 - ERROR PHP NOTICE: Undefined index: fields in file: /usr/share/cacti/graphs_new.php on line: 625
`
The text was updated successfully, but these errors were encountered: