Skip to content
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

Uncaught ArgumentCountError: array_merge() does not accept unknown named parameters in /usr/local/www/icingaweb2/modules/grafana/library/Grafana/Helpers/Timeranges.php:137 #310

Open
gettoknowmii opened this issue Mar 22, 2023 · 5 comments

Comments

@gettoknowmii
Copy link

Expected Behavior

Login to icingaweb > modules > grafana > configuration > should allow me to configure grafana settings

Current Behavior

Login to icingaweb > modules > grafana > configuration > produces the above error

Possible Solution

Php code need to be changed

Steps to Reproduce (for bugs)

install and configure icinga and icingaweb2 on a FreeBSD server. try to configure the grafana module

Context

i am unable to display grafana graphs in icinga

Your Environment

FreeBSD 13.1
icingaweb2-php81-2.11.4_1
icingaweb2-module-grafana-php81-1.4.2_1
icinga2-2.13.6
Icinga Web 2 Version | 2.11.4
PHP Version: 8.1.15

@Mikesch-mp
Copy link
Owner

Mikesch-mp commented Mar 23, 2023

Is this a new installation or did you update the module with an existing configuration?
Is this with IcingaDB or still old IDO Backend?

@gettoknowmii
Copy link
Author

This is a new installation. It is also with the old IDO. I don't have icingaDB - icinga writes data to influxdb which is a use as a data source on grafana to create graphs thats I want to display in icinga.

I'm using PostgreSQL for my icinga installation

@Mikesch-mp
Copy link
Owner

Mikesch-mp commented Apr 5, 2023

i need more time (which i dont have at the moment) to do an release with a fix.
This is untested but should fix your problem. Edit /usr/share/icingaweb2/modules/grafana/library/Grafana/Helpers/Timeranges.phpand change line 137 from

        return call_user_func_array('array_merge', self::$timeRanges);

to

        return call_user_func_array('array_merge', array_values(self::$timeRanges));

@gettoknowmii
Copy link
Author

that fixed my issue. Thanks

@n3k232
Copy link

n3k232 commented Jun 21, 2023

Yep, this fixed it for us

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants