Skip to content
Permalink
Browse files

cleanup code

  • Loading branch information...
naviat committed Apr 23, 2019
0 parents commit f08470fb35b02949367cd9e105d402c436822515
Showing with 56,433 additions and 0 deletions.
  1. +9 −0 .dockerignore
  2. +75 −0 .gitignore
  3. +35 −0 .travis.yml
  4. +63 −0 00_logging.yml
  5. +92 −0 01_logging.yml
  6. +206 −0 01_metrics.yml
  7. +21 −0 LICENSE
  8. +18 −0 README.md
  9. +69 −0 cleanup.sh
  10. +8 −0 dex/config/addresses.json
  11. +83 −0 dex/dex-stack..yml
  12. +130 −0 dex/docker-compose.testnet.backend.yml
  13. +44 −0 dex/docker-compose.testnet.frontend.yml
  14. +9 −0 docker/alertmanager/Dockerfile
  15. +14 −0 docker/alertmanager/conf/alertmanager.yml
  16. +12 −0 docker/alertmanager/conf/docker-entrypoint.sh
  17. +39 −0 docker/caddy/Caddyfile
  18. +8 −0 docker/dockerd-exporter/Caddyfile
  19. +13 −0 docker/fluentd/Dockerfile
  20. +63 −0 docker/fluentd/etc/fluent.conf
  21. +9 −0 docker/grafana/Dockerfile
  22. +11 −0 docker/grafana/dashboards.yml
  23. +2,063 −0 docker/grafana/dashboards/nodes-dash.json
  24. +1,248 −0 docker/grafana/dashboards/prometheus-dash.json
  25. +1,884 −0 docker/grafana/dashboards/services-dash.json
  26. +13 −0 docker/grafana/datasources/prometheus.yaml
  27. +12 −0 docker/graylog/Dockerfile
  28. +43 −0 docker/graylog/entrypoint.sh
  29. BIN docker/graylog/slack-3.1.0.jar
  30. +1 −0 docker/nginx/conf.d/default.conf
  31. +1 −0 docker/nginx/conf.d/gzip.mime.types
  32. 0 docker/nginx/conf.d/server.d/grafana.conf
  33. +30 −0 docker/nginx/conf.d/server.d/kibana.conf
  34. +31 −0 docker/nginx/nginx.conf
  35. +10 −0 docker/node-exporter/Dockerfile
  36. +8 −0 docker/node-exporter/conf/docker-entrypoint.sh
  37. +10 −0 docker/prometheus/Dockerfile
  38. +35 −0 docker/prometheus/conf/docker-entrypoint.sh
  39. +44 −0 docker/prometheus/conf/prometheus.yml
  40. +44 −0 docker/prometheus/rules/swarm_node.rules.yml
  41. +24 −0 docker/prometheus/rules/swarm_task.rules.yml
  42. +79 −0 docker/proxy_old/conf/nginx.conf
  43. +40 −0 install_prerequisites.sh
  44. +32 −0 logging/curator/action-file.yml
  45. +22 −0 logging/curator/config.yml
  46. +53 −0 logging/docker-compose.secure.yml
  47. +51 −0 logging/docker-compose.unsecure.yml
  48. +153 −0 logging/docker-compose.yml
  49. +3 −0 logging/elastalert/Dockerfile
  50. +47 −0 logging/elastalert/config/elastalert_config.yaml
  51. +33 −0 logging/elastalert/config/elastalert_supervisord.conf
  52. +11,808 −0 logging/elastalert/log/elastalert_supervisord.log
  53. +17,232 −0 logging/elastalert/log/elastalert_supervisord.log.1
  54. +17,684 −0 logging/elastalert/log/elastalert_supervisord.log.2
  55. +33 −0 logging/elastalert/rule_blue_print.yaml
  56. +33 −0 logging/elastalert/rules/blanket_log-level_catch.yaml
  57. +1,320 −0 logging/filebeat/filebeat.yml
  58. +18 −0 logging/logstash/config/01-inputs.conf
  59. +16 −0 logging/logstash/config/29-complete-drops.conf
  60. +64 −0 logging/logstash/config/30-generic-filters.conf
  61. +33 −0 logging/logstash/config/31-non-events.conf
  62. +16 −0 logging/logstash/config/70-ouputs.conf
  63. +1 −0 logging/logstash/patterns/custom_logstash_grok_patterns
  64. +30 −0 monitoring/alertmanager/config.yml
  65. +41 −0 monitoring/blackboxprober/config.yml
  66. +58 −0 monitoring/docker-compose.secure.yml
  67. +51 −0 monitoring/docker-compose.unsecure.yml
  68. +169 −0 monitoring/docker-compose.yml
  69. +96 −0 monitoring/prometheus/prometheus.yml
  70. +8 −0 monitoring/prometheus/rules/alert.rules_container-groups
  71. +45 −0 monitoring/prometheus/rules/alert.rules_containers
  72. +60 −0 monitoring/prometheus/rules/alert.rules_nodes
  73. +9 −0 monitoring/prometheus/rules/alert.rules_sites
  74. +7 −0 monitoring/prometheus/service.yml
  75. +65 −0 node/node.docker-compose.yml
  76. +84 −0 proxy/docker-compose.yml
  77. +10 −0 proxy/dockergen/default.vhost
  78. +245 −0 proxy/dockergen/nginx.tmpl
  79. +2 −0 proxy/nginx/conf.d/proxy.conf
  80. +150 −0 setup.sh
  81. BIN storage/grafana/grafana.db
  82. BIN storage/grafana/sessions/1/f/1f9d65310d95301c
  83. BIN storage/grafana/sessions/5/0/50f1490591f36065
  84. BIN storage/grafana/sessions/a/7/a721c6d503fb2679
@@ -0,0 +1,9 @@
# Created by .ignore support plugin (hsz.mobi)
### Example user template template
### Example user template

# IntelliJ project files
.idea
*.iml
out
gen
@@ -0,0 +1,75 @@
# Created by .ignore support plugin (hsz.mobi)
### VirtualEnv template
# Virtualenv
# http://iamzed.com/2009/05/07/a-primer-on-virtualenv/
.Python
[Bb]in
[Ii]nclude
[Ll]ib
[Ll]ib64
[Ll]ocal
[Ss]cripts
pyvenv.cfg
.venv
pip-selfcheck.json
### JetBrains template
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/dictionaries
.idea/**/shelf

# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml

# Gradle
.idea/**/gradle.xml
.idea/**/libraries

# CMake
cmake-build-debug/
cmake-build-release/

# Mongo Explorer plugin
.idea/**/mongoSettings.xml

# File-based project format
*.iws

# IntelliJ
out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

# Editor-based Rest Client
.idea/httpRequests

.idea/dex-infrastructure.iml
.idea/encodings.xml
.idea/misc.xml
.idea/modules.xml

*/.idea/**
.idea/
@@ -0,0 +1,35 @@
sudo: required

services:
- docker

before_install:
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
- sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
- sudo apt-get update
- sudo apt-get -y install docker-ce
- sudo service docker restart

script:
- cd docker/prometheus && docker build -t naviat/prometheus:$TRAVIS_BUILD_NUMBER .
- cd .. && cd node-exporter && docker build -t naviat/node-exporter:$TRAVIS_BUILD_NUMBER .
- cd .. && cd alertmanager && docker build -t naviat/alertmanager:$TRAVIS_BUILD_NUMBER .
- cd .. && cd grafana && docker build -t naviat/grafana:$TRAVIS_BUILD_NUMBER .
- cd .. && cd fluentd && docker build -t naviat/fluentd:$TRAVIS_BUILD_NUMBER .

after_success:
- if [ -z "$DOCKER_USER" ]; then
echo "PR build, skipping Docker Hub push";
else
docker login -u "$DOCKER_USER" -p "$DOCKER_PASS";
docker tag naviat/prometheus:$TRAVIS_BUILD_NUMBER naviat/prometheus:v2.8.0;
docker push naviat/prometheus:v2.8.0;
docker tag naviat/node-exporter:$TRAVIS_BUILD_NUMBER naviat/node-exporter:v0.16.0;
docker push naviat/node-exporter:v0.16.0;
docker tag naviat/alertmanager:$TRAVIS_BUILD_NUMBER naviat/alertmanager:v0.16.0;
docker push naviat/alertmanager:v0.16.0;
docker tag naviat/grafana:$TRAVIS_BUILD_NUMBER naviat/grafana:5.3.4;
docker push naviat/grafana:5.3.4;
docker tag naviat/fluentd:$TRAVIS_BUILD_NUMBER naviat/fluentd:1.3;
docker push naviat/fluentd:1.3;
fi
@@ -0,0 +1,63 @@
version: "3.4"

services:
mongo:
image: mongo:3.6
volumes:
- vol-graylog-db:/data/db
deploy:
placement:
constraints:
- node.labels.project == logging

elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:5.6.3
volumes:
- vol-graylog-es:/usr/share/elasticsearch/data
environment:
- http.host=0.0.0.0
- transport.host=localhost
- network.host=0.0.0.0
# https://www.elastic.co/guide/en/elasticsearch/reference/5.6/security-settings.html#general-security-settings
- xpack.security.enabled=false
- "ES_JAVA_OPTS=-Xms4g -Xmx4g"
deploy:
placement:
constraints:
- node.labels.project == logging

graylog:
image: tomochain/graylog:stable
volumes:
- vol-graylog-journal:/usr/share/graylog/data/journal
environment:
GRAYLOG_WEB_ENDPOINT_URI: https://graylog.dex.testnet.tomochain.com/api
GRAYLOG_PASSWORD_SECRET_FILE: /run/secrets/graylog_password_secret
GRAYLOG_ROOT_PASSWORD_SHA2_FILE: /run/secrets/graylog_root_password_sha2
secrets:
- graylog_password_secret
- graylog_root_password_sha2
ports:
- target: 12201
published: 12201
protocol: udp
mode: host
deploy:
placement:
constraints:
- node.labels.project == logging

volumes:
vol-graylog-es:
external: true
vol-graylog-db:
external: true
vol-graylog-journal:
external: true


secrets:
graylog_password_secret:
external: true
graylog_root_password_sha2:
external: true
@@ -0,0 +1,92 @@
---
version: '3.4'
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch-oss:6.6.2
restart: always
environment:
- 'node.name=HEYJUDE'
- 'discovery.type=single-node'
- 'bootstrap.memory_lock=true'
# - 'xpack.security.enabled=false'
- 'ES_JAVA_OPTS=-Xms256m -Xmx256m'
ports:
- 9200:9200
# - 9300:9300
volumes:
- type: bind
source: /var/lib/elasticsearch
target: /usr/share/elasticsearch/data
networks:
- net
logging:
driver: fluentd
options:
fluentd-address: localhost:24224
fluentd-async-connect: 'true'
fluentd-retry-wait: '1s'
fluentd-max-retries: '30'
tag: alpha.efk.elasticsearch

kibana:
image: docker.elastic.co/kibana/kibana-oss:6.6.2
restart: always
#ports:
# - 5601:5601
networks:
- net
depends_on:
- elasticsearch
logging:
driver: fluentd
options:
fluentd-address: localhost:24224
fluentd-async-connect: 'true'
fluentd-retry-wait: '1s'
fluentd-max-retries: '30'
tag: alpha.efk.kibana

fluentd:
image: naviat/fluentd:1.3.3
ports:
- 127.0.0.1:24224:24224
# - 24224:24224/udp
volumes:
- ./fluentd/etc:/fluentd/etc
networks:
- net
logging:
driver: "json-file"
options:
max-size: "1G"
max-file: "2"

nginx:
image: nginx:1.15
restart: always
ports:
- 80:80
volumes:
- type: bind
source: ./nginx/nginx.conf
target: /etc/nginx/nginx.conf
read_only: true
- type: bind
source: ./nginx/conf.d
target: /etc/nginx/conf.d
read_only: true
networks:
- net
depends_on:
- kibana
logging:
driver: fluentd
options:
fluentd-address: localhost:24224
fluentd-async-connect: 'true'
fluentd-retry-wait: '1s'
fluentd-max-retries: '30'
tag: alpha.efk.nginx
networks:
net:
driver: bridge
Oops, something went wrong.

0 comments on commit f08470f

Please sign in to comment.
You can’t perform that action at this time.