From 6506a89db34714f9f465bc73f7ee25b14b3f58d0 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Mon, 22 Jan 2018 08:18:05 +0100 Subject: [PATCH] Update default config and documentation for the "library" keyword --- doc/09-object-types.md | 30 ------------------- doc/17-language-reference.md | 10 ++----- etc/icinga2/features-available/checker.conf | 2 -- etc/icinga2/features-available/command.conf | 2 -- etc/icinga2/features-available/compatlog.conf | 2 -- .../features-available/elasticsearch.conf | 2 -- etc/icinga2/features-available/gelf.conf | 2 -- etc/icinga2/features-available/graphite.conf | 2 -- etc/icinga2/features-available/ido-mysql.conf | 6 ++-- etc/icinga2/features-available/ido-pgsql.conf | 6 ++-- etc/icinga2/features-available/influxdb.conf | 2 -- .../features-available/livestatus.conf | 4 +-- .../features-available/notification.conf | 2 -- etc/icinga2/features-available/opentsdb.conf | 2 -- etc/icinga2/features-available/perfdata.conf | 2 -- .../features-available/statusdata.conf | 2 -- 16 files changed, 8 insertions(+), 70 deletions(-) diff --git a/doc/09-object-types.md b/doc/09-object-types.md index 2976356f0..95e9dccbb 100644 --- a/doc/09-object-types.md +++ b/doc/09-object-types.md @@ -247,8 +247,6 @@ This configuration object is available as [checker feature](11-cli-commands.md#c Example: ``` -library "checker" - object CheckerComponent "checker" { concurrent_checks = 512 } @@ -268,8 +266,6 @@ to help existing Icinga 1.x users and might be useful for migration scenarios. Example: ``` -library "compat" - object CheckResultReader "reader" { spool_dir = "/data/check-results" } @@ -318,8 +314,6 @@ This configuration object is available as [compatlog feature](14-features.md#com Example: ``` -library "compat" - object CompatLogger "compatlog" { log_dir = "/var/log/icinga2/compat" rotation_method = "DAILY" @@ -486,8 +480,6 @@ This configuration object is available as [elasticsearch feature](14-features.md Example: ``` -library "perfdata" - object ElasticsearchWriter "elasticsearch" { host = "127.0.0.1" port = 9200 @@ -603,8 +595,6 @@ This configuration object is available as [command feature](14-features.md#exter Example: ``` -library "compat" - object ExternalCommandListener "command" { command_path = "/var/run/icinga2/cmd/icinga2.cmd" } @@ -648,8 +638,6 @@ This configuration object is available as [gelf feature](14-features.md#gelfwrit Example: ``` -library "perfdata" - object GelfWriter "gelf" { host = "127.0.0.1" port = 12201 @@ -675,8 +663,6 @@ This configuration object is available as [graphite feature](14-features.md#grap Example: ``` -library "perfdata" - object GraphiteWriter "graphite" { host = "127.0.0.1" port = 2003 @@ -845,8 +831,6 @@ This configuration object is available as [ido-mysql feature](14-features.md#db- Example: ``` -library "db_ido_mysql" - object IdoMysqlConnection "mysql-ido" { host = "127.0.0.1" port = 3306 @@ -938,8 +922,6 @@ This configuration object is available as [ido-pgsql feature](14-features.md#db- Example: ``` -library "db_ido_pgsql" - object IdoPgsqlConnection "pgsql-ido" { host = "127.0.0.1" port = 5432 @@ -1024,8 +1006,6 @@ This configuration object is available as [influxdb feature](14-features.md#infl Example: ``` -library "perfdata" - object InfluxdbWriter "influxdb" { host = "127.0.0.1" port = 8086 @@ -1086,8 +1066,6 @@ This configuration object is available as [livestatus feature](14-features.md#se Examples: ``` -library "livestatus" - object LivestatusListener "livestatus-tcp" { socket_type = "tcp" bind_host = "127.0.0.1" @@ -1300,8 +1278,6 @@ This configuration object is available as [notification feature](11-cli-commands Example: ``` -library "notification" - object NotificationComponent "notification" { } ``` @@ -1319,8 +1295,6 @@ This configuration object is available as [opentsdb feature](14-features.md#open Example: ``` -library "perfdata" - object OpenTsdbWriter "opentsdb" { host = "127.0.0.1" port = 4242 @@ -1344,8 +1318,6 @@ This configuration object is available as [perfdata feature](14-features.md#writ Example: ``` -library "perfdata" - object PerfdataWriter "perfdata" { host_perfdata_path = "/var/spool/icinga2/perfdata/host-perfdata" @@ -1556,8 +1528,6 @@ This configuration object is available as [statusdata feature](14-features.md#st Example: ``` -library "compat" - object StatusDataWriter "status" { status_path = "/var/cache/icinga2/status.dat" objects_path = "/var/cache/icinga2/objects.cache" diff --git a/doc/17-language-reference.md b/doc/17-language-reference.md index e18a0a7c7..cf3934176 100644 --- a/doc/17-language-reference.md +++ b/doc/17-language-reference.md @@ -610,13 +610,9 @@ When no pattern is specified the default pattern "*.conf" is used. ## Library directive -The `library` directive can be used to manually load additional -libraries. Libraries can be used to provide additional object types and -functions. - -Example: - - library "snmphelper" +The `library` directive was used to manually load additional +libraries. Starting with version 2.9 it is no longer necessary to explicitly load +libraries and this directive has no effect. ## Functions diff --git a/etc/icinga2/features-available/checker.conf b/etc/icinga2/features-available/checker.conf index 1139e626e..6f003b8f3 100644 --- a/etc/icinga2/features-available/checker.conf +++ b/etc/icinga2/features-available/checker.conf @@ -2,6 +2,4 @@ * The checker component takes care of executing service checks. */ -library "checker" - object CheckerComponent "checker" { } diff --git a/etc/icinga2/features-available/command.conf b/etc/icinga2/features-available/command.conf index 35830560e..ffdd143a9 100644 --- a/etc/icinga2/features-available/command.conf +++ b/etc/icinga2/features-available/command.conf @@ -3,7 +3,5 @@ * commands pipe. */ -library "compat" - object ExternalCommandListener "command" { } diff --git a/etc/icinga2/features-available/compatlog.conf b/etc/icinga2/features-available/compatlog.conf index 58c5df716..6f5cf5f52 100644 --- a/etc/icinga2/features-available/compatlog.conf +++ b/etc/icinga2/features-available/compatlog.conf @@ -3,7 +3,5 @@ * that is compatible with Icinga 1.x. */ -library "compat" - object CompatLogger "compatlog" { } diff --git a/etc/icinga2/features-available/elasticsearch.conf b/etc/icinga2/features-available/elasticsearch.conf index 86a05a248..8014913a7 100644 --- a/etc/icinga2/features-available/elasticsearch.conf +++ b/etc/icinga2/features-available/elasticsearch.conf @@ -1,5 +1,3 @@ -library "perfdata" - object ElasticsearchWriter "elasticsearch" { //host = "127.0.0.1" //port = 9200 diff --git a/etc/icinga2/features-available/gelf.conf b/etc/icinga2/features-available/gelf.conf index 2db44ef7e..c14c86408 100644 --- a/etc/icinga2/features-available/gelf.conf +++ b/etc/icinga2/features-available/gelf.conf @@ -4,8 +4,6 @@ * Logstash or any other receiver. */ -library "perfdata" - object GelfWriter "gelf" { //host = "127.0.0.1" //port = 12201 diff --git a/etc/icinga2/features-available/graphite.conf b/etc/icinga2/features-available/graphite.conf index f2e59d9e8..ae8a9288f 100644 --- a/etc/icinga2/features-available/graphite.conf +++ b/etc/icinga2/features-available/graphite.conf @@ -3,8 +3,6 @@ * performance data to a graphite tcp socket. */ -library "perfdata" - object GraphiteWriter "graphite" { //host = "127.0.0.1" //port = 2003 diff --git a/etc/icinga2/features-available/ido-mysql.conf b/etc/icinga2/features-available/ido-mysql.conf index beab89f4c..7b44c23f2 100644 --- a/etc/icinga2/features-available/ido-mysql.conf +++ b/etc/icinga2/features-available/ido-mysql.conf @@ -1,10 +1,8 @@ /** - * The db_ido_mysql library implements IDO functionality - * for MySQL. + * The IdoMysqlConnection type implements MySQL support + * for DB IDO. */ -library "db_ido_mysql" - object IdoMysqlConnection "ido-mysql" { //user = "icinga" //password = "icinga" diff --git a/etc/icinga2/features-available/ido-pgsql.conf b/etc/icinga2/features-available/ido-pgsql.conf index 2a20afa9a..9f3c13297 100644 --- a/etc/icinga2/features-available/ido-pgsql.conf +++ b/etc/icinga2/features-available/ido-pgsql.conf @@ -1,10 +1,8 @@ /** - * The db_ido_pgsql library implements IDO functionality - * for PostgreSQL. + * The IdoPgsqlConnection type implements PostgreSQL support + * for DB IDO. */ -library "db_ido_pgsql" - object IdoPgsqlConnection "ido-pgsql" { //user = "icinga" //password = "icinga" diff --git a/etc/icinga2/features-available/influxdb.conf b/etc/icinga2/features-available/influxdb.conf index 20f9ed253..af8423577 100644 --- a/etc/icinga2/features-available/influxdb.conf +++ b/etc/icinga2/features-available/influxdb.conf @@ -3,8 +3,6 @@ * performance data to an InfluxDB HTTP API */ -library "perfdata" - object InfluxdbWriter "influxdb" { //host = "127.0.0.1" //port = 8086 diff --git a/etc/icinga2/features-available/livestatus.conf b/etc/icinga2/features-available/livestatus.conf index 45d44d6b9..246c085e3 100644 --- a/etc/icinga2/features-available/livestatus.conf +++ b/etc/icinga2/features-available/livestatus.conf @@ -1,8 +1,6 @@ /** - * The livestatus library implements the livestatus query protocol. + * The LivestatusListener type implements the Livestatus query protocol. */ -library "livestatus" - object LivestatusListener "livestatus" { } diff --git a/etc/icinga2/features-available/notification.conf b/etc/icinga2/features-available/notification.conf index aa22f6059..a3b59a841 100644 --- a/etc/icinga2/features-available/notification.conf +++ b/etc/icinga2/features-available/notification.conf @@ -2,6 +2,4 @@ * The notification component takes care of executing service checks. */ -library "notification" - object NotificationComponent "notification" { } diff --git a/etc/icinga2/features-available/opentsdb.conf b/etc/icinga2/features-available/opentsdb.conf index fcb547d01..540556c10 100644 --- a/etc/icinga2/features-available/opentsdb.conf +++ b/etc/icinga2/features-available/opentsdb.conf @@ -3,8 +3,6 @@ * performance data to a OpenTSDB tcp socket. */ -library "perfdata" - object OpenTsdbWriter "opentsdb" { //host = "127.0.0.1" //port = 4242 diff --git a/etc/icinga2/features-available/perfdata.conf b/etc/icinga2/features-available/perfdata.conf index 356431f37..3ba863540 100644 --- a/etc/icinga2/features-available/perfdata.conf +++ b/etc/icinga2/features-available/perfdata.conf @@ -3,6 +3,4 @@ * them in a regular interval. */ -library "perfdata" - object PerfdataWriter "perfdata" { } diff --git a/etc/icinga2/features-available/statusdata.conf b/etc/icinga2/features-available/statusdata.conf index af02aa521..bb81c9617 100644 --- a/etc/icinga2/features-available/statusdata.conf +++ b/etc/icinga2/features-available/statusdata.conf @@ -4,7 +4,5 @@ * hosts and services. */ -library "compat" - object StatusDataWriter "status" { } -- 2.40.0