Commit Graph

370 Commits

Author SHA1 Message Date
Markus Frosch 9fbc40615a Improve path handling in cmake and daemon 2018-08-07 14:10:26 +02:00
Jean Flach 383ca5011c Load functions first
refs 
2018-07-18 13:36:37 +02:00
Jean Flach 92056c592e Use . instead of source
fixes 
2018-07-18 13:35:27 +02:00
Michael Friedrich c4c6f2064d Revert "Fix obsolete parameter in Systemd script"
This reverts commit 592fb22c7f.

We have the problem that Systemd doesn't expand shell variables
into our environment.

During the upgrade cycle this would maybe render a wrong PID file
location, thus resulting in wrong 'safe-reload' behaviour.

This is only for a clean upgrade path from 2.8.x to 2.9.0,
the proper fix is to ensure that the sysconfig file is empty
and keep our own defaults, or modified from the user.

refs 
2018-07-17 14:10:26 +02:00
Jean Flach 44fae88d43 Update sysconfig read 2018-06-18 10:27:35 +02:00
Jean Flach 2b5ea38217 Fix sysconfig not bein handled correctly by sysvinit 2018-06-15 17:04:28 +02:00
Michael Friedrich 2dafcfa8a9 prepare-dirs: Ensure to always set proper run directory permissions
refs 
2018-06-06 14:32:26 +02:00
Michael Friedrich 592fb22c7f Fix obsolete parameter in Systemd script
refs 
2018-06-05 14:03:39 +02:00
Jean Flach ed4e008e79 Rework sysconfig file
The sysconfig file now only contains the defaults as comments, changes
made there are given to the init.d script, prepare-dirs, safe-reload and
Icinga 2 itself. If nothing is set in the sysconfig file (as is the
default as all lines are commented out) the defaults are used.

fixes 
2018-05-23 15:18:42 +02:00
Michael Friedrich 69f339d229
Merge pull request from Icinga/fix/notification-script-check-required-parameters
Implement better way to check parameters in notification scripts
2018-05-03 15:36:59 +02:00
Michael Friedrich a45dba15d3 Fix SysconfigFile detection for binary builds
It may happen that the variable is not properly initialized
and we'll have an empty string. Observed on macOS and inside
Docker.

refs 
2018-04-19 08:55:05 +02:00
Michael Insel 12a40d7244 Implement better way to check parameters in notification scripts
This changes the function for checking required parameters in the notification scripts.
This also enhances the error message.

refs 
2018-04-18 19:17:33 +02:00
Jean Flach ba882079be Don't use shell variables in sysconfig
fixes 
2018-04-13 13:03:12 +02:00
Max Rosin b34675cae8 Fix description of the NotificationComponent in notification.conf, fix 2018-02-27 14:31:00 +01:00
Jean Flach f7ec97abd8 Fix typo in prepare-dirs
refs 
2018-02-23 14:22:02 +01:00
Jean Flach 87adc88989 Remove need for init.conf 2018-02-20 14:16:43 +01:00
Jean Flach c8c193a9d8 Remove need for RunAsUser/Group
They are now read form the sysconfig file which is owned by root
2018-02-20 14:16:43 +01:00
Jean Flach 6ae376b7fd Add cli tool to send signals as Icinga user
fixes 
2018-02-20 14:16:43 +01:00
Jean Flach ba41d7f249 Get ICINGA2_USER and GROUP from sysconfig 2018-02-20 14:16:43 +01:00
Jean Flach 88f77f9f8d Fix prepare-dirs permission exploit
refs 
2018-02-20 14:16:43 +01:00
Dirk Goetz 87f8ca5b79 Fixed URL encoding for HOSTNAME and SERVICENAME in mail notification
Refs 
2018-02-20 14:16:43 +01:00
Gunnar Beutner 6506a89db3 Update default config and documentation for the "library" keyword 2018-01-22 08:18:05 +01:00
Jean Flach c418a9611e Add systemd watchdog and adjust reload behaviour 2018-01-19 16:52:36 +01:00
Jean Flach 1da6b2c883 Fix whitespaces in CMakeLists files
Uses 2 space indentation as standard
2018-01-19 09:19:40 +01:00
Michael Insel 158ae2188e Change copyright header for 2018 2018-01-02 12:08:55 +01:00
Gunnar Beutner b3b707aba0 Enable installing the init scripts on Solaris 2017-12-20 08:44:06 +01:00
Michael Friedrich 3673bd2201 Fix default configuration example for ElasticsearchWriter 2017-11-15 18:06:52 +01:00
Michael Friedrich 7c0a09cfb6 Rename ElasticWriter to ElasticsearchWriter
This better reflects its purpose as otherwise it would imply
that you need Elastic Stack for it. Graylog also reads from
Elasticsearch instances, this could serve as additional integration
here.
2017-11-09 15:33:10 +01:00
Gunnar Beutner f2d437e96c Implement support for migrating certificates to /var/lib/icinga2/certs
This commit includes documentation too.

Signed-off-by: Michael Friedrich <michael.friedrich@icinga.com>
2017-10-20 14:06:02 +02:00
Michael Friedrich 2d8607d6b0 Enhance documentation with more details on value types for object attributes
Main focus: Object attributes and their value types. Originates from the
API Event Streams patch to document their value types. Now applied to
the entire configuration objects chapter.

The API chapter and their value types has been changed to capitalized
type identifiers.

Value types are now explicitly told about inside monitoring basics. This
has been adopted into the Icinga 2 training material a long time ago
and finds its way into the docs too.

The CheckResult and PerfdataValue value types have been moved into the
advanced topics chapter. mkdocs doesn't like multiple `#` headings in one file
and did just hide it.

Also moved the Influxdb details into the features documentation where it
belongs.

Many small references and URLs to other chapters added.
E.g. dedicated chapters for object accessor examples, to better link against
time dependent thresholds.

Can serve as patch basis and reference for ITL documentation where the
value types are missing too.

This commit also fixes the non-requirement of "legacy-timeperiod" which
also is a default template import since 2.6.

This also fixes the state mapping issue.

fixes 
2017-10-10 17:52:49 +02:00
Markus Frosch c90dc34edb Improve documentation and Systemd config for TasksMax setting
This also disables setting a value by default.

Packaging should decide to install the config file:
`/etc/systemd/system/icinga2.service.d`

fixes 

Signed-off-by: Michael Friedrich <michael.friedrich@icinga.com>
2017-09-29 17:34:32 +02:00
Michael Friedrich 953d840cc1 Fix certificate paths for installers
refs 
2017-09-22 15:00:45 +02:00
Michael Friedrich 16c0fc4177 Drop satellite.conf reference for bottom-up
refs 
2017-09-22 14:28:55 +02:00
Michael Friedrich cfd2a93aa6 Remove bottom-up repository.d references
refs 
2017-09-22 14:04:59 +02:00
Michael Friedrich 6ab38b6c15 Remove deprecated Classic UI configuration package
refs 
2017-09-22 12:26:59 +02:00
Michael Friedrich 086e24f28a Ensure that the cache directory always is set and add a note to upgrading docs
Thanks @dgoetz
2017-09-22 09:31:42 +02:00
Michael Friedrich 37ea6ab1fc Fix wrong certs path in ApiListener config
refs 
2017-09-12 12:52:49 +02:00
Gunnar Beutner b08f5477dc Change PKI path from /etc/icinga2/pki to /var/lib/icinga2/pki
refs 
2017-09-12 12:52:49 +02:00
Jean Flach e19d3f57c7 Add ElasticWriter
fixes 
2017-09-12 12:52:49 +02:00
Michael e2bf7516bb Notification scripts: Fix duplicate variable in mail-{host,service}-notification 2017-08-14 17:34:39 +02:00
Christian Gut 0f0b6f1df9 Notification scripts: More readable & redundancy cleanup 2017-08-14 17:27:39 +02:00
Michael Friedrich f0fbcbba5b Update documentation for optional arguments and add old updated command config
See https://www.icinga.com/docs/icinga2/latest/doc/03-monitoring-basics/#notification-commands-in-27

refs 
2017-08-14 17:11:57 +02:00
pv2b 7dabf2fe93 Notification scripts: Make the `-4` parameter optional
Not all hosts may have the `address` attribute set, or just use
`address6` instead.

refs 
2017-08-14 17:11:57 +02:00
Michael Friedrich e188686ed4 Merge pull request from ekohl/cache-dir
Ensure the cache directory exists
2017-08-09 18:22:07 +02:00
Michael Friedrich 874e005284 Systemd: Add DefaultTasksMax=infinity to service file
This solves the problem with Systemd >= 226 and fork errors with
Icinga 2. Seen on SLES 11 SP2.

fixes 
2017-08-08 16:11:40 +02:00
Ewoud Kohl van Wijngaarden e83c43435d
Ensure the cache directory exists
As suggested in https://github.com/Icinga/icinga2/issues/4414
2017-07-01 13:59:58 +02:00
Michael Friedrich 6397fedc3d Remove experimental redis feature before 2.7 release 2017-06-20 11:52:24 +02:00
Michael Friedrich f5d3428563 Notification Scripts: Ensure that mail from address works on Debian/RHEL/SUSE (mailutils vs mailx)
fixes 
2017-06-16 20:54:24 +02:00
Marianne Spiller 8f670fd96a notification_type mandatory
Make $notification_type$ mandatory in mail-service-notification, too.
2017-06-07 09:54:30 +02:00
Michael Friedrich 1e153f14d7 zones.conf: Add global-templates & director-global by default
This makes it easier for cluster and client setups with or
without the Icinga Director.

Note: Clients will still not receive synced configuration if
accept_config is not enabled (which is the default, and can be changed
during setup).

fixes 
2017-06-02 10:54:35 +02:00