sni / Thruk

Thruk is a multibackend monitoring webinterface for Naemon, Nagios, Icinga and Shinken using the Livestatus API.
http://www.thruk.org
Other
406 stars 147 forks source link

Database not reachable or empty result #911

Closed StefThomas closed 5 years ago

StefThomas commented 5 years ago

I have no graphs for my services nor my hosts, only the message: “Database not reachable or empty result”

Thruk 2.26-2 installed with the omd-labs package from the Consol repository on Debian 9

I configured the site like this:


ADMIN_MAIL: 
APACHE_MODE: ssl
APACHE_TCP_ADDR: 127.0.0.1
APACHE_TCP_PORT: 5000
AUTOSTART: on
CORE: naemon
CRONTAB: on
DATASCRYER: off
DEFAULT_GUI: thruk
DOKUWIKI_AUTH: off
DOWNTIMEAPI: off
GRAFANA: on
GRAFANA_TCP_PORT: 8003
INFLUXDB: on
INFLUXDB_HTTP_TCP_PORT: 127.0.0.1:8086
INFLUXDB_META_TCP_PORT: 8088
INFLUXDB_MODE: ssl
INFLUXDB_RETENTION: 104
LIVESTATUS_TCP: off
MKEVENTD: off
MOD_GEARMAN: off
MULTISITE_AUTHORISATION: off
MULTISITE_COOKIE_AUTH: off
MYSQL: off
NAGFLUX: off
NAGVIS_URLS: nagios
NSCA: off
PNP4NAGIOS: on
PROMETHEUS: off
SNMPTRAPD: off
THRUK_COOKIE_AUTH: on
TMPFS: on
WEB_ALIAS: 
WEB_REDIRECT: off

If I de-activate grafana and influxdb I have "Service un-available" instead of the previous message but I can still see the PNP4Nagios graphs if I use the /pnp4nagios/ URLs directly. This is why I activated Grafana & InfluxDB in the first place, because the action_url links point to a grafana URLs by default.

I also tried with "http" instead of "tls" for the influxdb mode but with the same result. I also followed the documentation (grafana/plugins/sni-pnp-datasource/edit) and installed the PNP API, still without success. Do I have to set something more, do I have to create a datasource ? (The existing one created by OMD is not sufficient ?!)

I set the log level to debug in grafana.ini but I see nothing that helps.

Please let me know what to do. As a workaround, what is the best manner to configure the site to use the PNP4nagios URLs instead of the Grafana ones ?

More Globally what are the pros and cons of Grafana(+InfluxDB?) vs. PNP4Nagios ?

StefThomas commented 5 years ago

I found how to get PNP4Nagios link. I had applied both host-pnp and host-perf… Just need to add host-pnp to get the right link.

Still don’t know why it doesn’t work with Grafana so I keep this issue open.

steaksauce- commented 5 years ago

I found how to get PNP4Nagios link. I had applied both host-pnp and host-perf… Just need to add host-pnp to get the right link.

Still don’t know why it doesn’t work with Grafana so I keep this issue open.

A long time ago (several years), I tried Grafana with Thruk. The only way I could get it to work is via OMD. If you (or anyone else reading this) has managed to get Grafana working with Thruk without using OMD, please let me know the steps and I will test them out and create some documentation.

sni commented 5 years ago

This is the issue and bug tracker for Thruk, if you have general questions about monitoring configurations or best practices then this is not the right place.