Skip to content
This repository was archived by the owner on Jan 15, 2025. It is now read-only.
This repository was archived by the owner on Jan 15, 2025. It is now read-only.

v2.0.3 - Grafana Graph sould be in the graph section in icingadb-web class #330

@stevie-sy

Description

@stevie-sy

While talking with some icingaweb-devs about icingadb at OSMC we recoginzed, that the graph is not set into the correct section in the detail view - like defined in this class BaseExtensionHook.php. That would be the graph section.
If I understand and remember correctly the info correctly the graph is always in the "OUTPUT_SECTION".

So putting this code

protected function init()
    {
       $this->setSection(self::GRAPH_SECTION);
    }

into ServiceDetailExtension.php should usally help to be "compatible" with the icingadb-web class definitions.

I tried this, but with this I get some follow up erros.

  1. There is no graph at host objects
  2. At service objects we get this error:
    ErrorException in /usr/share/icingaweb2/modules/grafana/library/Grafana/ProvidedHook/Icingadb/IcingaDbGrapher.php:463 with message: Undefined property: Icinga\Module\Grafana\ProvidedHook\Icingadb\ServiceDetailExtension::$permission

I could located this possible errors in IcingaDbGrapher.php:

  • $permission is not declared as protected variable at the class with the other variable definitions
  • I only use the class Icinga\Module\Icingadb\Common\Auth;
  • After that, I changed $this->permission-> into $this->getAuth()->

Now the graph for the host object will be showed again. But there is no graph for a service object and also no error message which could indicate another error.

If you could point me in the right direction, I could also create a merge request for all of this what I found out.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions