]> granicus.if.org Git - icinga2/commitdiff
Update documentation.
authorGunnar Beutner <gunnar.beutner@netways.de>
Fri, 27 Sep 2013 11:56:11 +0000 (13:56 +0200)
committerGunnar Beutner <gunnar.beutner@netways.de>
Fri, 27 Sep 2013 11:56:24 +0000 (13:56 +0200)
doc/2.1.1-setting-up-icinga-2.md
doc/2.1.4-configuring-ido.md [deleted file]
doc/2.1.4-setting-up-ido.md [new file with mode: 0644]
doc/2.2-running-icinga.md
doc/3.1-configuration-syntax.md
etc/icinga2/features-available/Makefile.am
etc/icinga2/features-available/ido-mysql.conf [new file with mode: 0644]
etc/init.d/icinga2.in
tools/i2enfeature.in

index 7a899071702145ee39a6180a0e46ed9961ee44e2..757f0fb83a203bfd0e11928c48636ee394a6eb16 100644 (file)
@@ -66,11 +66,6 @@ and constants you can use to configure your services.
      */
     include "features-enabled/*.conf"
 
-The Icinga 2 example configuration includes a number of configuration files for
-some of Icinga 2's features. These are installed in the *features-available*
-directory and can be enabled and disabled using the *i2enfeature* and
-*i2disfeature* tools.
-
 This include directive takes care of including the configuration files for all
 the features which have been enabled with *i2enfeature*. See
 [Enabling/Disabling Features](#features) for more details.
diff --git a/doc/2.1.4-configuring-ido.md b/doc/2.1.4-configuring-ido.md
deleted file mode 100644 (file)
index 678bf37..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-### Configuring IDO
-
-TODO
diff --git a/doc/2.1.4-setting-up-ido.md b/doc/2.1.4-setting-up-ido.md
new file mode 100644 (file)
index 0000000..1d56474
--- /dev/null
@@ -0,0 +1,49 @@
+### Configuring IDO
+
+The IDO (Icinga Data Output) modules for Icinga 2 takes care of exporting all
+configuration and status information into a database.
+
+There is a separate module for each database backend. At present only support
+for MySQL is implemented.
+
+#### Setting up the database
+
+    # mysql -u root -p
+
+    mysql> CREATE DATABASE icinga;
+    Query OK, 1 row affected (0.01 sec)
+
+    mysql>  GRANT USAGE ON icinga.* TO 'icinga'@'localhost'
+              IDENTIFIED BY 'icinga'
+              WITH MAX_QUERIES_PER_HOUR 0
+              MAX_CONNECTIONS_PER_HOUR 0
+              MAX_UPDATES_PER_HOUR 0;
+
+    mysql>  GRANT SELECT, INSERT, UPDATE, DELETE, DROP, CREATE VIEW, INDEX, EXECUTE
+              ON icinga.* TO 'icinga'@'localhost';
+
+    mysql>  FLUSH PRIVILEGES;
+
+    mysql> quit
+
+    # cd /path/to/icinga-src/module/idoutils/db/mysql
+    # mysql -u root -p icinga < mysql.sql
+
+#### Installing the IDO module
+
+Once you've set up your database you will need to install the *icinga2-ido-mysql*
+package using your distribution's package manager.
+
+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 *i2enfeature*:
+
+    # i2enfeature ido-mysql
+    Module 'ido-mysql' was enabled.
+    Make sure to restart Icinga 2 for these changes to take effect.
+
+After enabling the ido-mysql feature you will need to restart Icinga 2:
+
+    # /etc/init.d/icinga2 restart
\ No newline at end of file
index 012889d941ae661afaf00446faf9a5a79cf126f6..908d4520994a7479c520f0730494bdf260535b4b 100644 (file)
@@ -1,5 +1,125 @@
 ## Running Icinga
 
-TODO
+### Init Script
 
-### <a id="features"></a> Enabling/Disabling Features
\ No newline at end of file
+Icinga 2's init script is installed in */etc/init.d/icinga2* by default:
+
+    # /etc/init.d/icinga2
+    Usage: /etc/init.d/icinga2 {start|stop|restart|reload|checkconfig|status}
+
+#### start
+
+The *start* action starts the Icinga 2 daemon.
+
+#### stop
+
+The *stop* action stops the Icinga 2 daemon.
+
+#### restart
+
+The *restart* action is a shortcut for running the *stop* action followed by
+*start*.
+
+#### reload
+
+The *reload* action sends the HUP signal to Icinga 2 which causes it to restart.
+Unlike the *restart* action *reload* does not wait until Icinga 2 has restarted.
+
+#### checkconfig
+
+The *checkconfig* action checks if the */etc/icinga2/icinga2.conf* configuration
+file contains any errors.
+
+#### status
+
+The *status* action checks if Icinga 2 is running:
+
+    $ /etc/init.d/icinga2 status
+    Icinga 2 status: Running
+
+### <a id="cmdline"></a> Command-line Options
+
+    $ icinga2 --help
+    icinga2 - The Icinga 2 network monitoring daemon.
+
+    Supported options:
+      --help                show this help message
+      -V [ --version ]      show version information
+      -l [ --library ] arg  load a library
+      -I [ --include ] arg  add include search directory
+      -c [ --config ] arg   parse a configuration file
+      -C [ --validate ]     exit after validating the configuration
+      -x [ --debug ]        enable debugging
+      -d [ --daemonize ]    detach from the controlling terminal
+      -e [ --errorlog ] arg log fatal errors to the specified log file (only works
+                            in combination with --daemonize)
+      -u [ --user ] arg     user to run Icinga as
+      -g [ --group ] arg    group to run Icinga as
+
+    Report bugs at <https://dev.icinga.org/>
+    Icinga home page: <http://www.icinga.org/>
+
+#### Libraries
+
+Instead of loading libraries using the [*library* config directive](#library)
+you can also use the *--library* command-line option.
+
+#### Config Include Path
+
+When including files you can specify that the include search path should be
+checked. You can do this by putting your config file name in angle brackets
+like this:
+
+    include <test.conf>
+
+This would cause Icinga 2 to search its include path for the configuration file
+*test.conf*. By default the installation path for the Icinga Template Library
+is the only search directory.
+
+Using the *--include* command-line option additional search directories can be
+added.
+
+#### Config Files
+
+Using the *--config* option you can specify one or more config files. Config
+files are processed in the order they're specified on the command-line.
+
+#### Config Validation
+
+The *--validate* option can be used to check if your configuration files
+contain errors. If any errors are found the exit status is 1, otherwise 0
+is returned.
+
+### <a id="features"></a> Enabling/Disabling Features
+
+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 *i2enfeature* and *i2disfeature* tools,
+respectively.
+
+The *i2enfeature* 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:
+
+    # i2enfeature
+    Syntax: i2enfeature <feature>
+    Enables the specified feature.
+
+    Available features: compat
+
+Using the *i2enfeature* command you can enable features:
+
+    # i2enfeature compat
+    Module 'compat' was enabled.
+    Make sure to restart Icinga 2 for these changes to take effect.
+
+You can disable features using the *i2disfeature* command:
+
+    # i2disfeature compat
+    Module 'compat' was disabled.
+    Make sure to restart Icinga 2 for these changes to take effect.
+
+> **Note**
+>
+> The *i2enfeature* and *i2disfeature* commands do not restart Icinga 2.
\ No newline at end of file
index 1bd229cd32e18fdf06c4848d94a043730ed3f9a9..9493ecaf09a26c6dd88a01adf63dd21a1b71b4cb 100644 (file)
@@ -343,11 +343,12 @@ C/C++ compiler:
 Note the use of angle brackets instead of double quotes. This causes the
 config compiler to search the include search paths for the specified
 file. By default $PREFIX/icinga2 is included in the list of search
-paths.
+paths. Additional include search paths can be added using
+[command-line options](#cmdline).
 
 Wildcards are not permitted when using angle brackets.
 
-### Library directive
+### <a id="library"></a> Library directive
 
 The *library* directive can be used to manually load additional
 libraries. Libraries can be used to provide additional object types and
index 86d32462333f8f1ca0ddabd8a85b04d7157a5a04..a03003f90e0ce4107dd4c515f6dd2954045b340b 100644 (file)
@@ -3,7 +3,8 @@
 icinga2confdir = $(sysconfdir)/icinga2/features-available
 
 CONFIG_FILES = \
-       compat.conf
+       compat.conf \
+       ido-mysql.conf
 
 install-data-local:
        @$(MKDIR_P) $(icinga2confdir); \
diff --git a/etc/icinga2/features-available/ido-mysql.conf b/etc/icinga2/features-available/ido-mysql.conf
new file mode 100644 (file)
index 0000000..8f4ca2b
--- /dev/null
@@ -0,0 +1,13 @@
+/**
+ * The ido_mysql library implements IDO functionality
+ * for MySQL.
+ */
+
+library "ido_mysql"
+
+object IdoMysqlConnection "ido-mysql" {
+  //user = "icinga",
+  //password = "icinga",
+  //host = "localhost",
+  //database = "icinga"
+}
index 68ebacc6f6960c62261fdb3f82e47940510776e0..764995f9c0f787245911926778b09c5a70b92700 100644 (file)
@@ -145,7 +145,7 @@ case "$1" in
        checkconfig
        ;;
   *)
-        echo $"Usage: $0 {start|stop|restart|reload|checkconfig|status}"
+        echo "Usage: $0 {start|stop|restart|reload|checkconfig|status}"
         exit 1
 esac
 exit 0
index f7b6f0b82ed3d17e40da7a35d1f81d1e62fbe9c8..5f14ea6c51c81123724014843eb63d21d494b949 100644 (file)
@@ -25,7 +25,7 @@ if [ -z "$1" ]; then
        fi
 
        echo
-       echo -n "Available feature: "
+       echo -n "Available features: "
 
        for file in $ICINGA2CONFDIR/features-available/*.conf; do
                echo -n $(basename -- $file .conf)