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

Error creating or updating Grafana Graphs on Icinga Web #138

Closed
juangranados opened this issue Mar 26, 2018 · 3 comments
Closed

Error creating or updating Grafana Graphs on Icinga Web #138

juangranados opened this issue Mar 26, 2018 · 3 comments
Assignees
Labels
Milestone

Comments

@juangranados
Copy link

Expected Behavior

Add or update Grafana graph.

Current Behavior

When adding or updating Grafana graphs, Icinga Web 2 shows this error:

Fatal error: Uncaught Error: Call to a member function getValue() on null in /usr/share/icingaweb2/modules/grafana/application/forms/Graph/GraphForm.php:202 Stack trace: #0 /usr/share/php/Icinga/Web/Form.php(1154): Icinga\Module\Grafana\Forms\Graph\GraphForm->onSuccess() #1 /usr/share/icingaweb2/modules/grafana/application/controllers/GraphController.php(108): Icinga\Web\Form->handleRequest() #2 /usr/share/icingaweb2/library/vendor/Zend/Controller/Action.php(507): Icinga\Module\Grafana\Controllers\GraphController->updateAction() #3 /usr/share/php/Icinga/Web/Controller/Dispatcher.php(76): Zend_Controller_Action->dispatch('updateAction') #4 /usr/share/icingaweb2/library/vendor/Zend/Controller/Front.php(937): Icinga\Web\Controller\Dispatcher->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response)) #5 /usr/share/php/Icinga/Application/Web.php(407): Zend_Controller_Front->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response)) #6 /usr/share/php/Icinga/Application/webrouter.php(104): Icinga\Application\Web-> in /usr/share/icingaweb2/modules/grafana/application/forms/Graph/GraphForm.php on line 202

Possible Solution

Unknown

Steps to Reproduce (for bugs)

  1. Create or update Grafana Graph

Context

Your Environment

  • Icinga Web 2 Grafana version (System - About): Latest
  • Icinga Web 2 version and modules (System - About): monitoring: 2.5.1
  • Version used (icinga2 --version): version: r2.8.2-1
  • Operating System and version: Ubuntu 16.04.4 LTS
  • Enabled features (icinga2 feature list):
Disabled features: compatlog debuglog elasticsearch gelf graphite livestatus opentsdb perfdata statusdata syslog
Enabled features: api checker command 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: monitoring.3digits.es
information/ConfigItem: Instantiated 1 ApiListener.
information/ConfigItem: Instantiated 94 Zones.
information/ConfigItem: Instantiated 93 Endpoints.
information/ConfigItem: Instantiated 1 FileLogger.
information/ConfigItem: Instantiated 2 ApiUsers.
information/ConfigItem: Instantiated 892 Notifications.
information/ConfigItem: Instantiated 2 NotificationCommands.
information/ConfigItem: Instantiated 224 CheckCommands.
information/ConfigItem: Instantiated 15 HostGroups.
information/ConfigItem: Instantiated 1 IcingaApplication.
information/ConfigItem: Instantiated 1 EventCommand.
information/ConfigItem: Instantiated 94 Hosts.
information/ConfigItem: Instantiated 6 Comments.
information/ConfigItem: Instantiated 1 UserGroup.
information/ConfigItem: Instantiated 3 Dependencies.
information/ConfigItem: Instantiated 1 User.
information/ConfigItem: Instantiated 3 TimePeriods.
information/ConfigItem: Instantiated 798 Services.
information/ConfigItem: Instantiated 7 ServiceGroups.
information/ConfigItem: Instantiated 1 ExternalCommandListener.
information/ConfigItem: Instantiated 1 IdoMysqlConnection.
information/ConfigItem: Instantiated 1 InfluxdbWriter.
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

Please provide your config.ini

@juangranados
Copy link
Author

Hi Carsten, thanks for your support.

[grafana]
host = "monitoring.hostname.es:3000"
protocol = "https"
defaultdashboard = "icinga2"
defaultorgid = "2"
theme = "light"
datasource = "influxdb"
accessmode = "indirectproxy"
debug = "1"
height = "280"
width = "768"
enableLink = "yes"
shadows = "0"
authentication = "token"
apitoken = "apitoken..."
usepublic = "yes"
publichost = "monitoring.hostname.es:3000"
publicprotocol = "https"
ssl_verifypeer = "0"
ssl_verifyhost = "0"
timerangeAll = "1w/w"
defaultdashboardpanelid = "2"
version = "1"
defaultdashboarduid = "zSfpuxgik"

@Mikesch-mp Mikesch-mp self-assigned this Mar 26, 2018
@Mikesch-mp Mikesch-mp added the bug label Mar 26, 2018
@Mikesch-mp Mikesch-mp added this to the 1.2.2 milestone Mar 26, 2018
@Mikesch-mp
Copy link
Owner

i fixed it in master branch. But you can also just edit line 202 in /usr/share/icingaweb2/modules/grafana/application/forms/Graph/GraphForm.php and change = to ==

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants