1
- # Configuration
1
+ # Configuration via YAML File
2
2
3
3
The configuration is stored in ` /etc/icinga-kubernetes/config.yml ` .
4
4
See [ config.example.yml] ( ../config.example.yml ) for an example configuration.
@@ -9,27 +9,93 @@ Connection configuration for the database to which Icinga for Kubernetes synchro
9
9
This is also the database used in
10
10
[ Icinga for Kubernetes Web] ( https://icinga.com/docs/icinga-kubernetes-web ) to view and work with the data.
11
11
12
- | Option | Description |
13
- | ----------| --------------------------------------------------------------------|
14
- | type | ** Optional.** Only ` mysql ` is supported yet which is the default. |
15
- | host | ** Required.** Database host or absolute Unix socket path. |
16
- | port | ** Optional.** Database port. By default, the MySQL port. |
17
- | database | ** Required.** Database name. |
18
- | user | ** Required.** Database username. |
19
- | password | ** Optional.** Database password. |
20
- | tls | ** Optional.** Whether to use TLS. |
21
- | cert | ** Optional.** Path to TLS client certificate. |
22
- | key | ** Optional.** Path to TLS private key. |
23
- | ca | ** Optional.** Path to TLS CA certificate. |
24
- | insecure | ** Optional.** Whether not to verify the peer. |
12
+ | Option | Description |
13
+ | ----------| -------------------------------------------------------------------|
14
+ | type | ** Optional.** Only ` mysql ` is supported yet which is the default. |
15
+ | host | ** Required.** Database host or absolute Unix socket path. |
16
+ | port | ** Optional.** Database port. By default, the MySQL port. |
17
+ | database | ** Required.** Database name. |
18
+ | user | ** Required.** Database username. |
19
+ | password | ** Optional.** Database password. |
20
+ | tls | ** Optional.** Whether to use TLS. |
21
+ | cert | ** Optional.** Path to TLS client certificate. |
22
+ | key | ** Optional.** Path to TLS private key. |
23
+ | ca | ** Optional.** Path to TLS CA certificate. |
24
+ | insecure | ** Optional.** Whether not to verify the peer. |
25
+
26
+ ## Logging Configuration
27
+
28
+ | Env | Description |
29
+ | ----------| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
30
+ | level | ** Optional.** Default logging level. Can be set to ` fatal ` , ` error ` , ` warn ` , ` info ` or ` debug ` . If not set, defaults to ` info ` . |
31
+ | output | ** Optional.** Logging output. Can be set to ` console ` (stderr) or ` systemd-journald ` . If not set, logs to systemd-journald when running under systemd, otherwise stderr. |
32
+ | interval | ** Optional.** Interval for periodic logging defined as duration string. Valid units are ` ms ` , ` s ` , ` m ` , ` h ` . Defaults to ` 20s ` . |
33
+
34
+ ## Notifications Configuration
35
+
36
+ Connection configuration for [ Icinga Notifications] ( https://github.com/icinga/icinga-notifications ) daemon.
37
+ If one of ` url ` , ` username ` , or ` password ` is set, ** all** must be set.
38
+ Defined in the ` notifications ` section of the configuration file.
39
+
40
+ | Option | Description |
41
+ | --------------------| -------------------------------------------------------------------------------------------------------|
42
+ | url | ** Optional.** Icinga Notifications daemon URL. If not set, notifications are disabled |
43
+ | username | ** Optional.** Username for authenticating the Icinga for Kubernetes source in Icinga Notifications. |
44
+ | password | ** Optional.** Password for authenticating the Icinga for Kubernetes source in Icinga Notifications. |
45
+ | kubernetes_web_url | ** Optional.** The base URL of Icinga for Kubernetes Web used in generated Icinga Notification events. |
25
46
26
47
## Prometheus Configuration
27
48
28
49
Connection configuration for a Prometheus instance that collects metrics from your Kubernetes cluster,
29
50
from which Icinga for Kubernetes [ synchronizes predefined metrics] ( 01-About.md#metric-sync ) to display charts in the UI.
30
- Defined in the ` prometheus ` section of the configuration file.
51
+ Defined in the ` prometheus ` section of the configuration file. If one of username or password is set, both must be set.
31
52
32
53
| Option | Description |
33
54
| ----------| ----------------------------------------------------------------------------------------------------------------------------|
34
55
| url | ** Optional.** Prometheus server URL. If not set, metric synchronization is disabled. |
35
56
| insecure | ** Optional.** Skip the TLS/SSL certificate verification. Can be set to 'true' or 'false'. If not set, defaults to 'false'. |
57
+ | username | ** Optional.** Prometheus username. |
58
+ | password | ** Optional.** Prometheus password. |
59
+
60
+ # Configuration via Environment Variables
61
+
62
+ ** All** environment variables are prefixed with ` ICINGA_FOR_KUBERNETES_ ` .
63
+ The database type would therefore be ` ICINGA_FOR_KUBERNETES_DATABASE_TYPE ` .
64
+ The configurations set by environment variables override the ones set by YAML.
65
+
66
+ ## Database Configuration
67
+
68
+ | Env | Description |
69
+ | -------------------| -------------------------------------------------------------------|
70
+ | DATABASE_TYPE | ** Optional.** Only ` mysql ` is supported yet which is the default. |
71
+ | DATABASE_HOST | ** Required.** Database host or absolute Unix socket path. |
72
+ | DATABASE_PORT | ** Optional.** Database port. By default, the MySQL port. |
73
+ | DATABASE_DATABASE | ** Required.** Database name. |
74
+ | DATABASE_USER | ** Required.** Database username. |
75
+ | DATABASE_PASSWORD | ** Optional.** Database password. |
76
+
77
+ ## Logging Configuration
78
+
79
+ | Env | Description |
80
+ | ------------------| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
81
+ | LOGGING_LEVEL | ** Optional.** Default logging level. Can be set to ` fatal ` , ` error ` , ` warn ` , ` info ` or ` debug ` . If not set, defaults to ` info ` . |
82
+ | LOGGING_OUTPUT | ** Optional.** Logging output. Can be set to ` console ` (stderr) or ` systemd-journald ` . If not set, logs to systemd-journald when running under systemd, otherwise stderr. |
83
+ | LOGGING_INTERVAL | ** Optional.** Interval for periodic logging defined as duration string. Valid units are ` ms ` , ` s ` , ` m ` , ` h ` . Defaults to ` 20s ` . |
84
+
85
+ ## Notifications Configuration
86
+
87
+ | Env | Description |
88
+ | ----------------------------------| -------------------------------------------------------------------------------------------------------|
89
+ | NOTIFICATIONS_URL | ** Optional.** Icinga Notifications daemon URL. If not set, notifications are disabled |
90
+ | NOTIFICATIONS_USERNAME | ** Optional.** Username for authenticating the Icinga for Kubernetes source in Icinga Notifications. |
91
+ | NOTIFICATIONS_PASSWORD | ** Optional.** Password for authenticating the Icinga for Kubernetes source in Icinga Notifications. |
92
+ | NOTIFICATIONS_KUBERNETES_WEB_URL | ** Optional.** The base URL of Icinga for Kubernetes Web used in generated Icinga Notification events. |
93
+
94
+ ## Prometheus Configuration
95
+
96
+ | Env | Description |
97
+ | ---------------------| ----------------------------------------------------------------------------------------------------------------------------|
98
+ | PROMETHEUS_URL | ** Optional.** Prometheus server URL. If not set, metric synchronization is disabled. |
99
+ | PROMETHEUS_INSECURE | ** Optional.** Skip the TLS/SSL certificate verification. Can be set to 'true' or 'false'. If not set, defaults to 'false'. |
100
+ | PROMETHEUS_USERNAME | ** Optional.** Prometheus username. |
101
+ | PROMETHEUS_PASSWORD | ** Optional.** Prometheus password. |
0 commit comments