Closed XnS closed 6 years ago
f0dbcabf70 added a default value into the CheckCommand but it hasn't been documented at all. If we remove it, this likely breaks setups. Not sure where to head here.
Lazy as i was, i just copied the text from the plugin. But i will send PR soon, have allready an idea how to do it and not break existing setups. Just have to test it.
Expected Behavior
According to the documentation it is possible to connect to cataloged databases. If that's the case,
hostname
andport
are omitted. The check command should be rendered to:So that there's no tcp/ip connection involved.
Current Behavior
The
--hostname
parameter is always used, thus its not possible to connect to cataloged databases ascheck_db2_health
is using tcp/ip mode if--hostname
is present. The rendered check command is:Possible Solution
It should be possible to specify whether a cataloged database should be used or not. If that's the case, omit
--hostname
Steps to Reproduce (for bugs)
db2_health
commandContext
With the current behaviour no checks of catalogued databases are possible.
Your Environment
icinga2 --version
):Copyright (c) 2012-2017 Icinga Development Team (https://www.icinga.com/) License GPLv2+: GNU GPL version 2 or later http://gnu.org/licenses/gpl2.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
Application information: Installation root: /usr Sysconf directory: /etc Run directory: /run Local state directory: /var Package data directory: /usr/share/icinga2 State path: /var/lib/icinga2/icinga2.state Modified attributes path: /var/lib/icinga2/modified-attributes.conf Objects path: /var/cache/icinga2/icinga2.debug Vars path: /var/cache/icinga2/icinga2.vars PID path: /run/icinga2/icinga2.pid
System information: Platform: SLES Platform version: 12-SP3 Kernel: Linux Kernel version: 4.4.126-94.22-default Architecture: x86_64
Build information: Compiler: GNU 4.8.5 Build host: hostname
icinga01:~ # cat /etc/SuSE-release SUSE Linux Enterprise Server 12 (x86_64) VERSION = 12 PATCHLEVEL = 3
This file is deprecated and will be removed in a future service pack or release.
Please check /etc/os-release for details about this release.
icinga01:~ # icinga2 feature list Disabled features: command compatlog debuglog elasticsearch gelf graphite influxdb opentsdb perfdata statusdata syslog Enabled features: api checker ido-mysql livestatus mainlog notification
Icinga Web 2 Version 2.5.3 Git commit ca7e886b820f0145999fdf7377f5c4132301eada Git commit date 2018-04-27 Copyright © 2013-2018 The Icinga Project
director master monitoring 2.5.3 nagvis 1.1.1
icinga01:~ # icinga2 daemon -C information/cli: Icinga application loader (version: r2.8.4-1) information/cli: Loading configuration file(s). information/ConfigItem: Committing config item(s). information/ApiListener: My API identity: icinga01.company.dmz warning/ApplyRule: Apply rule 'mail-icingaadmin' (in /etc/icinga2/conf.d/notifications.conf: 11:1-11:45) for type 'Notification' does not match anywhere! warning/ApplyRule: Apply rule 'mail-icingaadmin' (in /etc/icinga2/conf.d/notifications.conf: 23:1-23:48) for type 'Notification' does not match anywhere! warning/ApplyRule: Apply rule 'Switch Interface Check' (in /var/lib/icinga2/api/packages/director/icinga01-1527235359-3/zones.d/director-global/service_apply.conf: 1:0-1:75) 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 3 ApiUsers. information/ConfigItem: Instantiated 1 UserGroup. information/ConfigItem: Instantiated 2 NotificationCommands. information/ConfigItem: Instantiated 219 CheckCommands. information/ConfigItem: Instantiated 1 IcingaApplication. information/ConfigItem: Instantiated 848 Hosts. information/ConfigItem: Instantiated 24 HostGroups. information/ConfigItem: Instantiated 1 Downtime. information/ConfigItem: Instantiated 3 TimePeriods. information/ConfigItem: Instantiated 1 User. information/ConfigItem: Instantiated 3 Comments. information/ConfigItem: Instantiated 22 ServiceGroups. information/ConfigItem: Instantiated 4977 Services. information/ConfigItem: Instantiated 1 ScheduledDowntime. information/ConfigItem: Instantiated 1 CheckerComponent. information/ConfigItem: Instantiated 1 IdoMysqlConnection. information/ConfigItem: Instantiated 1 LivestatusListener. information/ConfigItem: Instantiated 1 NotificationComponent. information/ScriptGlobal: Dumping variables to file '/var/cache/icinga2/icinga2.vars' information/cli: Finished validating the configuration file(s).