Skip to content

Commit e930954

Browse files
committed
Add docs
1 parent 433d445 commit e930954

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed

doc/01-About.md

+2
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ each connecting to a different cluster but writing data into the same database.
2929
The web interface accesses this database to display resource information and state,
3030
offering the flexibility to view aggregated data from all clusters or focus on a specific cluster.
3131
This setup ensures scalable monitoring and a unified view of resources across multiple Kubernetes environments.
32+
To monitor multiple clusters you have to
33+
[run multiple service instances of Icinga for Kubernetes](03-Configuration.md#multiple-clusters).
3234

3335
## Vision and Roadmap
3436

doc/03-Configuration.md

+40
Original file line numberDiff line numberDiff line change
@@ -97,3 +97,43 @@ The configurations set by environment variables override the ones set by YAML.
9797
| PROMETHEUS_URL | **Optional.** Prometheus server URL. If not set, metric synchronization is disabled. |
9898
| PROMETHEUS_USERNAME | **Optional.** Prometheus username. |
9999
| PROMETHEUS_PASSWORD | **Optional.** Prometheus password. |
100+
101+
## Multiple Clusters
102+
103+
### Systemd
104+
105+
If you are running Icinga for Kubernetes with systemd, you have to follow these steps.
106+
107+
#### Create Instance
108+
109+
1. Create a new or edit the provided `default.env` file in `/etc/icinga-kubernetes`.
110+
The file name will be the instance name for the systemd service. For example `test-cluster.env` will
111+
start the service `icinga-kubernetes@test-cluster`.
112+
2. Set the `KUBECONFIG` env to configure how Icinga for Kubernetes can connect to the cluster.
113+
3. Set the `ICINGA_FOR_KUBERNETES_CLUSTER_NAME` env to configure the cluster name. If the env is not set
114+
the cluster name will be the .env file name.
115+
4. You can add additional envs to override the `config.yml` (look above to see more information about available envs).
116+
5. Reload the systemd daemon with `systemctl daemon-reload` to recognize the new cluster configs.
117+
6. Restart the Icinga for Kubernetes service with `systemctl restart icinga-kubernetes`.
118+
119+
An example `test-cluster.env` file could look like this:
120+
```bash
121+
KUBECONFIG=/home/user/.kube/config
122+
ICINGA_FOR_KUBERNETES_CLUSTER_NAME="Test Cluster"
123+
ICINGA_FOR_KUBERNETES_PROMETHEUS_URL=http://localhost:9090
124+
```
125+
126+
#### Remove Instance
127+
128+
1. Remove the corresponding file from `/etc/icinga-kubernetes`.
129+
2. Reload the systemd daemon with `systemctl daemon-reload` to make sure the daemon forgets the file.
130+
3. Stop the service instance manually. For `test-cluster` it would be `systemctl stop icinga-kubernetes@test-cluster`.
131+
132+
!!! Warning
133+
134+
If you stop the service without removing the env file, the instance will restart when the service is restarted.
135+
136+
!!! Warning
137+
138+
If you remove the env file without stopping the instance, the instance will try to restart and
139+
fail when the service is restarted.

0 commit comments

Comments
 (0)