Skip to content

Commit 9136830

Browse files
authored
Merge pull request #5 from gyselroth/dev
v2.0.0
2 parents f6371de + e5dcc57 commit 9136830

23 files changed

+4644
-1483
lines changed

CHANGELOG.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,27 @@
1+
## 2.0.0
2+
**Maintainer**: Raffael Sahli <sahli@gyselroth.com>\
3+
**Date**: Thur 14 Feb 2019 14:28:20 PM ET
4+
5+
* [FIX] Fixes "(node:25116) UnhandledPromiseRejectionWarning: TypeError: result is not iterable" due error response from icinga
6+
* [FIX] Better error handling and catching various uncaught promises
7+
* [FIX] Docs fix regaring how to create icinga2 api user
8+
* [CHANGE] Upgrade to winston ^3.0.0 stable
9+
* [CHANGE] Log format is now in json and includes a timestamp
10+
* [FIX] Service protocol is now lower cases which fixes issues like check_command=TCP insteadof check_command=tcp
11+
* [FIX] Fixes icinga api username is now correctly read from ICINGA_API_USERNAME as documented (instead ICINGA_API_USER)
12+
* [FEATURE] Add support for service/host definitions in kubernetes annotations #1
13+
* [BREAKER!] Removed service.portNameAsCommand option, use kubernetes annotations
14+
* [FEATURE] Discover persistent volumes and create icinga services for those #4
15+
* [FIX] Fixed typo Definiton => Definition in default config example
16+
* [CHANGE] Added various new tests
17+
* [FIX] kube workes are in no namespace, remove icinga groups
18+
* [FIX] fixed Error: Invalid attribute specified: host_name\n for kube nodes
19+
* [FIX] fixed duplicate ingress objects (different path, same ingress names in different namespaces, ...)
20+
* [CHANGE] Added hostName setting, by default all resources (except nodes) get attached to single host object of their type (can be configured differently)
21+
* [CHANGE] Implemented workaround for icinga issue https://github.com/Icinga/icinga2/issues/6012, restart icinga service after adding new objects
22+
* [FIX] Changing boolean values in config.json now reflects as configured (Set to false was not possible in v1.x)
23+
24+
125
## 1.0.1
226
**Maintainer**: Raffael Sahli <sahli@gyselroth.com>\
327
**Date**: Fri 01 Jun 2018 01:18:20 PM CEST
@@ -6,6 +30,7 @@
630
* [CHANGE] config logger.level => log.level
731
* [FIX] catch error objects from kube watchers
832

33+
934
## 1.0.0
1035
**Maintainer**: Raffael Sahli <sahli@gyselroth.com>\
1136
**Date**: Thu May 24 14:52:11 CEST 2018

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:8.10.0-alpine
1+
FROM node:10.15.1-alpine
22

33
RUN apk update && apk add git
44

README.md

Lines changed: 164 additions & 63 deletions
Large diffs are not rendered by default.

config.json

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
},
55
"cleanup": true,
66
"icinga": {
7-
"address": "",
7+
"address": "127.0.0.1",
88
"port": 5665,
9-
"apiUser": "",
10-
"apiPassword": ""
9+
"apiUser": "kube-icinga",
10+
"apiPassword": "kube-icinga"
1111
},
1212
"kubernetes": {
1313
"nodes": {
@@ -17,7 +17,18 @@
1717
},
1818
"ingresses": {
1919
"discover": true,
20-
"serviceDefiniton": {},
20+
"hostName": "kubernetes-ingresses",
21+
"serviceDefinition": {},
22+
"hostDefinition": {},
23+
"serviceTemplates": ["generic-service"],
24+
"hostTemplates": ["generic-host"],
25+
"applyServices": true,
26+
"attachToNodes": false
27+
},
28+
"volumes": {
29+
"discover": true,
30+
"hostName": "kubernetes-volumes",
31+
"serviceDefinition": {},
2132
"hostDefinition": {},
2233
"serviceTemplates": ["generic-service"],
2334
"hostTemplates": ["generic-host"],
@@ -27,30 +38,31 @@
2738
"services": {
2839
"ClusterIP": {
2940
"discover": false,
41+
"hostName": "kubernetes-clusterip-services",
42+
"serviceDefinition": {},
3043
"hostDefinition": {},
3144
"serviceTemplates": ["generic-service"],
3245
"hostTemplates": ["generic-host"],
33-
"applyServices": false,
34-
"portNameAsCommand": true
46+
"applyServices": true
3547
},
3648
"NodePort": {
3749
"discover": true,
38-
"serviceDefiniton": {},
50+
"hostName": "kubernetes-nodeport-services",
51+
"serviceDefinition": {},
3952
"hostDefinition": {},
4053
"serviceTemplates": ["generic-service"],
4154
"hostTemplates": ["generic-host"],
42-
"applyServices": false,
43-
"portNameAsCommand": true,
55+
"applyServices": true,
4456
"attachToNodes": false
4557
},
4658
"LoadBalancer": {
4759
"discover": true,
48-
"serviceDefiniton": {},
60+
"hostName": "kubernetes-loadbalancer-services",
61+
"serviceDefinition": {},
4962
"hostDefinition": {},
5063
"serviceTemplates": ["generic-service"],
5164
"hostTemplates": ["generic-host"],
52-
"applyServices": false,
53-
"portNameAsCommand": true
65+
"applyServices": true
5466
}
5567
}
5668
}

docker-compose-dev.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
version: '2'
2+
services:
3+
icinga2:
4+
image: jordan/icinga2
5+
restart: on-failure:5
6+
# Set your hostname to the FQDN under which your
7+
# sattelites will reach this container
8+
hostname: icinga2
9+
environment:
10+
- MYSQL_ROOT_PASSWORD=<password>
11+
- ICINGA2_FEATURE_GRAPHITE=1
12+
# Important:
13+
# keep the hostname graphite the same as
14+
# the name of the graphite docker-container
15+
- ICINGA2_FEATURE_GRAPHITE_HOST=graphite
16+
- ICINGA2_FEATURE_GRAPHITE_PORT=2003
17+
- ICINGA2_FEATURE_GRAPHITE_URL=http://graphite
18+
#- ICINGAWEB2_ADMIN_USER=icingaadmin
19+
#- ICINGAWEB2_ADMIN_PASS=icinga
20+
#- ICINGA2_USER_FULLNAME=Icinga2 Docker Monitoring Instance
21+
- DEFAULT_MYSQL_HOST=mysql
22+
volumes:
23+
- ./data/icinga/cache:/var/cache/icinga2
24+
- ./data/icinga/certs:/etc/apache2/ssl
25+
- ./data/icinga/etc/icinga2:/etc/icinga2
26+
- ./data/icinga/etc/icingaweb2:/etc/icingaweb2
27+
- ./data/icinga/lib/icinga:/var/lib/icinga2
28+
- ./data/icinga/lib/php/sessions:/var/lib/php/sessions
29+
- ./data/icinga/log/apache2:/var/log/apache2
30+
- ./data/icinga/log/icinga2:/var/log/icinga2
31+
- ./data/icinga/log/icingaweb2:/var/log/icingaweb2
32+
- ./data/icinga/log/mysql:/var/log/mysql
33+
- ./data/icinga/spool:/var/spool/icinga2
34+
# If you want to enable outbound e-mail, create the files
35+
# - ./ssmtp/ssmtp.conf
36+
# - ./ssmtp/revaliases
37+
# and configure to your corresponding mail setup.
38+
# See: https://github.com/jjethwa/icinga2#sending-notification-mails
39+
#- ./ssmtp/revaliases:/etc/ssmtp/revaliases:ro
40+
#- ./ssmtp/ssmtp.conf:/etc/ssmtp/ssmtp.conf:ro
41+
ports:
42+
- "80:80"
43+
- "443:443"
44+
- "5665:5665"
45+
graphite:
46+
image: graphiteapp/graphite-statsd:latest
47+
container_name: graphite
48+
restart: on-failure:5
49+
hostname: graphite
50+
volumes:
51+
- ./data/graphite/conf:/opt/graphite/conf
52+
- ./data/graphite/storage:/opt/graphite/storage
53+
- ./data/graphite/log/graphite:/var/log/graphite
54+
- ./data/graphite/log/carbon:/var/log/carbon
55+
mysql:
56+
image: mariadb:10.1
57+
environment:
58+
- MYSQL_ROOT_PASSWORD=<password>
59+
volumes:
60+
- ./data/mysql/data:/var/lib/mysql
61+
# If you have previously used the container's internal DB use:
62+
#- ./data/icinga/lib/mysql:/var/lib/mysql

0 commit comments

Comments
 (0)