Skip to content

Commit

Permalink
fix #576 New HA-aware Features
Browse files Browse the repository at this point in the history
  • Loading branch information
lbetz committed Jul 26, 2019
1 parent ca29a9d commit 27c1b9e
Show file tree
Hide file tree
Showing 7 changed files with 57 additions and 8 deletions.
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1181,6 +1181,10 @@ OpenTSDB host address. Icinga defaults to `127.0.0.1`
##### `port`
OpenTSDB port. Icinga defaults to `4242`

##### `enable_ha`
Enable the high availability functionality. Only valid in a cluster setup. Icinga defaults to false.


#### Class: `icinga2::feature::perfdata`
Enables or disables the `perfdata` feature.

Expand Down Expand Up @@ -1219,6 +1223,10 @@ Service Format template for the performance data file. Icinga defaults to a temp
Rotation interval for the files specified in `{host,service}_perfdata_path`. Can be written in minutes or seconds,
i.e. `1m` or `15s`. Icinga defaults to `30s`

##### `enable_ha`
Enable the high availability functionality. Only valid in a cluster setup. Icinga defaults to false.


#### Class: `icinga2::feature::statusdata`
Enables or disables the `statusdata` feature. The feature is deprecated and will be removed in Icinga 2 2.11.0.

Expand Down Expand Up @@ -1341,6 +1349,9 @@ How long to buffer data points before transferring to Elasticsearch. Icinga defa
##### `flush_threshold`
How many data points to buffer before forcing a transfer to Elasticsearch. Icinga defaults to `1024`

##### `enable_ha`
Enable the high availability functionality. Only valid in a cluster setup. Icinga defaults to false.


#### Class: `icinga2::feature::gelf`
Enables or disables the `gelf` feature.
Expand All @@ -1362,6 +1373,10 @@ Source name for this instance. Icinga defaults to `icinga2`
##### `enable_send_perfdata`
Enable performance data for *CHECK RESULT* events. Icinga defaults to `false`.

##### `enable_ha`
Enable the high availability functionality. Only valid in a cluster setup. Icinga defaults to false.


#### Class: `icinga2::feature::influxdb`
Enables or disables the `influxdb` feature.

Expand Down Expand Up @@ -1435,6 +1450,9 @@ How long to buffer data points before transferring to InfluxDB. Icinga defaults
##### `flush_threshold`
How many data points to buffer before forcing a transfer to InfluxDB. Icinga defaults to `1024`.

##### `enable_ha`
Enable the high availability functionality. Only valid in a cluster setup. Icinga defaults to false.


#### Class: `icinga2::feature::api`
Enables or disables the `api` feature.
Expand Down
11 changes: 8 additions & 3 deletions manifests/feature/elasticsearch.pp
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,16 @@
# C:/ProgramData/icinga2/var/lib/icinga2/certs/ElasticsearchWriter_elasticsearch_ca.crt on Windows
#
# [*enable_send_perfdata*]
# Whether to send check performance data metrics. Icinga defaults to 'false'.
# Whether to send check performance data metrics. Icinga defaults to 'false'.
#
# [*flush_interval*]
# How long to buffer data points before transferring to Elasticsearch. Icinga defaults to '10s'.
# How long to buffer data points before transferring to Elasticsearch. Icinga defaults to '10s'.
#
# [*flush_threshold*]
# How many data points to buffer before forcing a transfer to Elasticsearch. Icinga defaults to '1024'.
# How many data points to buffer before forcing a transfer to Elasticsearch. Icinga defaults to '1024'.
#
# [*enable_ha*]
# Enable the high availability functionality. Only valid in a cluster setup. Icinga defaults to false.
#
# === Example
#
Expand All @@ -87,6 +90,7 @@
Optional[Boolean] $enable_send_perfdata = undef,
Optional[Icinga2::Interval] $flush_interval = undef,
Optional[Integer] $flush_threshold = undef,
Optional[Boolean] $enable_ha = undef,
) {

if ! defined(Class['::icinga2']) {
Expand Down Expand Up @@ -199,6 +203,7 @@
enable_send_perfdata => $enable_send_perfdata,
flush_interval => $flush_interval,
flush_threshold => $flush_threshold,
enable_ha => $enable_ha,
}

# create object
Expand Down
5 changes: 5 additions & 0 deletions manifests/feature/gelf.pp
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,17 @@
# [*enable_send_perfdata*]
# Enable performance data for 'CHECK RESULT' events. Icinga defaults to false.
#
# [*enable_ha*]
# Enable the high availability functionality. Only valid in a cluster setup. Icinga defaults to false.
#
#
class icinga2::feature::gelf(
Enum['absent', 'present'] $ensure = present,
Optional[Stdlib::Host] $host = undef,
Optional[Stdlib::Port::Unprivileged] $port = undef,
Optional[String] $source = undef,
Optional[Boolean] $enable_send_perfdata = undef,
Optional[Boolean] $enable_ha = undef,
) {

if ! defined(Class['::icinga2']) {
Expand All @@ -44,6 +48,7 @@
port => $port,
source => $source,
enable_send_perfdata => $enable_send_perfdata,
enable_ha => $enable_ha,
}

# create object
Expand Down
5 changes: 5 additions & 0 deletions manifests/feature/graphite.pp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
# [*enable_send_metadata*]
# Send metadata as metrics. Icinga defaults to false.
#
# [*enable_ha*]
# Enable the high availability functionality. Only valid in a cluster setup. Icinga defaults to false.
#
#
class icinga2::feature::graphite(
Enum['absent', 'present'] $ensure = present,
Expand All @@ -36,6 +39,7 @@
Optional[String] $service_name_template = undef,
Optional[Boolean] $enable_send_thresholds = undef,
Optional[Boolean] $enable_send_metadata = undef,
Optional[Boolean] $enable_ha = undef,
) {

if ! defined(Class['::icinga2']) {
Expand All @@ -56,6 +60,7 @@
service_name_template => $service_name_template,
enable_send_thresholds => $enable_send_thresholds,
enable_send_metadata => $enable_send_metadata,
enable_ha => $enable_ha,
}

# create object
Expand Down
6 changes: 6 additions & 0 deletions manifests/feature/influxdb.pp
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@
# [*flush_threshold*]
# How many data points to buffer before forcing a transfer to InfluxDB. Icinga defaults to '1024'.
#
# # [*enable_ha*]
# Enable the high availability functionality. Only valid in a cluster setup. Icinga defaults to false.
#
#
# === Example
#
# class { 'icinga2::feature::influxdb':
Expand Down Expand Up @@ -109,6 +113,7 @@
Optional[Boolean] $enable_send_metadata = undef,
Optional[Icinga2::Interval] $flush_interval = undef,
Optional[Integer[1]] $flush_threshold = undef,
Optional[Boolean] $enable_ha = undef,
) {

if ! defined(Class['::icinga2']) {
Expand Down Expand Up @@ -226,6 +231,7 @@
enable_send_metadata => $enable_send_metadata,
flush_interval => $flush_interval,
flush_threshold => $flush_threshold,
enable_ha => $enable_ha,
}

# create object
Expand Down
15 changes: 10 additions & 5 deletions manifests/feature/opentsdb.pp
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,15 @@
# [*port*]
# OpenTSDB port. Icinga defaults to 4242.
#
# [*enable_ha*]
# Enable the high availability functionality. Only valid in a cluster setup. Icinga defaults to false.
#
#
class icinga2::feature::opentsdb(
Enum['absent', 'present'] $ensure = present,
Optional[Stdlib::Host] $host = undef,
Optional[Stdlib::Port::Unprivileged] $port = undef,
Enum['absent', 'present'] $ensure = present,
Optional[Stdlib::Host] $host = undef,
Optional[Stdlib::Port::Unprivileged] $port = undef,
Optional[Boolean] $enable_ha = undef,
) {

if ! defined(Class['::icinga2']) {
Expand All @@ -32,8 +36,9 @@

# compose attributes
$attrs = {
host => $host,
port => $port,
host => $host,
port => $port,
enable_ha => $enable_ha,
}

# create object
Expand Down
5 changes: 5 additions & 0 deletions manifests/feature/perfdata.pp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@
# Rotation interval for the files specified in {host,service}_perfdata_path. Can be written in minutes or seconds,
# i.e. 1m or 15s. Icinga defaults to 30s.
#
# [*enable_ha*]
# Enable the high availability functionality. Only valid in a cluster setup. Icinga defaults to false.
#
#
class icinga2::feature::perfdata(
Enum['absent', 'present'] $ensure = present,
Expand All @@ -49,6 +52,7 @@
Optional[String] $host_format_template = undef,
Optional[String] $service_format_template = undef,
Optional[Icinga2::Interval] $rotation_interval = undef,
Optional[Boolean] $enable_ha = undef,
) {

if ! defined(Class['::icinga2']) {
Expand All @@ -70,6 +74,7 @@
host_format_template => $host_format_template,
service_format_template => $service_format_template,
rotation_interval => $rotation_interval,
enable_ha => $enable_ha,
}

# create object
Expand Down

0 comments on commit 27c1b9e

Please sign in to comment.