Skip to content

Commit

Permalink
Remove icinga2-enable-feature and icinga2-disable-feature
Browse files Browse the repository at this point in the history
refs #7250
  • Loading branch information
gunnarbeutner committed Oct 14, 2014
1 parent 533ec94 commit d7d6d60
Show file tree
Hide file tree
Showing 21 changed files with 73 additions and 241 deletions.
4 changes: 2 additions & 2 deletions agent/icinga2-setup-agent.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -176,15 +176,15 @@ ZONES
sed -i "s/NodeName = \"localhost\"/NodeName = \"$name\"/" /etc/icinga2/constants.conf

echo "Enabling API feature..."
@CMAKE_INSTALL_FULL_SBINDIR@/icinga2-enable-feature api
@CMAKE_INSTALL_FULL_SBINDIR@/icinga2 feature enable api

if [ ! -e "@CMAKE_INSTALL_FULL_SYSCONFDIR@/monitoring" ]; then
ln -s $ICINGA2CONFIG/conf.d/hosts/localhost @CMAKE_INSTALL_FULL_SYSCONFDIR@/monitoring
fi

if [ "$master" = "n" ]; then
echo "Disabling notification feature..."
@CMAKE_INSTALL_FULL_SBINDIR@/icinga2-disable-feature notification
@CMAKE_INSTALL_FULL_SBINDIR@/icinga2 feature disable notification
fi

echo ""
Expand Down
2 changes: 1 addition & 1 deletion debian/icinga2-classicui.postinst
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ is_fresh_install()
enable_features_for_classic() {
if is_fresh_install $@; then
echo "enabling icinga2 features for classicui"
icinga2-enable-feature compatlog statusdata command
icinga2 feature enable compatlog statusdata command

echo "reloading icinga2"
[ -x $(which invoke-rc.d) ] && invoke-rc.d icinga2 reload
Expand Down
2 changes: 1 addition & 1 deletion debian/icinga2-common.postinst
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ enable_default_features() {
if is_fresh_install $@ \
|| dpkg --compare-versions "$2" lt "$FIX_VERSION"; then
echo "enabling default icinga2 features"
icinga2-enable-feature checker notification mainlog
icinga2 feature enable checker notification mainlog
fi
# handle new default features here in the future
}
Expand Down
4 changes: 2 additions & 2 deletions debian/icinga2-ido-mysql.postinst
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ if [ "$1" = configure ]; then
if [ -L /etc/icinga2/features-enabled/ido-mysql.conf ]
then
echo "disable ido mysql feature"
icinga2-disable-feature ido-mysql
icinga2 feature disable ido-mysql
echo "reloading icinga2"
[ -x $(which invoke-rc.d) ] && invoke-rc.d icinga2 reload
fi
else
if [ ! -L /etc/icinga2/features-enabled/ido-mysql.conf ]
then
echo "enable ido mysql feature"
icinga2-enable-feature ido-mysql
icinga2 feature enable ido-mysql
echo "reloading icinga2"
[ -x $(which invoke-rc.d) ] && invoke-rc.d icinga2 reload

Expand Down
2 changes: 1 addition & 1 deletion debian/icinga2-ido-mysql.templates
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ _Description: Enable icinga 2 mysql idoutils?
feature gets enabled for icinga 2.
.
If you want to disable the feature call
icinga2-disable-feature ido-mysql
icinga2 feature disable ido-mysql
4 changes: 2 additions & 2 deletions debian/icinga2-ido-pgsql.postinst
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ if [ "$1" = configure ]; then
if [ -L /etc/icinga2/features-enabled/ido-pgsql.conf ]
then
echo "disable ido pgsql feature"
icinga2-disable-feature ido-pgsql
icinga2 feature disable ido-pgsql
echo "reloading icinga2"
[ -x $(which invoke-rc.d) ] && invoke-rc.d icinga2 reload
fi
else
if [ ! -L /etc/icinga2/features-enabled/ido-pgsql.conf ]
then
echo "enable ido pgsql feature"
icinga2-enable-feature ido-pgsql
icinga2 feature enable ido-pgsql
echo "reloading icinga2"
[ -x $(which invoke-rc.d) ] && invoke-rc.d icinga2 reload

Expand Down
2 changes: 1 addition & 1 deletion debian/icinga2-ido-pgsql.templates
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ _Description: Enable icinga 2 pgsql idoutils?
feature gets enabled for icinga 2.
.
If you want to disable the feature call
icinga2-disable-feature ido-pgsql
icinga2 feature disable ido-pgsql
61 changes: 31 additions & 30 deletions doc/2-getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,12 @@ Icinga 2 installation:
* `notification` for sending notifications
* `mainlog` for writing the `icinga2.log ` file

Verify that by calling `icinga2-enable-feature` without any additional parameters
Verify that by calling `icinga2 feature enable` without any additional parameters
and enable the missing features, if any.

# icinga2-enable-feature
Syntax: icinga2-enable-feature <features separated with whitespaces>
Example: icinga2-enable-feature checker notification mainlog
# icinga2 feature enable
Syntax: icinga2 feature enable <features separated with whitespaces>
Example: icinga2 feature enable checker notification mainlog
Enables the specified feature(s).

Available features: api checker command compatlog debuglog graphite icingastatus ido-mysql ido-pgsql livestatus mainlog notification perfdata statusdata syslog
Expand Down Expand Up @@ -276,13 +276,14 @@ The `include` directive can be used to include other files.
/**
* The features-available directory contains a number of configuration
* files for features which can be enabled and disabled using the
* icinga2-enable-feature / icinga2-disable-feature tools. These two tools work by creating
* and removing symbolic links in the features-enabled directory.
* icinga2 feature enable / icinga2 feature disable CLI commands.
* These commands work by creating and removing symbolic links in
* the features-enabled directory.
*/
include "features-enabled/*.conf"

This `include` directive takes care of including the configuration files for all
the features which have been enabled with `icinga2-enable-feature`. See
the features which have been enabled with `icinga2 feature enable`. See
[Enabling/Disabling Features](#features) for more details.

/**
Expand Down Expand Up @@ -670,9 +671,9 @@ The package provides a new configuration file that is installed in
`/etc/icinga2/features-available/ido-mysql.conf`. You will need to update the
database credentials in this file.

You can enable the `ido-mysql` feature configuration file using `icinga2-enable-feature`:
You can enable the `ido-mysql` feature configuration file using `icinga2 feature enable`:

# icinga2-enable-feature ido-mysql
# icinga2 feature enable ido-mysql
Module 'ido-mysql' was enabled.
Make sure to restart Icinga 2 for these changes to take effect.

Expand Down Expand Up @@ -781,9 +782,9 @@ The package provides a new configuration file that is installed in
`/etc/icinga2/features-available/ido-pgsql.conf`. You will need to update the
database credentials in this file.

You can enable the `ido-pgsql` feature configuration file using `icinga2-enable-feature`:
You can enable the `ido-pgsql` feature configuration file using `icinga2 feature enable`:

# icinga2-enable-feature ido-pgsql
# icinga2 feature enable ido-pgsql
Module 'ido-pgsql' was enabled.
Make sure to restart Icinga 2 for these changes to take effect.

Expand All @@ -803,9 +804,9 @@ RHEL/CentOS 7 and Fedora 20:
Web interfaces and other Icinga addons are able to send commands to
Icinga 2 through the external command pipe.

You can enable the External Command Pipe using icinga2-enable-feature:
You can enable the External Command Pipe using icinga2 feature enable:

# icinga2-enable-feature command
# icinga2 feature enable command

After that you will have to restart Icinga 2:

Expand Down Expand Up @@ -853,9 +854,9 @@ Livestatus.
Details on the available tables and attributes with Icinga 2 can be found
in the [Livestatus Schema](#schema-livestatus) section.

You can enable Livestatus using icinga2-enable-feature:
You can enable Livestatus using icinga2 feature enable:

# icinga2-enable-feature livestatus
# icinga2 feature enable livestatus

After that you will have to restart Icinga 2:

Expand Down Expand Up @@ -884,7 +885,7 @@ In order to use the historical tables provided by the livestatus feature (for ex
are expected to be in `/var/log/icinga2/compat`. A different path can be set using the
`compat_log_path` configuration attribute.

# icinga2-enable-feature compatlog
# icinga2 feature enable compatlog

## <a id="setting-up-icinga2-user-interfaces"></a> Setting up Icinga 2 User Interfaces

Expand Down Expand Up @@ -978,7 +979,7 @@ Icinga Classic UI requires the [StatusDataWriter](#status-data), [CompatLogger](
and [ExternalCommandListener](#external-commands) features.
Enable these features and restart Icinga 2.

# icinga2-enable-feature statusdata compatlog command
# icinga2 feature enable statusdata compatlog command

In order for commands to work you will need to [setup the external command pipe](#setting-up-external-command-pipe).

Expand Down Expand Up @@ -1036,7 +1037,7 @@ Example for RHEL and MySQL:
Icinga Web requires the IDO feature as database backend using MySQL or PostgreSQL.
Enable that feature, e.g. for MySQL.

# icinga2-enable-feature ido-mysql
# icinga2 feature enable ido-mysql

If you've changed your default credentials you may either create a read-only user
or use the credentials defined in the IDO feature for Icinga Web backend configuration.
Expand All @@ -1049,7 +1050,7 @@ found in the [Icinga Web documentation](http://docs.icinga.org/latest/en/icinga-

Additionally you need to enable the `command` feature for sending [external commands](#external-commands):

# icinga2-enable-feature command
# icinga2 feature enable command

In order for commands to work you will need to [setup the external command pipe](#setting-up-external-command-pipe).

Expand Down Expand Up @@ -1124,12 +1125,12 @@ Icinga Web 2 will support `status.dat`, `DB IDO`, or `Livestatus` as backends.
Using DB IDO as backend, you need to install and configure the [DB IDO backend](#configuring-db-ido).
Once finished, you can enable the feature for DB IDO MySQL:

# icinga2-enable-feature ido-mysql
# icinga2 feature enable ido-mysql

Furthermore [external commands](#external-commands) are supported through the external
command pipe.

# icinga2-enable-feature command
# icinga2 feature enable command

In order for commands to work you will need to [setup the external command pipe](#setting-up-external-command-pipe).

Expand Down Expand Up @@ -1351,33 +1352,33 @@ is returned.

Icinga 2 provides configuration files for some commonly used features. These
are installed in the `/etc/icinga2/features-available` directory and can be
enabled and disabled using the `icinga2-enable-feature` and `icinga2-disable-feature` tools,
enabled and disabled using the `icinga2 feature enable` and `icinga2 feature disable` tools,
respectively.

The `icinga2-enable-feature` tool creates symlinks in the `/etc/icinga2/features-enabled`
The `icinga2 feature enable` tool creates symlinks in the `/etc/icinga2/features-enabled`
directory which is included by default in the example configuration file.

You can view a list of available feature configuration files:

# icinga2-enable-feature
Syntax: icinga2-enable-feature <feature>
# icinga2 feature enable
Syntax: icinga2 feature enable <feature>
Enables the specified feature.

Available features: statusdata

Using the `icinga2-enable-feature` command you can enable features:
Using the `icinga2 feature enable` command you can enable features:

# icinga2-enable-feature statusdata
# icinga2 feature enable statusdata
Module 'statusdata' was enabled.
Make sure to restart Icinga 2 for these changes to take effect.

You can disable features using the `icinga2-disable-feature` command:
You can disable features using the `icinga2 feature disable` command:

# icinga2-disable-feature statusdata
# icinga2 feature disable statusdata
Module 'statusdata' was disabled.
Make sure to restart Icinga 2 for these changes to take effect.

The `icinga2-enable-feature` and `icinga2-disable-feature` commands do not
The `icinga2 feature enable` and `icinga2 feature disable` commands do not
restart Icinga 2. You will need to restart Icinga 2 using the init script
after enabling or disabling features.

Expand Down
14 changes: 7 additions & 7 deletions doc/3-monitoring-basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -1734,7 +1734,7 @@ through the web interface).
In order to enable the `ExternalCommandListener` configuration use the
following command and restart Icinga 2 afterwards:

# icinga2-enable-feature command
# icinga2 feature enable command

Icinga 2 creates the command pipe file as `/var/run/icinga2/cmd/icinga2.cmd`
using the default configuration.
Expand Down Expand Up @@ -1766,8 +1766,8 @@ Icinga 2 supports three different types of logging:
* Syslog (on *NIX-based operating systems)
* Console logging (`STDOUT` on tty)

You can enable additional loggers using the `icinga2-enable-feature`
and `icinga2-disable-feature` commands to configure loggers:
You can enable additional loggers using the `icinga2 feature enable`
and `icinga2 feature disable` commands to configure loggers:

Feature | Description
---------|------------
Expand Down Expand Up @@ -1809,7 +1809,7 @@ runtime vars.
The default templates are already provided with the Icinga 2 feature configuration
which can be enabled using

# icinga2-enable-feature perfdata
# icinga2 feature enable perfdata

By default all performance data files are rotated in a 15 seconds interval into
the `/var/spool/icinga2/perfdata/` directory as `host-perfdata.<timestamp>` and
Expand All @@ -1826,7 +1826,7 @@ write them to the defined Graphite Carbon daemon tcp socket.

You can enable the feature using

# icinga2-enable-feature graphite
# icinga2 feature enable graphite

By default the `GraphiteWriter` object expects the Graphite Carbon Cache to listen at
`127.0.0.1` on port `2003`.
Expand Down Expand Up @@ -1893,7 +1893,7 @@ interval to its `objects.cache` and `status.dat` files. Icinga 2 provides
the `StatusDataWriter` object which dumps all configuration objects and
status updates in a regular interval.

# icinga2-enable-feature statusdata
# icinga2 feature enable statusdata

Icinga 1.x Classic UI requires this data set as part of its backend.

Expand All @@ -1916,7 +1916,7 @@ historical tables.

The `CompatLogger` object can be enabled with

# icinga2-enable-feature compatlog
# icinga2 feature enable compatlog

By default, the Icinga 1.x log file called `icinga.log` is located
in `/var/log/icinga2/compat`. Rotated log files are moved into
Expand Down
6 changes: 3 additions & 3 deletions doc/4-monitoring-remote-systems.md
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ A sample config looks like:

You can simply enable the `api` feature using

# icinga2-enable-feature api
# icinga2 feature enable api

Edit `/etc/icinga2/features-enabled/api.conf` if you require the configuration
synchronisation enabled for this node. Set the `accept_config` attribute to `true`.
Expand Down Expand Up @@ -811,7 +811,7 @@ fails the other nodes will automatically take over the reamining checks.
> If a node should not check anything, disable the `checker` feature explicitely and
> reload Icinga 2.
# icinga2-disable-feature checker
# icinga2 feature disable checker
# service icinga2 reload

#### <a id="high-availability-notifications"></a> High Availability with Notifications
Expand All @@ -829,7 +829,7 @@ have the DB IDO feature enabled.

Example DB IDO MySQL:

# icinga2-enable-feature ido-mysql
# icinga2 feature enable ido-mysql
The feature 'ido-mysql' is already enabled.

By default the DB IDO feature only runs on the elected zone master. All other passive
Expand Down
4 changes: 2 additions & 2 deletions doc/6-configuring-icinga-2.md
Original file line number Diff line number Diff line change
Expand Up @@ -1624,7 +1624,7 @@ Example:

Can be enabled/disabled using

# icinga2-enable-feature checker
# icinga2 feature enable checker


### <a id="objecttype-notificationcomponent"></a> NotificationComponent
Expand All @@ -1646,7 +1646,7 @@ Attributes:

Can be enabled/disabled using

# icinga2-enable-feature notification
# icinga2 feature enable notification


### <a id="objecttype-filelogger"></a> FileLogger
Expand Down
6 changes: 3 additions & 3 deletions doc/7-troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ log severity as an additional parameter argument to `-x`.

Additionally you can enable the debug log using

# icinga2-enable-feature debuglog
# icinga2 feature enable debuglog
# service icinga2 restart
# tail -f /var/log/icinga2/debug.log

Expand Down Expand Up @@ -59,7 +59,7 @@ Examples:

# sudo -u icinga /usr/lib/nagios/plugins/check_ping -4 -H 127.0.0.1 -c 5000,100% -w 3000,80%

# icinga2-enable-feature checker
# icinga2 feature enable checker
The feature 'checker' is already enabled.


Expand All @@ -80,7 +80,7 @@ Verify the following configuration

Examples:

# icinga2-enable-feature notification
# icinga2 feature enable notification
The feature 'notification' is already enabled.

## <a id="feature-not-working"></a> Feature is not working
Expand Down
2 changes: 1 addition & 1 deletion doc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ file(GLOB DOCSRCS "*.md")

if(UNIX OR CYGWIN)
install(
FILES icinga2.8 icinga2-enable-feature.8 icinga2-disable-feature.8 icinga2-build-ca.8 icinga2-build-key.8 icinga2-sign-key.8 icinga2-prepare-dirs.8
FILES icinga2.8 icinga2-build-ca.8 icinga2-build-key.8 icinga2-sign-key.8 icinga2-prepare-dirs.8
DESTINATION ${CMAKE_INSTALL_MANDIR}/man8
)
endif()
Expand Down

0 comments on commit d7d6d60

Please sign in to comment.