icingaweb2-module-grafana
icingaweb2-module-grafana copied to clipboard
icingaweb - grafana, Dependencies Unmet dependencies found
Describe the bug
is it possible that icingadb with grafana , without module monitoring, is not yet fully supported ? When I disable the monitoring module to work fully under icingadb I get the error in the module grafana:
Dependencies Unmet dependencies found! Module can't be enabled unless all dependencies are met. Modules monitoring * (2.11.1, disabled)
but I do see the graphs.
This is the message cli
icingacli module enable grafana
Enabling module "grafana" although it has unmet dependencies
When is the monitoring module back activated the message is gone.
Expected behavior
that there are no errors/warnings in the module grafana when i activate it.
To Reproduce
activate grafana module when monitoring module is disabled
Your Environment
- Icinga Web 2 version and modules (System - About):
Icinga Web 2 Version 2.11.1 Git commit eecf8d9934cbf30ec063cea4a525b26bfd2bf99a PHP Version 7.3.29 Git commit date 2022-07-06 Get Icinga Support Icinga Community Report a bug Icinga Documentation Loaded Libraries icinga/icinga-php-library 0.9.1 icinga/icinga-php-thirdparty 0.11.0 Loaded Modules icingadb 1.0.0 Configure monitoring 2.11.1 Configure
-
Web browser used: Chrome
-
Icinga 2 version used (
icinga2 --version
):
icinga2 - The Icinga 2 network monitoring daemon (version: r2.13.4-1)
Copyright (c) 2012-2022 Icinga GmbH (https://icinga.com/) License GPLv2+: GNU GPL version 2 or later https://gnu.org/licenses/gpl2.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
System information: Platform: Red Hat Enterprise Linux Server Platform version: 7.9 (Maipo) Kernel: Linux Kernel version: 3.10.0-1160.59.1.el7.x86_64 Architecture: x86_64
Build information: Compiler: GNU 11.2.1 Build host: runner-hh8q3bz2-project-322-concurrent-0 OpenSSL version: OpenSSL 1.0.2k-fips 26 Jan 2017
-
PHP version used (
php --version
): PHP 7.3.29 (cli) (built: Jul 1 2021 09:50:42) ( NTS ) -
Server operating system and version: Red Hat Enterprise Linux Server release 7.9 (Maipo)
should work with #288
Hi,
I have done recently a new icinga installation with both backends enabled: Monitoring and ICINGA DB. I am using the Grafana module 1.4.3. When I disable the Monitoring module, Grafana is still working. But, when I would like to change the time in grafana, e.g. to display only the graph for the last 5 minutes, I receive the error message:
Page not found. Enabling the "monitoring" module might help!
When I enable the monitoring module, it works again. But I would like to keep the monitoring module disabled.
Thanks in advance.
@jeff8688 hi, I was just solving same issue > try to check library/Grafana/ProvidedHook/Grapher.php
and edit this part:
public function getPreviewHtml(MonitoredObject $object, $report = false)
{
$this->object = $object;
// enable_perfdata = true ? || disablevar == true
if (!$this->object->process_perfdata || (( isset($this->object->customvars[$this->custvardisable]) && json_decode(strtolower($this->object->customvars[$this->custvardisable])) !== false)) ) {
return '';
}
if ($this->object instanceof Host) {
$this->cacheTime = $this->object->host_next_check - $this->object->host_last_check;
$serviceName = $this->object->check_command;
$hostName = $this->object->host_name;
$parameters = array(
'name' => $this->object->host_name,
);
$link = 'icingadb/host';
} elseif ($this->object instanceof Service) {
$this->cacheTime = $this->object->service_next_check - $this->object->service_last_check;
$serviceName = $this->object->service_description;
$hostName = $this->object->host->getName();
$parameters = array(
'host.name' => $this->object->host->getName(),
'name' => $this->object->service_description,
);
$link = 'icingadb/service';
}
focus to "$parameters" and "$link" variables ... ;)
@BorisTrnka Excellent, I have applied your changes and it works now. Just one more question please: I am using grafana access "iframe" and it works, but I cannot get indirect proxy mode working. I receive curl timeout. Is indirect proxy mode working for you? Just want to figure out if my indirect proxy config is wrong or if my problem is due to incompatibility. Thanks.
@jeff8688 I haven't spent much time to make the "indirect proxy" to work as "iframe" works fine ...
This version of the module is not made for icingadb, wait for 2.0.0