Graphite module show no config in icingaweb2

Hi,

I’m new to icinga2, had icinga-classic and I liked it. But I am trying to move on with a testing installation at home.

Monitoring hosts and check_by_ssh(by_ssh) works. But graphite isn’t working.
I tried graphite first, but decided to try grafana instead. Now I switched back to graphite hopping it is less frustrating.
One issue seems to be, that graphite-web is missing from debian-bullseye. graphite-web - Debian Package Tracker I installed graphite-web via pip.
Another issue is that renabling module graphite failed. Installed it form git.

But still no graphs… but module-errors.


Bash $>icingacli module enable graphite
ERROR: Icinga\Exception\ConfigurationError in /usr/share/php/Icinga/Application/Modules/Manager.php:248 with message: Cannot enable module "graphite". Module is not installed.


Bash $>cat /etc/os-release  | grep VERSION
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye

Bash $>ICINGAWEB_MODULEPATH="/usr/share/icingaweb2/modules"
Bash $>REPO_URL="https://github.com/Icinga/icingaweb2-module-graphite"
Bash $>TARGET_DIR="${ICINGAWEB_MODULEPATH}/graphite"
Bash $>git clone "${REPO_URL}" "${TARGET_DIR}"
Bash $>icingacli module enable graphite


Now I am stuck with the error message:
“Cloud not resolve host:icingaweb2”
and the error “Offset:1” from graphite module.

Bildschirmfoto vom 2022-08-11 17-49-00

Undefined offset: 1

#0 /usr/share/php/Icinga/Application/Modules/Module.php(891): Icinga\Application\ApplicationBootstrap->Icinga\Application\{closure}()
#1 /usr/share/php/Icinga/Application/Modules/Module.php(841): Icinga\Application\Modules\Module->metadata()
#2 /usr/share/icingaweb2/application/views/scripts/config/module.phtml(9): Icinga\Application\Modules\Module->getDependencies()
#3 /usr/share/php/Icinga/Web/View.php(248): include(String)
#4 /usr/share/icingaweb2/library/vendor/Zend/View/Abstract.php(877): Icinga\Web\View->_run()
#5 /usr/share/icingaweb2/library/vendor/Zend/Controller/Action/Helper/ViewRenderer.php(904): Zend_View_Abstract->render()
#6 /usr/share/icingaweb2/library/vendor/Zend/Controller/Action/Helper/ViewRenderer.php(925): Zend_Controller_Action_Helper_ViewRenderer->renderScript()
#7 /usr/share/icingaweb2/library/vendor/Zend/Controller/Action/Helper/ViewRenderer.php(964): Zend_Controller_Action_Helper_ViewRenderer->render()
#8 /usr/share/icingaweb2/library/vendor/Zend/Controller/Action/HelperBroker.php(272): Zend_Controller_Action_Helper_ViewRenderer->postDispatch()
#9 /usr/share/icingaweb2/library/vendor/Zend/Controller/Action.php(518): Zend_Controller_Action_HelperBroker->notifyPostDispatch()
#10 /usr/share/php/Icinga/Web/Controller/Dispatcher.php(76): Zend_Controller_Action->dispatch()
#11 /usr/share/icingaweb2/library/vendor/Zend/Controller/Front.php(937): Icinga\Web\Controller\Dispatcher->dispatch()
#12 /usr/share/php/Icinga/Application/Web.php(300): Zend_Controller_Front->dispatch()
#13 /usr/share/php/Icinga/Application/webrouter.php(99): Icinga\Application\Web->dispatch()
#14 /usr/share/icingaweb2/public/index.php(4): require_once(String)
#15 {main}

It is really frustrating. Maybe I should start over.
Is there a tutorial for Bullseye graphite installation, or should I downgrade to Buster?

Did you run pip install graphite under the user that icinga runs as?

Did you run pip install graphite under the user that icinga runs as?

pip install as root; I believe icinga2 runs as root

Bash $>systemctl show -pUser,UID icinga2.service 
UID=[not set]
User=
Bash $>ps aux | grep icinga2
nagios     33004  0.0  1.7 194744 17940 ?        Ssl  Aug11   0:00 /usr/lib/x86_64-linux-gnu/icinga2/sbin/icinga2 --no-stack-rlimit daemon --close-stdio -e /var/log/icinga2/error.log
nagios     33022  0.2  2.6 597228 26808 ?        Sl   Aug11   0:03 /usr/lib/x86_64-linux-gnu/icinga2/sbin/icinga2 --no-stack-rlimit daemon --close-stdio -e /var/log/icinga2/error.log
nagios     33025  0.0  0.6 194744  6640 ?        S    Aug11   0:00 /usr/lib/x86_64-linux-gnu/icinga2/sbin/icinga2 --no-stack-rlimit daemon --close-stdio -e /var/log/icinga2/error.log

I will create a snapshot of my VM and try to reinstall as user nagios.

From your ps aux output it looks like Icinga runs as user nagios, which is typical for Debian.

If you ran pip install as root then all users have access to the modules and if you still get the module not found error you installed the module in the wrong Python version. Dis you use pip or pip3?

:pensive: installed requirements with pip3 and then went on installing with pip.

I believe it is best for me to try a different approach.
I will take a look at pnp again, even though I wanted to avoid it.
And it is probably best to do a fresh install, as I made a real mess of things.

Thanks for your help