Hello,
i’m ebedding librenms graphs into an own dashboard, this is done using the settions (allow_unauth_graphs / allow_unauth_graphs_cidr).
It looks like, that since this commit (https://github.com/librenms/librenms/commit/bb39b4ad83f7348a9b51d8cab998f5923ddcfb2f )
the function to allow unauthenticated graphs is not working any more.
I only get an error picture (port*bits) in red font color.
My librenms version is: 21.4.0-59-gbb39b4a - Mon May 03 2021 16:48:15 GMT+0200
Have the same exact problem aswell. the config doesnt work anymore
see my thread too
====================================
Component
Version
LibreNMS
21.4.0-59-gbb39b4ad8
DB Schema
2021_04_08_151101_add_foreign_keys_to_port_group_port_table (208)
PHP
7.4.15
Python
3.6.8
MySQL
10.3.27-MariaDB
RRDTool
1.4.8
SNMP
NET-SNMP 5.7.2
====================================
[OK] Composer Version: 2.0.13
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database schema correct
Have tried following
$config[‘allow_unauth_graphs’] = …
my workaround is:
— includes/html/graphs/graph.inc.php.orig 2021-05-04 11:40:16.309302592 +0200
+++ includes/html/graphs/graph.inc.php 2021-05-04 12:12:25.928765481 +0200
@@ -31,7 +31,7 @@
$graph_image_type = $vars[‘graph_type’] ?? Config::get(‘webui.graph_type’);
$rrd_options = ‘’;
-$auth = false;
+//$auth = false;
require Config::get(‘install_dir’) . “/includes/html/graphs/$type/auth.inc.php”;
I have just submitted a PR which should fix this:
librenms:master
← nightcore500:fix-allow_unauth_graphs
opened 10:33AM - 04 May 21 UTC
This patch fixes the functionality of the setting "allow_unauth_graphs" which do… es not work anymore since the "Rrd graph optimizations" patch. The variable $auth is already set in html/graph.php when the setting "allow_unauth_graphs" is set. But this variable gets overwritten in includes/html/graphs/graph.inc.php. With this patch the variable $auth is initialized in html/graph.php before checking if the user is allowed to view the graph.
DO NOT DELETE THE UNDERLYING TEXT
#### Please note
> Please read this information carefully. You can run `./lnms dev:check` to check your code before submitting.
- [x] Have you followed our [code guidelines?](https://docs.librenms.org/Developing/Code-Guidelines/)
- [ ] If my Pull Request does some changes/fixes/enhancements in the WebUI, I have inserted a screenshot of it.
#### Testers
If you would like to test this pull request then please run: `./scripts/github-apply <pr_id>`, i.e `./scripts/github-apply 5926`
After you are done testing, you can remove the changes with `./scripts/github-remove`. If there are schema changes, you can ask on discord how to revert.
2 Likes
im having the same thing…have been rumbling my head around this over and over…kindly let us know when the PR is going to get merged into the daily update.
thanks a lot
The PR was already merged on the same day.
i did run ./daily.sh on my installation and took the latest version of the code from the master branch.
but i still have empty graphs on my emails (ive done all the steps , like adding on the config the unathorized_graph=true; but it still empty on my mail as per the attached photo:
today is showing like Error Drawing Graph: Error : opening `` : no such file or directory (yesterday was completely empty only port*bits)
system
Closed
7 November 2021 21:02
#8
This topic was automatically closed 186 days after the last reply. New replies are no longer allowed.