Skip to content

Commit

Permalink
Merge pull request #5 from gyselroth/dev
Browse files Browse the repository at this point in the history
v2.0.0
  • Loading branch information
raffis authored Feb 21, 2019
2 parents f6371de + e5dcc57 commit 9136830
Show file tree
Hide file tree
Showing 23 changed files with 4,644 additions and 1,483 deletions.
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
## 2.0.0
**Maintainer**: Raffael Sahli <[email protected]>\
**Date**: Thur 14 Feb 2019 14:28:20 PM ET

* [FIX] Fixes "(node:25116) UnhandledPromiseRejectionWarning: TypeError: result is not iterable" due error response from icinga
* [FIX] Better error handling and catching various uncaught promises
* [FIX] Docs fix regaring how to create icinga2 api user
* [CHANGE] Upgrade to winston ^3.0.0 stable
* [CHANGE] Log format is now in json and includes a timestamp
* [FIX] Service protocol is now lower cases which fixes issues like check_command=TCP insteadof check_command=tcp
* [FIX] Fixes icinga api username is now correctly read from ICINGA_API_USERNAME as documented (instead ICINGA_API_USER)
* [FEATURE] Add support for service/host definitions in kubernetes annotations #1
* [BREAKER!] Removed service.portNameAsCommand option, use kubernetes annotations
* [FEATURE] Discover persistent volumes and create icinga services for those #4
* [FIX] Fixed typo Definiton => Definition in default config example
* [CHANGE] Added various new tests
* [FIX] kube workes are in no namespace, remove icinga groups
* [FIX] fixed Error: Invalid attribute specified: host_name\n for kube nodes
* [FIX] fixed duplicate ingress objects (different path, same ingress names in different namespaces, ...)
* [CHANGE] Added hostName setting, by default all resources (except nodes) get attached to single host object of their type (can be configured differently)
* [CHANGE] Implemented workaround for icinga issue https://github.com/Icinga/icinga2/issues/6012, restart icinga service after adding new objects
* [FIX] Changing boolean values in config.json now reflects as configured (Set to false was not possible in v1.x)


## 1.0.1
**Maintainer**: Raffael Sahli <[email protected]>\
**Date**: Fri 01 Jun 2018 01:18:20 PM CEST
Expand All @@ -6,6 +30,7 @@
* [CHANGE] config logger.level => log.level
* [FIX] catch error objects from kube watchers


## 1.0.0
**Maintainer**: Raffael Sahli <[email protected]>\
**Date**: Thu May 24 14:52:11 CEST 2018
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:8.10.0-alpine
FROM node:10.15.1-alpine

RUN apk update && apk add git

Expand Down
227 changes: 164 additions & 63 deletions README.md

Large diffs are not rendered by default.

36 changes: 24 additions & 12 deletions config.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
},
"cleanup": true,
"icinga": {
"address": "",
"address": "127.0.0.1",
"port": 5665,
"apiUser": "",
"apiPassword": ""
"apiUser": "kube-icinga",
"apiPassword": "kube-icinga"
},
"kubernetes": {
"nodes": {
Expand All @@ -17,7 +17,18 @@
},
"ingresses": {
"discover": true,
"serviceDefiniton": {},
"hostName": "kubernetes-ingresses",
"serviceDefinition": {},
"hostDefinition": {},
"serviceTemplates": ["generic-service"],
"hostTemplates": ["generic-host"],
"applyServices": true,
"attachToNodes": false
},
"volumes": {
"discover": true,
"hostName": "kubernetes-volumes",
"serviceDefinition": {},
"hostDefinition": {},
"serviceTemplates": ["generic-service"],
"hostTemplates": ["generic-host"],
Expand All @@ -27,30 +38,31 @@
"services": {
"ClusterIP": {
"discover": false,
"hostName": "kubernetes-clusterip-services",
"serviceDefinition": {},
"hostDefinition": {},
"serviceTemplates": ["generic-service"],
"hostTemplates": ["generic-host"],
"applyServices": false,
"portNameAsCommand": true
"applyServices": true
},
"NodePort": {
"discover": true,
"serviceDefiniton": {},
"hostName": "kubernetes-nodeport-services",
"serviceDefinition": {},
"hostDefinition": {},
"serviceTemplates": ["generic-service"],
"hostTemplates": ["generic-host"],
"applyServices": false,
"portNameAsCommand": true,
"applyServices": true,
"attachToNodes": false
},
"LoadBalancer": {
"discover": true,
"serviceDefiniton": {},
"hostName": "kubernetes-loadbalancer-services",
"serviceDefinition": {},
"hostDefinition": {},
"serviceTemplates": ["generic-service"],
"hostTemplates": ["generic-host"],
"applyServices": false,
"portNameAsCommand": true
"applyServices": true
}
}
}
Expand Down
62 changes: 62 additions & 0 deletions docker-compose-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
version: '2'
services:
icinga2:
image: jordan/icinga2
restart: on-failure:5
# Set your hostname to the FQDN under which your
# sattelites will reach this container
hostname: icinga2
environment:
- MYSQL_ROOT_PASSWORD=<password>
- ICINGA2_FEATURE_GRAPHITE=1
# Important:
# keep the hostname graphite the same as
# the name of the graphite docker-container
- ICINGA2_FEATURE_GRAPHITE_HOST=graphite
- ICINGA2_FEATURE_GRAPHITE_PORT=2003
- ICINGA2_FEATURE_GRAPHITE_URL=http://graphite
#- ICINGAWEB2_ADMIN_USER=icingaadmin
#- ICINGAWEB2_ADMIN_PASS=icinga
#- ICINGA2_USER_FULLNAME=Icinga2 Docker Monitoring Instance
- DEFAULT_MYSQL_HOST=mysql
volumes:
- ./data/icinga/cache:/var/cache/icinga2
- ./data/icinga/certs:/etc/apache2/ssl
- ./data/icinga/etc/icinga2:/etc/icinga2
- ./data/icinga/etc/icingaweb2:/etc/icingaweb2
- ./data/icinga/lib/icinga:/var/lib/icinga2
- ./data/icinga/lib/php/sessions:/var/lib/php/sessions
- ./data/icinga/log/apache2:/var/log/apache2
- ./data/icinga/log/icinga2:/var/log/icinga2
- ./data/icinga/log/icingaweb2:/var/log/icingaweb2
- ./data/icinga/log/mysql:/var/log/mysql
- ./data/icinga/spool:/var/spool/icinga2
# If you want to enable outbound e-mail, create the files
# - ./ssmtp/ssmtp.conf
# - ./ssmtp/revaliases
# and configure to your corresponding mail setup.
# See: https://github.com/jjethwa/icinga2#sending-notification-mails
#- ./ssmtp/revaliases:/etc/ssmtp/revaliases:ro
#- ./ssmtp/ssmtp.conf:/etc/ssmtp/ssmtp.conf:ro
ports:
- "80:80"
- "443:443"
- "5665:5665"
graphite:
image: graphiteapp/graphite-statsd:latest
container_name: graphite
restart: on-failure:5
hostname: graphite
volumes:
- ./data/graphite/conf:/opt/graphite/conf
- ./data/graphite/storage:/opt/graphite/storage
- ./data/graphite/log/graphite:/var/log/graphite
- ./data/graphite/log/carbon:/var/log/carbon
mysql:
image: mariadb:10.1
environment:
- MYSQL_ROOT_PASSWORD=<password>
volumes:
- ./data/mysql/data:/var/lib/mysql
# If you have previously used the container's internal DB use:
#- ./data/icinga/lib/mysql:/var/lib/mysql
Loading

0 comments on commit 9136830

Please sign in to comment.