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

Error Integrating Grafana to Icinga2 Host Overview #143

Closed
redbob365 opened this issue Apr 10, 2018 · 9 comments
Closed

Error Integrating Grafana to Icinga2 Host Overview #143

redbob365 opened this issue Apr 10, 2018 · 9 comments

Comments

@redbob365
Copy link

Error Integrating Grafana to Icinga2 Host Overview

Error when I view a Host in Icinga2 Monitoring

Instead of a graph, I see this error in red words, in a blank box:

Error: Cannot fetch group graph with curl:
error: 140770FC:SSL
routines: SSL23_GET_SERVER_HELLO: unknown
protocol.

  • Icinga Web 2 Grafana version (System - About): master
  • Icinga Web 2 version and modules (System - About): 2.5.1
  • Version used (icinga2 --version): r2.8.2-1
  • Operating System and version: Ubuntu 16.04.4 64bit
  • Enabled features (icinga2 feature list): api checker command graphite ido-mysql influxdb mainlog notification
  • Config validation (icinga2 daemon -C):
    information/cli: Icinga application loader (version: r2.8.2-1)
    information/cli: Loading configuration file(s).
    information/ConfigItem: Committing config item(s).
    information/ApiListener: My API identity: srvicinga-mt.mt.trf1.gov.br
    warning/ApplyRule: Apply rule 'satellite-host' (in /etc/icinga2/conf.d/satellite.conf : 29:1-29:41) for type 'Dependency' does not match anywhere!
    warning/ApplyRule: Apply rule 'backup-downtime' (in /etc/icinga2/conf.d/downtimes.con f: 5:1-5:52) for type 'ScheduledDowntime' does not match anywhere!
    warning/ApplyRule: Apply rule 'apt' (in /etc/icinga2/conf.d/apt.conf: 1:0-1:18) for t ype 'Service' does not match anywhere!
    warning/ApplyRule: Apply rule 'ping6' (in /etc/icinga2/conf.d/services.conf: 34:1-34: 21) for type 'Service' does not match anywhere!
    warning/ApplyRule: Apply rule '' (in /etc/icinga2/conf.d/services.conf: 57:1-57:65) f or type 'Service' does not match anywhere!
    warning/ApplyRule: Apply rule 'icinga' (in /etc/icinga2/conf.d/services.conf: 79:1-79 :22) for type 'Service' does not match anywhere!
    warning/ApplyRule: Apply rule 'load' (in /etc/icinga2/conf.d/services.conf: 87:1-87:2 0) for type 'Service' does not match anywhere!
    warning/ApplyRule: Apply rule 'procs' (in /etc/icinga2/conf.d/services.conf: 98:1-98: 21) for type 'Service' does not match anywhere!
    warning/ApplyRule: Apply rule 'swap' (in /etc/icinga2/conf.d/services.conf: 106:1-106 :20) for type 'Service' does not match anywhere!
    warning/ApplyRule: Apply rule 'users' (in /etc/icinga2/conf.d/services.conf: 114:1-11 4:21) for type 'Service' does not match anywhere!
    warning/ApplyRule: Apply rule 'nrpe_ss' (in /etc/icinga2/conf.d/services.conf: 122:1- 122:23) for type 'Service' does not match anywhere!
    information/ConfigItem: Instantiated 1 ApiListener.
    information/ConfigItem: Instantiated 3 Zones.
    information/ConfigItem: Instantiated 1 Endpoint.
    information/ConfigItem: Instantiated 1 FileLogger.
    information/ConfigItem: Instantiated 1 ApiUser.
    information/ConfigItem: Instantiated 76 Notifications.
    information/ConfigItem: Instantiated 2 NotificationCommands.
    information/ConfigItem: Instantiated 209 CheckCommands.
    information/ConfigItem: Instantiated 6 HostGroups.
    information/ConfigItem: Instantiated 1 IcingaApplication.
    information/ConfigItem: Instantiated 35 Hosts.
    information/ConfigItem: Instantiated 1 UserGroup.
    information/ConfigItem: Instantiated 1 User.
    information/ConfigItem: Instantiated 3 TimePeriods.
    information/ConfigItem: Instantiated 41 Services.
    information/ConfigItem: Instantiated 3 ServiceGroups.
    information/ConfigItem: Instantiated 1 ExternalCommandListener.
    information/ConfigItem: Instantiated 1 GraphiteWriter.
    information/ConfigItem: Instantiated 1 InfluxdbWriter.
    information/ConfigItem: Instantiated 1 IdoMysqlConnection.
    information/ConfigItem: Instantiated 1 NotificationComponent.
    information/ConfigItem: Instantiated 1 CheckerComponent.
    information/ScriptGlobal: Dumping variables to file '/var/cache/icinga2/icinga2.vars'
    information/cli: Finished validating the configuration file(s).
@Mikesch-mp
Copy link
Owner

Hi,

please post your module config.ini and also your grafana.ini. It looks like you configured the module to use https , but grafana speaks only http.

@redbob365
Copy link
Author

redbob365 commented Apr 10, 2018

config.ini

[grafana]
username = "icinga2"
host = "172.24.12.19:3000"
protocol = "https"
password = "ici"
height = "280"
width = "640"
timerangeAll = "1w/w"
enableLink = "yes"
defaultorgid = "1"
defaultdashboard = "base-metrics"
defaultdashboardpanelid = "2"
shadows = "0"
datasource = "influxdb"
accessmode = "indirectproxy"
usepublic = "no"
debug = "1"
ssl_verifypeer = "0"
ssl_verifyhost = "0"
version = "1"
defaultdashboarduid = "FxAre-ekz"
theme = "light"
authentication = "basic"

My grafana.ini has default values, I didn't changed it.

You are right @Mikesch-mp . I changed to

protocol = "http"

but now the error is that below:
novo erro

@Mikesch-mp
Copy link
Owner

You have to enable basic auth in grafana.ini and have a user/password to use with the module, but i woould suggest to use an grafana api-key instead of basic auth. For more information on how to create the api token see http://docs.grafana.org/http_api/auth/#create-api-token

@redbob365
Copy link
Author

Thanks, @Mikesch-mp . I set a basic auth and it worked, at least that auth error message was gone. Now I have another error message. What is going on, now?

image

@Mikesch-mp
Copy link
Owner

Can you enable debug please from the module and post the output

@redbob365
Copy link
Author

redbob365 commented Apr 11, 2018

Here you are, debug is enabled:
DCSno-Grafana

It seems that base-metrics is not retrieving data from icinga monitoring. Look at the dashboard:
DCSNO-dashboard

@Mikesch-mp
Copy link
Owner

OK, i think i got it.

  1. please dont use base-metrics as default dashboard, import the icinga2-default one provided with the module.
  2. Create a graph config for hostalive and oint it to base-metrics dashboard with the correct panelid, or import the dasboards for hostalive and point the graph config to them.

@redbob365
Copy link
Author

redbob365 commented Apr 12, 2018

I imported Icinga with InfluxDB Bashboard from Grafana Labs, it worked! Thanks!... I realized that Graphite is not collecting data, that's my opinion. This JSON I downloaded retrieves info directly from InfluxDB.
Grafana-working-graph

@Mikesch-mp
Copy link
Owner

Good :) so if this is solved please close this issue. thank you

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

2 participants