diff --git a/.env b/.env new file mode 100644 index 0000000..6f1b0b6 --- /dev/null +++ b/.env @@ -0,0 +1,4 @@ +PROJECTS_DIR=/Users/euiyoung.hwang/ES/Go_Workspace +CERTS_DIR=/usr/share/elasticsearch/config/certificates +ELASTIC_PASSWORD=gsaadmin +NODE_WHITE_LIST="192.168.68.1:*,host.docker.internal:*,localhost:*" \ No newline at end of file diff --git a/DevOps_Shell/read_config.sh b/DevOps_Shell/read_config.sh new file mode 100755 index 0000000..c6292be --- /dev/null +++ b/DevOps_Shell/read_config.sh @@ -0,0 +1,10 @@ +#!/bin/bash +set -e + +function get_value_from_yaml() +{ + #cat ./config.yaml | jq .app.es.es_host + ES_HOST=$(cat ./config.yaml | jq .app.es.es_host) + ES_HOST=$(sed -e 's/^"//' -e 's/"$//' <<< $ES_HOST) + echo 'get_value_from_yaml -> ' ${ES_HOST} +} \ No newline at end of file diff --git a/README.md b/README.md index 9f9bcc9..d015e7d 100644 --- a/README.md +++ b/README.md @@ -43,3 +43,30 @@ curl http://localhost:9080/health {"time":"2023-12-23T14:39:42.970473-06:00","id":"","remote_ip":"127.0.0.1","host":"localhost:9080","method":"GET","uri":"/","user_agent":"curl/7.78.0","status":200,"error":"","latency":1875,"latency_human":"1.875µs","bytes_in":0,"bytes_out":13} {"time":"2023-12-23T14:40:07.332221-06:00","id":"","remote_ip":"127.0.0.1","host":"localhost:9080","method":"GET","uri":"/health","user_agent":"curl/7.78.0","status":200,"error":"","latency":70208,"latency_human":"70.208µs","bytes_in":0,"bytes_out":14} ``` + +#### Elasticsearh Cluster Diagnostics (Support by Elasticsearch) +- The support diagnostic utility is a Java application that can interrogate a running Elasticsearch cluster or Logstash process to obtain data about the state of the cluster at that point in time. It is compatible with all versions of Elasticsearch (including alpha, beta and release candidates), and for Logstash versions greater than 5.0, and for Kibana v6.5+. The release version of the diagnostic is independent of the Elasticsearch, Kibana or Logstash version it is being run against. +- `Diagnostics Guide` (https://olamideolajide.medium.com/how-to-collect-diagnostics-for-a-cloud-elasticsearch-cluster-4a20841a815a, https://github.com/elastic/support-diagnostics/releases/tag/8.0.3) +```bash +python-elasticsearch git:(master) ✗ ./support-diagnostics-8.0.3/diagnostics.sh --host localhost --port 9209 +Using /usr/bin/java as Java Runtime +Using -Xms256m -Xmx2000m for options. +Processing diagnosticInputs... + +Creating temp directory: /Users/euiyoung.hwang/ES/Python_Workspace/python-elasticsearch/local-diagnostics +Configuring log file. +Checking for diagnostic version updates. +Issue encountered while checking diagnostic version for updates. +Failed to get current diagnostic version from Github. +If Github is not accessible from this environemnt current supported version cannot be confirmed. +Getting Elasticsearch Version. +Checking the supplied hostname against the node information retrieved to verify location. This may take some time. +... +Results written to: /Users/euiyoung.hwang/ES/Python_Workspace/python-elasticsearch/local-diagnostics/commercial/watcher_stack.json +Results written to: /Users/euiyoung.hwang/ES/Python_Workspace/python-elasticsearch/local-diagnostics/commercial/xpack.json +Writing diagnostic manifest. +Closing logger. +Archiving diagnostic results. +Archive: /Users/euiyoung.hwang/ES/Python_Workspace/python-elasticsearch/local-diagnostics-20231215-160457.tar.gz was created +Deleted directory: /Users/euiyoung.hwang/ES/Python_Workspace/python-elasticsearch/local-diagnostics. +``` \ No newline at end of file diff --git a/config.yaml b/config.yaml new file mode 100644 index 0000000..07e4b57 --- /dev/null +++ b/config.yaml @@ -0,0 +1,10 @@ +{ + "app": { + "es": { + "es_host": "http://localhost:9209", + "index" : { + "alias" : "metrics_search" + } + } + } +} \ No newline at end of file diff --git a/custom-opensearch-dashboards.yml b/custom-opensearch-dashboards.yml new file mode 100644 index 0000000..2f9fbab --- /dev/null +++ b/custom-opensearch-dashboards.yml @@ -0,0 +1,11 @@ +server.host: '0.0.0.0' +server.port: 5601 +opensearch.hosts: [https://host.docker.internal:9250] +opensearch.ssl.verificationMode: none +opensearch.username: admin +opensearch.password: admin +opensearch.requestHeadersWhitelist: [authorization, securitytenant] +opensearch_security.multitenancy.enabled: false +opensearch_security.multitenancy.tenants.preferred: [Private, Global] +opensearch_security.readonly_mode.roles: [kibana_read_only] +opensearch_security.cookie.secure: false \ No newline at end of file diff --git a/docker-build.sh b/docker-build.sh index 324eb79..4e2324d 100755 --- a/docker-build.sh +++ b/docker-build.sh @@ -7,6 +7,6 @@ set -eu docker build \ -f "$(dirname "$0")/Dockerfile" \ - -t go-elasticsearch-api:es \ + -t go-search_engine-api:es \ --target runtime \ "$(dirname "$0")/." diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..b5b01c4 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,402 @@ +version: '3' +#docker-compose -f ./docker-compose.yml up or docker-compose up +name: go-search-engine-api +services: + + cerebro: + image: lmenezes/cerebro:0.9.4 + ports: + - "9009:9000" + volumes: + - ./monitoring/cerebro/application.conf://opt/cerebro/conf/application.conf + + alertmanager: + image: prom/alertmanager + container_name: alertmanager + privileged: true + volumes: + - ./monitoring/alertmanager/alertmanager.yml:/alertmanager.yml + - ./monitoring/alertmanager/slack.tmpl:/slack.tmpl + command: + - '--config.file=/alertmanager.yml' + - "--web.external-url=http://localhost:9093" + ports: + - 9093:9093 + + # docker run --rm -d -p 9090:9090 -v ./prometheus.yml:/etc/prometheus/prometheus.yml ./prometheus:/prometheus + prometheus: + image: prom/prometheus + container_name: prometheus + restart: unless-stopped + ports: + - 9091:9090 + volumes: + - ./monitoring/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml + - ./prometheus:/prometheus + - ./monitoring/alertmanager/alert_rules.yml:/alertmanager/alert_rules.yml + command: + - --config.file=/etc/prometheus/prometheus.yml + - --storage.tsdb.path=/prometheus + - --storage.tsdb.retention.time=2d # 90일보다 오래된 metrics는 삭제 + - --storage.tsdb.retention.size=1GB # 10GB를 넘을 시 오래된 metrics 삭제 + - --web.console.libraries=/usr/share/prometheus/console_libraries + - --web.console.templates=/usr/share/proemtheus/consoles + - --web.enable-admin-api + networks: + - bridge + + elastichq: + image: elastichq/elasticsearch-hq + container_name: elastichq + environment: + - HQ_DEFAULT_URL=http://host.docker.internal:9209 + # - HQ_DEBUG=True + # - HQ_ENABLE_SSL=True + # - HQ_VERIFY_CERTS=False + # - HQ_CA_CERTS=/usr/local/share/ca-certificates/MYCA.crt + ports: + - 5500:5000 + networks: + - bridge + + grafana: + container_name: grafana-local + environment: + - GF_INSTALL_PLUGINS=alexanderzobnin-zabbix-app + - GF_RENDERING_SERVER_URL=http://host.docker.internal:8088/render + - GF_RENDERING_CALLBACK_URL=http://host.docker.internal:3001/ + - GF_LOG_FILTERS= rendering:debug + image: grafana/grafana:latest + ports: + - 3000:3000/tcp + volumes: + - /etc/localtime:/etc/localtime:ro + restart: unless-stopped + networks: + - bridge + + renderer: + image: grafana/grafana-image-renderer + restart: always + ports: + - 8088:8081 + networks: + - bridge + + # Single Cluster + single_node: + #image: docker.elastic.co/elasticsearch/elasticsearch:7.10.0 + build: + context: ./Docker/elasticsearch + dockerfile: Dockerfile + container_name: es-docker-node + environment: + - node.name=es01 + - node.master=true + - node.data=true + #- node.roles=master + - cluster.name=es-docker-a-cluster + - discovery.seed_hosts=es01 + - cluster.initial_master_nodes=es01 + - bootstrap.memory_lock=true + - "ES_JAVA_OPTS=-Xms1g -Xmx1g" + # - discovery.type=single-node + - http.cors.enabled=true + - http.cors.allow-origin="*" + - http.cors.allow-headers=X-Requested-With,X-Auth-Token,Content-Type,Content-Length,Authorization + - http.cors.allow-credentials=true + - xpack.security.enabled=false + # - bootstrap.system_call_filter=false + - reindex.remote.whitelist=${NODE_WHITE_LIST} + healthcheck: + test: curl -s http://localhost:9200 >/dev/null; if [[ $$? == 52 ]]; then echo 0; else echo 1; fi + interval: 30s + timeout: 10s + retries: 5 + ulimits: + memlock: + soft: -1 + hard: -1 + volumes: + - data01:/usr/share/elasticsearch/data + ports: + - 9221:9200 + networks: + - bridge + + single_node_kibana: + image: docker.elastic.co/kibana/kibana:7.10.0 + depends_on: {"single_node": {"condition": "service_healthy"}} + restart: unless-stopped + ports: + - 5601:5601 + environment: + SERVERNAME: localhost + ELASTICSEARCH_URL: http://single_node:9221 + ELASTICSEARCH_HOSTS: http://single_node:9221 + + # docker-compose -f ./create-certs.yml run --rm create_certs + # docker-compose up -d + # Multiple Cluster + es01: + #image: docker.elastic.co/elasticsearch/elasticsearch:7.10.0 + container_name: es01 + build: + context: ./Docker/elasticsearch + dockerfile: Dockerfile + restart: unless-stopped + environment: + - node.name=es01 + - node.master=true + - node.data=true + - cluster.name=es-docker-cluster + - discovery.seed_hosts=es02,es03 + - cluster.initial_master_nodes=es01,es02,es03 + - bootstrap.memory_lock=true + - "ES_JAVA_OPTS=-Xms1g -Xmx1g" + # - "ES_JAVA_OPTS=-Xms512m -Xmx512m" + - ELASTIC_USERNAME=elastic + - ELASTIC_PASSWORD=$ELASTIC_PASSWORD + # - xpack.license.self_generated.type=trial + - xpack.security.enabled=true + - xpack.security.http.ssl.enabled=false + - xpack.security.http.ssl.key=$CERTS_DIR/es01/es01.key + - xpack.security.http.ssl.certificate_authorities=$CERTS_DIR/ca/ca.crt + - xpack.security.http.ssl.certificate=$CERTS_DIR/es01/es01.crt + - xpack.security.transport.ssl.enabled=true + - xpack.security.transport.ssl.verification_mode=certificate + - xpack.security.transport.ssl.certificate_authorities=$CERTS_DIR/ca/ca.crt + - xpack.security.transport.ssl.certificate=$CERTS_DIR/es01/es01.crt + - xpack.security.transport.ssl.key=$CERTS_DIR/es01/es01.key + ulimits: + memlock: + soft: -1 + hard: -1 + volumes: + - data01:/usr/share/elasticsearch/data + - certs:$CERTS_DIR + ports: + - 9200:9200 + networks: + - bridge + + healthcheck: + test: curl --cacert $CERTS_DIR/ca/ca.crt -s https://localhost:9200 >/dev/null; if [[ $$? == 52 ]]; then echo 0; else echo 1; fi + interval: 30s + timeout: 10s + retries: 5 + + es02: + #image: docker.elastic.co/elasticsearch/elasticsearch:7.10.0 + build: + context: ./Docker/elasticsearch + dockerfile: Dockerfile + container_name: es02 + restart: unless-stopped + environment: + - node.name=es02 + - node.master=true + - node.data=true + - cluster.name=es-docker-cluster + - discovery.seed_hosts=es01,es03 + - cluster.initial_master_nodes=es01,es02,es03 + - bootstrap.memory_lock=true + # - "ES_JAVA_OPTS=-Xms512m -Xmx512m" + - "ES_JAVA_OPTS=-Xms1g -Xmx1g" + - ELASTIC_USERNAME=elastic + - ELASTIC_PASSWORD=$ELASTIC_PASSWORD + # - xpack.license.self_generated.type=basic + - xpack.security.enabled=true + - xpack.security.http.ssl.enabled=false + - xpack.security.http.ssl.key=$CERTS_DIR/es02/es02.key + - xpack.security.http.ssl.certificate_authorities=$CERTS_DIR/ca/ca.crt + - xpack.security.http.ssl.certificate=$CERTS_DIR/es02/es02.crt + - xpack.security.transport.ssl.enabled=true + - xpack.security.transport.ssl.verification_mode=certificate + - xpack.security.transport.ssl.certificate_authorities=$CERTS_DIR/ca/ca.crt + - xpack.security.transport.ssl.certificate=$CERTS_DIR/es02/es02.crt + - xpack.security.transport.ssl.key=$CERTS_DIR/es02/es02.key + ulimits: + memlock: + soft: -1 + hard: -1 + volumes: + - data02:/usr/share/elasticsearch/data + - certs:$CERTS_DIR + ports: + - 9210:9200 + networks: + - bridge + + es03: + # image: docker.elastic.co/elasticsearch/elasticsearch:7.10.0 + build: + context: ./Docker/elasticsearch + dockerfile: Dockerfile + container_name: es03 + restart: unless-stopped + environment: + - node.name=es03 + - node.master=true + - node.data=true + - cluster.name=es-docker-cluster + - discovery.seed_hosts=es01,es02 + - cluster.initial_master_nodes=es01,es02,es03 + - bootstrap.memory_lock=true + # - "ES_JAVA_OPTS=-Xms512m -Xmx512m" + - "ES_JAVA_OPTS=-Xms1g -Xmx1g" + - ELASTIC_USERNAME=elastic + - ELASTIC_PASSWORD=$ELASTIC_PASSWORD + # - xpack.license.self_generated.type=basic + - xpack.security.enabled=true + - xpack.security.http.ssl.enabled=false + - xpack.security.http.ssl.key=$CERTS_DIR/es03/es03.key + - xpack.security.http.ssl.certificate_authorities=$CERTS_DIR/ca/ca.crt + - xpack.security.http.ssl.certificate=$CERTS_DIR/es02/es02.crt + - xpack.security.transport.ssl.enabled=true + - xpack.security.transport.ssl.verification_mode=certificate + - xpack.security.transport.ssl.certificate_authorities=$CERTS_DIR/ca/ca.crt + - xpack.security.transport.ssl.certificate=$CERTS_DIR/es03/es03.crt + - xpack.security.transport.ssl.key=$CERTS_DIR/es03/es03.key + ulimits: + memlock: + soft: -1 + hard: -1 + volumes: + - data03:/usr/share/elasticsearch/data + - certs:$CERTS_DIR + networks: + - bridge + + kibana: + image: docker.elastic.co/kibana/kibana:7.10.0 + container_name: kibana + depends_on: {"es01": {"condition": "service_healthy"}} + restart: unless-stopped + ports: + - 5601:5601 + environment: + SERVERNAME: localhost + ELASTICSEARCH_URL: http://es01:9200 + ELASTICSEARCH_HOSTS: http://es01:9200 + ELASTICSEARCH_USERNAME: elastic + ELASTICSEARCH_PASSWORD: gsaadmin + ELASTICSEARCH_SSL_CERTIFICATEAUTHORITIES: $CERTS_DIR/ca/ca.crt + # SERVER_SSL_ENABLED: "true" + # SERVER_SSL_KEY: $CERTS_DIR/kibana/kib01.key + # SERVER_SSL_CERTIFICATE: $CERTS_DIR/kibana/kib01.crt + volumes: + - certs:$CERTS_DIR + networks: + - bridge + + opensearch-node1: + image: opensearchproject/opensearch:latest + container_name: opensearch-node1 + environment: + - cluster.name=opensearch-cluster + - node.name=opensearch-node1 + - discovery.seed_hosts=opensearch-node1,opensearch-node2 + - cluster.initial_master_nodes=opensearch-node1,opensearch-node2 + - bootstrap.memory_lock=true # along with the memlock settings below, disables swapping + - "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m" # minimum and maximum Java heap size, recommend setting both to 50% of system RAM + ulimits: + memlock: + soft: -1 + hard: -1 + nofile: + soft: 65536 # maximum number of open files for the OpenSearch user, set to at least 65536 on modern systems + hard: 65536 + volumes: + - opensearch-data1:/usr/share/opensearch/data + ports: + - 9250:9200 + - 9600:9600 # required for Performance Analyzer + networks: + - bridge + + opensearch-node2: + image: opensearchproject/opensearch:latest + container_name: opensearch-node2 + environment: + - cluster.name=opensearch-cluster + - node.name=opensearch-node2 + - discovery.seed_hosts=opensearch-node1,opensearch-node2 + - cluster.initial_master_nodes=opensearch-node1,opensearch-node2 + - bootstrap.memory_lock=true + - "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m" + ulimits: + memlock: + soft: -1 + hard: -1 + nofile: + soft: 65536 + hard: 65536 + volumes: + - opensearch-data2:/usr/share/opensearch/data + networks: + - bridge + + opensearch-dashboards: + image: opensearchproject/opensearch-dashboards:latest + container_name: opensearch-dashboards + ports: + - 5901:5601 + expose: + - "5901" + environment: + OPENSEARCH_HOSTS: '["https://opensearch-node1:9250","https://opensearch-node2:9250"]' + networks: + - bridge + + go-search_engine-api: + image: go-search_engine-api:es + container_name: go-search_engine-api + build: + context: . + dockerfile: Dockerfile + target: runtime + ports: + - 9088:9080 + volumes: + - ${PROJECTS_DIR}/go-search_engine:/app + restart: unless-stopped + environment: + - ES_HOST=http://host.docker.internal:9209 + networks: + - bridge + + # go-search_engine-api-test: + # image: go-search_engine-api:test + # container_name: go-search_engine-api-test + # build: + # context: . + # dockerfile: Dockerfile + # target: test + # ports: + # - 8889:8889 + # volumes: + # - ${PROJECTS_DIR}/python-elasticsearch:/app/FN-Basic-Services + # # restart: unless-stopped + # environment: + # - ES_HOST=http://host.docker.internal:9209 + # networks: + # - bridge + +volumes: + opensearch-data1: + driver: local + opensearch-data2: + driver: local + data01: + driver: local + data02: + driver: local + data03: + driver: local + certs: + driver: local + +networks: + bridge: + driver: bridge \ No newline at end of file diff --git a/docker-run.sh b/docker-run.sh index 1e1f5e0..7017999 100755 --- a/docker-run.sh +++ b/docker-run.sh @@ -6,10 +6,10 @@ SCRIPTDIR="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )" echo $SCRIPTDIR docker run --rm -it -d \ - --name go-elasticsearch-api --publish 9088:9080 --expose 9080 \ + --name go-search_engine-api --publish 9088:9080 --expose 9080 \ --network bridge \ -e ES_HOST=http://host.docker.internal:9209 \ -v "$SCRIPTDIR:/app" \ - go-elasticsearch-api:es + go-search_engine-api:es diff --git a/service_start.sh b/service_start.sh new file mode 100755 index 0000000..15b6390 --- /dev/null +++ b/service_start.sh @@ -0,0 +1,17 @@ +#!/bin/bash +set -e +source ./DevOps_Shell/read_config.sh + +# -- +# Call this function from './DevOps_Shell/read_config.yaml.sh' to get ES_HOST value in config.yaml file +get_value_from_yaml +# -- + +# Activate virtualenv && run serivce +SCRIPTDIR="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )" + +# -- +# Waitng for ES +./wait_for_es.sh $ES_HOST + +go run ./main.go diff --git a/support-diagnostics-8.0.3/diagnostics.bat b/support-diagnostics-8.0.3/diagnostics.bat new file mode 100644 index 0000000..cc0f5d3 --- /dev/null +++ b/support-diagnostics-8.0.3/diagnostics.bat @@ -0,0 +1,28 @@ +@echo off +setlocal enabledelayedexpansion + +SET scriptpath=%~dp0 +SET diagpath=%scriptpath:~0,-1% +SET libpath=%diagpath%\lib\NUL + +IF NOT EXIST %libpath% ( + ECHO "Runtimes library does not exist - make sure you are running the " + ECHO "archive with 'dist' in the name, not the one labeled: 'source'." + EXIT +) +set JAVA_EXEC=java +if not defined JAVA_HOME ( + set JAVA_EXEC=java + echo No Java Home was found. Using current path. If execution fails please install Java and make sure it is in the search path or exposed via the JAVA_HOME environment variable. +) else ( + echo JAVA_HOME found, using !JAVA_HOME! + set JAVA_EXEC=!JAVA_HOME!\bin\java +) + +if not defined DIAG_JAVA_OPTIONS ( + set DIAG_JAVA_OPTIONS=-Xmx512m +) + +"%JAVA_EXEC%" %DIAG_JAVA_OPTIONS% -cp %diagpath%;%diagpath%\lib\* com.elastic.support.diagnostics.DiagnosticApp %* + +endlocal diff --git a/support-diagnostics-8.0.3/diagnostics.sh b/support-diagnostics-8.0.3/diagnostics.sh new file mode 100755 index 0000000..9f53b71 --- /dev/null +++ b/support-diagnostics-8.0.3/diagnostics.sh @@ -0,0 +1,31 @@ +#!/usr/bin/env bash + +scriptDir=$0 +scriptDir=${scriptDir/\/diagnostics.sh/$''} +libDir=$scriptDir'/lib' + +if [ -d "libDir" ]; then + echo "Runtimes library does not exist - make sure you are running the " + echo "archive with 'dist-' in the name, not the one labeled: 'source'." + exit +fi + +if [ -x "$JAVA_HOME/bin/java" ]; then + JAVA="$JAVA_HOME/bin/java" +else + JAVA=`which java` +fi + +echo "Using ${JAVA} as Java Runtime" + +if [ ! -x "$JAVA" ]; then + echo "Could not find any executable java binary. Please install java in your PATH and/or set JAVA_HOME" + exit 1 +fi + +[[ ${DIAG_DEBUG} != "" ]] && export DIAG_DEBUG_OPTS=" -Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=8000,suspend=y" + +[[ ${DIAG_JAVA_OPTS} == "" ]] && export DIAG_JAVA_OPTS="-Xms256m -Xmx2000m" + +echo "Using ${DIAG_JAVA_OPTS} ${DIAG_DEBUG_OPTS} for options." +"$JAVA" $DIAG_JAVA_OPTS ${DIAG_DEBUG_OPTS} -cp ${scriptDir}:${scriptDir}/lib/* com.elastic.support.diagnostics.DiagnosticApp "$@" \ No newline at end of file diff --git a/support-diagnostics-8.0.3/docker-build.sh b/support-diagnostics-8.0.3/docker-build.sh new file mode 100755 index 0000000..3ca5d88 --- /dev/null +++ b/support-diagnostics-8.0.3/docker-build.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +docker build -f ./docker/Dockerfile -t support-diagnostics-app . diff --git a/support-diagnostics-8.0.3/docker/Dockerfile b/support-diagnostics-8.0.3/docker/Dockerfile new file mode 100644 index 0000000..de12e82 --- /dev/null +++ b/support-diagnostics-8.0.3/docker/Dockerfile @@ -0,0 +1,4 @@ +FROM openjdk:12 +COPY . /support-diagnostics +WORKDIR /support-diagnostics +RUN rm *.bat diff --git a/support-diagnostics-8.0.3/docker/diagnostic-container-exec.sh b/support-diagnostics-8.0.3/docker/diagnostic-container-exec.sh new file mode 100755 index 0000000..65a340f --- /dev/null +++ b/support-diagnostics-8.0.3/docker/diagnostic-container-exec.sh @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# +# Sample script to set up an interactive session in the Docker diagnostic image created via the +# docker-build.sh script. The -v volume setting sends the output from the diagnostic to +# a directory named docker-diagnostic-output in the home directory of the user running +# the script. Simply change the directory location to the left of the colon if you wish to +# write to a different location. Be sure that this target folder has sufficient permissions +# to create the output files. +# +docker run -it -v ~/docker-diagnostic-output:/diagnostic-output support-diagnostics-app bash diff --git a/support-diagnostics-8.0.3/export-monitoring.bat b/support-diagnostics-8.0.3/export-monitoring.bat new file mode 100644 index 0000000..8163709 --- /dev/null +++ b/support-diagnostics-8.0.3/export-monitoring.bat @@ -0,0 +1,29 @@ +@echo off +setlocal enabledelayedexpansion + +SET scriptpath=%~dp0 +SET diagpath=%scriptpath:~0,-1% +SET libpath=%diagpath%\lib\NUL + +IF NOT EXIST %libpath% ( + ECHO "Runtimes library does not exist - make sure you are running the " + ECHO "archive with 'dist' in the name, not the one labeled: 'source'." + EXIT +) + +set JAVA_EXEC=java +if not defined JAVA_HOME ( + set JAVA_EXEC=java + echo No Java Home was found. Using current path. If execution fails please install Java and make sure it is in the search path or exposed via the JAVA_HOME environment variable. +) else ( + echo JAVA_HOME found, using !JAVA_HOME! + set JAVA_EXEC=!JAVA_HOME!\bin\java +) + +if not defined DIAG_JAVA_OPTIONS ( + set DIAG_JAVA_OPTIONS=-Xmx2000m +) + +"%JAVA_EXEC%" %DIAG_JAVA_OPTIONS% -cp %diagpath%;%diagpath%\lib\* com.elastic.support.monitoring.MonitoringExportApp %* + +endlocal diff --git a/support-diagnostics-8.0.3/export-monitoring.sh b/support-diagnostics-8.0.3/export-monitoring.sh new file mode 100755 index 0000000..d8ce045 --- /dev/null +++ b/support-diagnostics-8.0.3/export-monitoring.sh @@ -0,0 +1,31 @@ +#!/usr/bin/env bash + +scriptDir=$0 +scriptDir=${scriptDir/\/export-monitoring.sh/$''} +libDir=$scriptDir'/lib' + +if [ -d "libDir" ]; then + echo "Runtimes library does not exist - make sure you are running the " + echo "archive with 'dist' in the name, not the one labeled: 'source'." + exit +fi + +if [ -x "$JAVA_HOME/bin/java" ]; then + JAVA="$JAVA_HOME/bin/java" +else + JAVA=`which java` +fi + +echo "Using ${JAVA} as Java Runtime" + +if [ ! -x "$JAVA" ]; then + echo "Could not find any executable java binary. Please install java in your PATH and/or set JAVA_HOME" + exit 1 +fi + +[[ ${DIAG_DEBUG} != "" ]] && export DIAG_DEBUG_OPTS=" -Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=8000,suspend=y" + +[[ ${DIAG_JAVA_OPTS} == "" ]] && export DIAG_JAVA_OPTS="-Xms256m -Xmx2000m" + +echo "Using ${DIAG_JAVA_OPTS} ${DIAG_DEBUG_OPTS} for options." +"$JAVA" $DIAG_JAVA_OPTS ${DIAG_DEBUG_OPTS} -cp ${scriptDir}:${scriptDir}/lib/* com.elastic.support.monitoring.MonitoringExportApp "$@" \ No newline at end of file diff --git a/support-diagnostics-8.0.3/import-monitoring.bat b/support-diagnostics-8.0.3/import-monitoring.bat new file mode 100644 index 0000000..9c054a8 --- /dev/null +++ b/support-diagnostics-8.0.3/import-monitoring.bat @@ -0,0 +1,29 @@ +@echo off +setlocal enabledelayedexpansion + +SET scriptpath=%~dp0 +SET diagpath=%scriptpath:~0,-1% +SET libpath=%diagpath%\lib\NUL + +IF NOT EXIST %libpath% ( + ECHO "Runtimes library does not exist - make sure you are running the " + ECHO "archive with 'dist' in the name, not the one labeled: 'source'." + EXIT +) + +set JAVA_EXEC=java +if not defined JAVA_HOME ( + set JAVA_EXEC=java + echo No Java Home was found. Using current path. If execution fails please install Java and make sure it is in the search path or exposed via the JAVA_HOME environment variable. +) else ( + echo JAVA_HOME found, using !JAVA_HOME! + set JAVA_EXEC=!JAVA_HOME!\bin\java +) + +if not defined DIAG_JAVA_OPTIONS ( + set DIAG_JAVA_OPTIONS=-Xmx2000m +) + +"%JAVA_EXEC%" %DIAG_JAVA_OPTIONS% -cp %diagpath%;%diagpath%\lib\* com.elastic.support.monitoring.MonitoringImportApp %* + +endlocal diff --git a/support-diagnostics-8.0.3/import-monitoring.sh b/support-diagnostics-8.0.3/import-monitoring.sh new file mode 100755 index 0000000..4e442f1 --- /dev/null +++ b/support-diagnostics-8.0.3/import-monitoring.sh @@ -0,0 +1,31 @@ +#!/usr/bin/env bash + +scriptDir=$0 +scriptDir=${scriptDir/\/import-monitoring.sh/$''} +libDir=$scriptDir'/lib' + +if [ -d "libDir" ]; then + echo "Runtimes library does not exist - make sure you are running the " + echo "archive with 'dist' in the name, not the one labeled: 'source'." + exit +fi + +if [ -x "$JAVA_HOME/bin/java" ]; then + JAVA="$JAVA_HOME/bin/java" +else + JAVA=`which java` +fi + +echo "Using ${JAVA} as Java Runtime" + +if [ ! -x "$JAVA" ]; then + echo "Could not find any executable java binary. Please install java in your PATH and/or set JAVA_HOME" + exit 1 +fi + +[[ ${DIAG_DEBUG} != "" ]] && export DIAG_DEBUG_OPTS=" -Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=8000,suspend=y" + +[[ ${DIAG_JAVA_OPTS} == "" ]] && export DIAG_JAVA_OPTS="-Xms256m -Xmx2000m" + +echo "Using ${DIAG_JAVA_OPTS} ${DIAG_DEBUG_OPTS} for options." +"$JAVA" $DIAG_JAVA_OPTS ${DIAG_DEBUG_OPTS} -cp ${scriptDir}:${scriptDir}/lib/* com.elastic.support.monitoring.MonitoringImportApp "$@" \ No newline at end of file diff --git a/support-diagnostics-8.0.3/lib/accessors-smart-1.2.jar b/support-diagnostics-8.0.3/lib/accessors-smart-1.2.jar new file mode 100644 index 0000000..f4505e9 Binary files /dev/null and b/support-diagnostics-8.0.3/lib/accessors-smart-1.2.jar differ diff --git a/support-diagnostics-8.0.3/lib/activation-1.1.jar b/support-diagnostics-8.0.3/lib/activation-1.1.jar new file mode 100644 index 0000000..53f82a1 Binary files /dev/null and b/support-diagnostics-8.0.3/lib/activation-1.1.jar differ diff --git a/support-diagnostics-8.0.3/lib/android-json-0.0.20131108.vaadin1.jar b/support-diagnostics-8.0.3/lib/android-json-0.0.20131108.vaadin1.jar new file mode 100644 index 0000000..add495f Binary files /dev/null and b/support-diagnostics-8.0.3/lib/android-json-0.0.20131108.vaadin1.jar differ diff --git a/support-diagnostics-8.0.3/lib/apiguardian-api-1.1.0.jar b/support-diagnostics-8.0.3/lib/apiguardian-api-1.1.0.jar new file mode 100644 index 0000000..e6fcead Binary files /dev/null and b/support-diagnostics-8.0.3/lib/apiguardian-api-1.1.0.jar differ diff --git a/support-diagnostics-8.0.3/lib/asm-5.0.4.jar b/support-diagnostics-8.0.3/lib/asm-5.0.4.jar new file mode 100644 index 0000000..cdb283d Binary files /dev/null and b/support-diagnostics-8.0.3/lib/asm-5.0.4.jar differ diff --git a/support-diagnostics-8.0.3/lib/awt-color-factory-1.0.1.jar b/support-diagnostics-8.0.3/lib/awt-color-factory-1.0.1.jar new file mode 100644 index 0000000..b261126 Binary files /dev/null and b/support-diagnostics-8.0.3/lib/awt-color-factory-1.0.1.jar differ diff --git a/support-diagnostics-8.0.3/lib/bcpkix-jdk15on-1.60.jar b/support-diagnostics-8.0.3/lib/bcpkix-jdk15on-1.60.jar new file mode 100644 index 0000000..87ce8b4 Binary files /dev/null and b/support-diagnostics-8.0.3/lib/bcpkix-jdk15on-1.60.jar differ diff --git a/support-diagnostics-8.0.3/lib/bcprov-jdk15on-1.60.jar b/support-diagnostics-8.0.3/lib/bcprov-jdk15on-1.60.jar new file mode 100644 index 0000000..5be567c Binary files /dev/null and b/support-diagnostics-8.0.3/lib/bcprov-jdk15on-1.60.jar differ diff --git a/support-diagnostics-8.0.3/lib/btf-1.2.jar b/support-diagnostics-8.0.3/lib/btf-1.2.jar new file mode 100644 index 0000000..bbeee88 Binary files /dev/null and b/support-diagnostics-8.0.3/lib/btf-1.2.jar differ diff --git a/support-diagnostics-8.0.3/lib/common-java5-2.22.0.jar b/support-diagnostics-8.0.3/lib/common-java5-2.22.0.jar new file mode 100644 index 0000000..a69372e Binary files /dev/null and b/support-diagnostics-8.0.3/lib/common-java5-2.22.0.jar differ diff --git a/support-diagnostics-8.0.3/lib/commons-beanutils-1.9.4.jar b/support-diagnostics-8.0.3/lib/commons-beanutils-1.9.4.jar new file mode 100644 index 0000000..b73543c Binary files /dev/null and b/support-diagnostics-8.0.3/lib/commons-beanutils-1.9.4.jar differ diff --git a/support-diagnostics-8.0.3/lib/commons-codec-1.11.jar b/support-diagnostics-8.0.3/lib/commons-codec-1.11.jar new file mode 100644 index 0000000..2245120 Binary files /dev/null and b/support-diagnostics-8.0.3/lib/commons-codec-1.11.jar differ diff --git a/support-diagnostics-8.0.3/lib/commons-collections-3.2.2.jar b/support-diagnostics-8.0.3/lib/commons-collections-3.2.2.jar new file mode 100644 index 0000000..fa5df82 Binary files /dev/null and b/support-diagnostics-8.0.3/lib/commons-collections-3.2.2.jar differ diff --git a/support-diagnostics-8.0.3/lib/commons-collections4-4.2.jar b/support-diagnostics-8.0.3/lib/commons-collections4-4.2.jar new file mode 100644 index 0000000..73a4f3f Binary files /dev/null and b/support-diagnostics-8.0.3/lib/commons-collections4-4.2.jar differ diff --git a/support-diagnostics-8.0.3/lib/commons-compress-1.19.jar b/support-diagnostics-8.0.3/lib/commons-compress-1.19.jar new file mode 100644 index 0000000..5c9f52a Binary files /dev/null and b/support-diagnostics-8.0.3/lib/commons-compress-1.19.jar differ diff --git a/support-diagnostics-8.0.3/lib/commons-io-2.6.jar b/support-diagnostics-8.0.3/lib/commons-io-2.6.jar new file mode 100644 index 0000000..00556b1 Binary files /dev/null and b/support-diagnostics-8.0.3/lib/commons-io-2.6.jar differ diff --git a/support-diagnostics-8.0.3/lib/commons-lang3-3.9.jar b/support-diagnostics-8.0.3/lib/commons-lang3-3.9.jar new file mode 100644 index 0000000..0d89693 Binary files /dev/null and b/support-diagnostics-8.0.3/lib/commons-lang3-3.9.jar differ diff --git a/support-diagnostics-8.0.3/lib/commons-logging-1.2.jar b/support-diagnostics-8.0.3/lib/commons-logging-1.2.jar new file mode 100644 index 0000000..93a3b9f Binary files /dev/null and b/support-diagnostics-8.0.3/lib/commons-logging-1.2.jar differ diff --git a/support-diagnostics-8.0.3/lib/commons-text-1.3.jar b/support-diagnostics-8.0.3/lib/commons-text-1.3.jar new file mode 100644 index 0000000..0ec9e48 Binary files /dev/null and b/support-diagnostics-8.0.3/lib/commons-text-1.3.jar differ diff --git a/support-diagnostics-8.0.3/lib/guava-20.0.jar b/support-diagnostics-8.0.3/lib/guava-20.0.jar new file mode 100644 index 0000000..632772f Binary files /dev/null and b/support-diagnostics-8.0.3/lib/guava-20.0.jar differ diff --git a/support-diagnostics-8.0.3/lib/hamcrest-core-1.3.jar b/support-diagnostics-8.0.3/lib/hamcrest-core-1.3.jar new file mode 100644 index 0000000..9d5fe16 Binary files /dev/null and b/support-diagnostics-8.0.3/lib/hamcrest-core-1.3.jar differ diff --git a/support-diagnostics-8.0.3/lib/httpclient-4.5.10.jar b/support-diagnostics-8.0.3/lib/httpclient-4.5.10.jar new file mode 100644 index 0000000..d0c7821 Binary files /dev/null and b/support-diagnostics-8.0.3/lib/httpclient-4.5.10.jar differ diff --git a/support-diagnostics-8.0.3/lib/httpcore-4.4.12.jar b/support-diagnostics-8.0.3/lib/httpcore-4.4.12.jar new file mode 100644 index 0000000..1838672 Binary files /dev/null and b/support-diagnostics-8.0.3/lib/httpcore-4.4.12.jar differ diff --git a/support-diagnostics-8.0.3/lib/jackson-annotations-2.10.1.jar b/support-diagnostics-8.0.3/lib/jackson-annotations-2.10.1.jar new file mode 100644 index 0000000..a10399c Binary files /dev/null and b/support-diagnostics-8.0.3/lib/jackson-annotations-2.10.1.jar differ diff --git a/support-diagnostics-8.0.3/lib/jackson-core-2.10.1.jar b/support-diagnostics-8.0.3/lib/jackson-core-2.10.1.jar new file mode 100644 index 0000000..1640a4e Binary files /dev/null and b/support-diagnostics-8.0.3/lib/jackson-core-2.10.1.jar differ diff --git a/support-diagnostics-8.0.3/lib/jackson-coreutils-1.9.jar b/support-diagnostics-8.0.3/lib/jackson-coreutils-1.9.jar new file mode 100644 index 0000000..d74f5c5 Binary files /dev/null and b/support-diagnostics-8.0.3/lib/jackson-coreutils-1.9.jar differ diff --git a/support-diagnostics-8.0.3/lib/jackson-databind-2.10.1.jar b/support-diagnostics-8.0.3/lib/jackson-databind-2.10.1.jar new file mode 100644 index 0000000..abe3748 Binary files /dev/null and b/support-diagnostics-8.0.3/lib/jackson-databind-2.10.1.jar differ diff --git a/support-diagnostics-8.0.3/lib/javax.activation-api-1.2.0.jar b/support-diagnostics-8.0.3/lib/javax.activation-api-1.2.0.jar new file mode 100644 index 0000000..986c365 Binary files /dev/null and b/support-diagnostics-8.0.3/lib/javax.activation-api-1.2.0.jar differ diff --git a/support-diagnostics-8.0.3/lib/javax.json-1.0.4.jar b/support-diagnostics-8.0.3/lib/javax.json-1.0.4.jar new file mode 100644 index 0000000..09967d8 Binary files /dev/null and b/support-diagnostics-8.0.3/lib/javax.json-1.0.4.jar differ diff --git a/support-diagnostics-8.0.3/lib/javax.servlet-api-3.1.0.jar b/support-diagnostics-8.0.3/lib/javax.servlet-api-3.1.0.jar new file mode 100644 index 0000000..6b14c3d Binary files /dev/null and b/support-diagnostics-8.0.3/lib/javax.servlet-api-3.1.0.jar differ diff --git a/support-diagnostics-8.0.3/lib/jaxb-api-2.4.0-b180830.0359.jar b/support-diagnostics-8.0.3/lib/jaxb-api-2.4.0-b180830.0359.jar new file mode 100644 index 0000000..dcd345c Binary files /dev/null and b/support-diagnostics-8.0.3/lib/jaxb-api-2.4.0-b180830.0359.jar differ diff --git a/support-diagnostics-8.0.3/lib/jaxb-core-2.3.0.1.jar b/support-diagnostics-8.0.3/lib/jaxb-core-2.3.0.1.jar new file mode 100644 index 0000000..431e143 Binary files /dev/null and b/support-diagnostics-8.0.3/lib/jaxb-core-2.3.0.1.jar differ diff --git a/support-diagnostics-8.0.3/lib/jaxb-impl-2.3.2.jar b/support-diagnostics-8.0.3/lib/jaxb-impl-2.3.2.jar new file mode 100644 index 0000000..58035e8 Binary files /dev/null and b/support-diagnostics-8.0.3/lib/jaxb-impl-2.3.2.jar differ diff --git a/support-diagnostics-8.0.3/lib/jcommander-1.78.jar b/support-diagnostics-8.0.3/lib/jcommander-1.78.jar new file mode 100644 index 0000000..1d58673 Binary files /dev/null and b/support-diagnostics-8.0.3/lib/jcommander-1.78.jar differ diff --git a/support-diagnostics-8.0.3/lib/jline-2.14.6.jar b/support-diagnostics-8.0.3/lib/jline-2.14.6.jar new file mode 100644 index 0000000..fe11ed5 Binary files /dev/null and b/support-diagnostics-8.0.3/lib/jline-2.14.6.jar differ diff --git a/support-diagnostics-8.0.3/lib/jna-5.3.1.jar b/support-diagnostics-8.0.3/lib/jna-5.3.1.jar new file mode 100644 index 0000000..d4a9471 Binary files /dev/null and b/support-diagnostics-8.0.3/lib/jna-5.3.1.jar differ diff --git a/support-diagnostics-8.0.3/lib/jna-platform-5.3.1.jar b/support-diagnostics-8.0.3/lib/jna-platform-5.3.1.jar new file mode 100644 index 0000000..cbc7ba1 Binary files /dev/null and b/support-diagnostics-8.0.3/lib/jna-platform-5.3.1.jar differ diff --git a/support-diagnostics-8.0.3/lib/joda-time-2.9.7.jar b/support-diagnostics-8.0.3/lib/joda-time-2.9.7.jar new file mode 100644 index 0000000..a7657d6 Binary files /dev/null and b/support-diagnostics-8.0.3/lib/joda-time-2.9.7.jar differ diff --git a/support-diagnostics-8.0.3/lib/jopt-simple-5.0.3.jar b/support-diagnostics-8.0.3/lib/jopt-simple-5.0.3.jar new file mode 100644 index 0000000..39a78d0 Binary files /dev/null and b/support-diagnostics-8.0.3/lib/jopt-simple-5.0.3.jar differ diff --git a/support-diagnostics-8.0.3/lib/jsch-0.1.55.jar b/support-diagnostics-8.0.3/lib/jsch-0.1.55.jar new file mode 100644 index 0000000..c6fd21d Binary files /dev/null and b/support-diagnostics-8.0.3/lib/jsch-0.1.55.jar differ diff --git a/support-diagnostics-8.0.3/lib/json-path-2.4.0.jar b/support-diagnostics-8.0.3/lib/json-path-2.4.0.jar new file mode 100644 index 0000000..6229306 Binary files /dev/null and b/support-diagnostics-8.0.3/lib/json-path-2.4.0.jar differ diff --git a/support-diagnostics-8.0.3/lib/json-schema-core-1.2.10.jar b/support-diagnostics-8.0.3/lib/json-schema-core-1.2.10.jar new file mode 100644 index 0000000..a1d727f Binary files /dev/null and b/support-diagnostics-8.0.3/lib/json-schema-core-1.2.10.jar differ diff --git a/support-diagnostics-8.0.3/lib/json-schema-validator-2.2.10.jar b/support-diagnostics-8.0.3/lib/json-schema-validator-2.2.10.jar new file mode 100644 index 0000000..8734cc5 Binary files /dev/null and b/support-diagnostics-8.0.3/lib/json-schema-validator-2.2.10.jar differ diff --git a/support-diagnostics-8.0.3/lib/json-smart-2.3.jar b/support-diagnostics-8.0.3/lib/json-smart-2.3.jar new file mode 100644 index 0000000..0cd52ea Binary files /dev/null and b/support-diagnostics-8.0.3/lib/json-smart-2.3.jar differ diff --git a/support-diagnostics-8.0.3/lib/jsonassert-1.5.0.jar b/support-diagnostics-8.0.3/lib/jsonassert-1.5.0.jar new file mode 100644 index 0000000..aec04c5 Binary files /dev/null and b/support-diagnostics-8.0.3/lib/jsonassert-1.5.0.jar differ diff --git a/support-diagnostics-8.0.3/lib/jsr305-3.0.1.jar b/support-diagnostics-8.0.3/lib/jsr305-3.0.1.jar new file mode 100644 index 0000000..021df89 Binary files /dev/null and b/support-diagnostics-8.0.3/lib/jsr305-3.0.1.jar differ diff --git a/support-diagnostics-8.0.3/lib/junit-4.12.jar b/support-diagnostics-8.0.3/lib/junit-4.12.jar new file mode 100644 index 0000000..3a7fc26 Binary files /dev/null and b/support-diagnostics-8.0.3/lib/junit-4.12.jar differ diff --git a/support-diagnostics-8.0.3/lib/junit-jupiter-api-5.5.2.jar b/support-diagnostics-8.0.3/lib/junit-jupiter-api-5.5.2.jar new file mode 100644 index 0000000..a025d98 Binary files /dev/null and b/support-diagnostics-8.0.3/lib/junit-jupiter-api-5.5.2.jar differ diff --git a/support-diagnostics-8.0.3/lib/junit-jupiter-engine-5.5.2.jar b/support-diagnostics-8.0.3/lib/junit-jupiter-engine-5.5.2.jar new file mode 100644 index 0000000..f09e23c Binary files /dev/null and b/support-diagnostics-8.0.3/lib/junit-jupiter-engine-5.5.2.jar differ diff --git a/support-diagnostics-8.0.3/lib/junit-platform-commons-1.5.2.jar b/support-diagnostics-8.0.3/lib/junit-platform-commons-1.5.2.jar new file mode 100644 index 0000000..3a09812 Binary files /dev/null and b/support-diagnostics-8.0.3/lib/junit-platform-commons-1.5.2.jar differ diff --git a/support-diagnostics-8.0.3/lib/junit-platform-engine-1.5.2.jar b/support-diagnostics-8.0.3/lib/junit-platform-engine-1.5.2.jar new file mode 100644 index 0000000..de86ab7 Binary files /dev/null and b/support-diagnostics-8.0.3/lib/junit-platform-engine-1.5.2.jar differ diff --git a/support-diagnostics-8.0.3/lib/junit-platform-launcher-1.5.2.jar b/support-diagnostics-8.0.3/lib/junit-platform-launcher-1.5.2.jar new file mode 100644 index 0000000..bbce70b Binary files /dev/null and b/support-diagnostics-8.0.3/lib/junit-platform-launcher-1.5.2.jar differ diff --git a/support-diagnostics-8.0.3/lib/junit-platform-surefire-provider-1.3.2.jar b/support-diagnostics-8.0.3/lib/junit-platform-surefire-provider-1.3.2.jar new file mode 100644 index 0000000..dade875 Binary files /dev/null and b/support-diagnostics-8.0.3/lib/junit-platform-surefire-provider-1.3.2.jar differ diff --git a/support-diagnostics-8.0.3/lib/junit-vintage-engine-5.5.2.jar b/support-diagnostics-8.0.3/lib/junit-vintage-engine-5.5.2.jar new file mode 100644 index 0000000..c16c6e4 Binary files /dev/null and b/support-diagnostics-8.0.3/lib/junit-vintage-engine-5.5.2.jar differ diff --git a/support-diagnostics-8.0.3/lib/jzlib-1.1.3.jar b/support-diagnostics-8.0.3/lib/jzlib-1.1.3.jar new file mode 100644 index 0000000..2fa60b1 Binary files /dev/null and b/support-diagnostics-8.0.3/lib/jzlib-1.1.3.jar differ diff --git a/support-diagnostics-8.0.3/lib/libphonenumber-8.0.0.jar b/support-diagnostics-8.0.3/lib/libphonenumber-8.0.0.jar new file mode 100644 index 0000000..8fdb510 Binary files /dev/null and b/support-diagnostics-8.0.3/lib/libphonenumber-8.0.0.jar differ diff --git a/support-diagnostics-8.0.3/lib/log4j-api-2.12.1.jar b/support-diagnostics-8.0.3/lib/log4j-api-2.12.1.jar new file mode 100644 index 0000000..d34694f Binary files /dev/null and b/support-diagnostics-8.0.3/lib/log4j-api-2.12.1.jar differ diff --git a/support-diagnostics-8.0.3/lib/log4j-core-2.12.1.jar b/support-diagnostics-8.0.3/lib/log4j-core-2.12.1.jar new file mode 100644 index 0000000..558229b Binary files /dev/null and b/support-diagnostics-8.0.3/lib/log4j-core-2.12.1.jar differ diff --git a/support-diagnostics-8.0.3/lib/log4j-jcl-2.12.1.jar b/support-diagnostics-8.0.3/lib/log4j-jcl-2.12.1.jar new file mode 100644 index 0000000..260a75f Binary files /dev/null and b/support-diagnostics-8.0.3/lib/log4j-jcl-2.12.1.jar differ diff --git a/support-diagnostics-8.0.3/lib/log4j-slf4j-impl-2.12.1.jar b/support-diagnostics-8.0.3/lib/log4j-slf4j-impl-2.12.1.jar new file mode 100644 index 0000000..96e27c7 Binary files /dev/null and b/support-diagnostics-8.0.3/lib/log4j-slf4j-impl-2.12.1.jar differ diff --git a/support-diagnostics-8.0.3/lib/mailapi-1.4.3.jar b/support-diagnostics-8.0.3/lib/mailapi-1.4.3.jar new file mode 100644 index 0000000..aeb7711 Binary files /dev/null and b/support-diagnostics-8.0.3/lib/mailapi-1.4.3.jar differ diff --git a/support-diagnostics-8.0.3/lib/mockserver-client-java-5.5.1.jar b/support-diagnostics-8.0.3/lib/mockserver-client-java-5.5.1.jar new file mode 100644 index 0000000..da87bc3 Binary files /dev/null and b/support-diagnostics-8.0.3/lib/mockserver-client-java-5.5.1.jar differ diff --git a/support-diagnostics-8.0.3/lib/mockserver-core-5.5.1.jar b/support-diagnostics-8.0.3/lib/mockserver-core-5.5.1.jar new file mode 100644 index 0000000..2d01781 Binary files /dev/null and b/support-diagnostics-8.0.3/lib/mockserver-core-5.5.1.jar differ diff --git a/support-diagnostics-8.0.3/lib/mockserver-netty-5.5.1.jar b/support-diagnostics-8.0.3/lib/mockserver-netty-5.5.1.jar new file mode 100644 index 0000000..ba54e78 Binary files /dev/null and b/support-diagnostics-8.0.3/lib/mockserver-netty-5.5.1.jar differ diff --git a/support-diagnostics-8.0.3/lib/msg-simple-1.1.jar b/support-diagnostics-8.0.3/lib/msg-simple-1.1.jar new file mode 100644 index 0000000..db74210 Binary files /dev/null and b/support-diagnostics-8.0.3/lib/msg-simple-1.1.jar differ diff --git a/support-diagnostics-8.0.3/lib/netty-buffer-4.1.32.Final.jar b/support-diagnostics-8.0.3/lib/netty-buffer-4.1.32.Final.jar new file mode 100644 index 0000000..cf4e81d Binary files /dev/null and b/support-diagnostics-8.0.3/lib/netty-buffer-4.1.32.Final.jar differ diff --git a/support-diagnostics-8.0.3/lib/netty-codec-4.1.32.Final.jar b/support-diagnostics-8.0.3/lib/netty-codec-4.1.32.Final.jar new file mode 100644 index 0000000..2ef30c6 Binary files /dev/null and b/support-diagnostics-8.0.3/lib/netty-codec-4.1.32.Final.jar differ diff --git a/support-diagnostics-8.0.3/lib/netty-codec-http-4.1.32.Final.jar b/support-diagnostics-8.0.3/lib/netty-codec-http-4.1.32.Final.jar new file mode 100644 index 0000000..b9366d4 Binary files /dev/null and b/support-diagnostics-8.0.3/lib/netty-codec-http-4.1.32.Final.jar differ diff --git a/support-diagnostics-8.0.3/lib/netty-codec-socks-4.1.32.Final.jar b/support-diagnostics-8.0.3/lib/netty-codec-socks-4.1.32.Final.jar new file mode 100644 index 0000000..a6f9b69 Binary files /dev/null and b/support-diagnostics-8.0.3/lib/netty-codec-socks-4.1.32.Final.jar differ diff --git a/support-diagnostics-8.0.3/lib/netty-common-4.1.32.Final.jar b/support-diagnostics-8.0.3/lib/netty-common-4.1.32.Final.jar new file mode 100644 index 0000000..36b67bc Binary files /dev/null and b/support-diagnostics-8.0.3/lib/netty-common-4.1.32.Final.jar differ diff --git a/support-diagnostics-8.0.3/lib/netty-handler-4.1.32.Final.jar b/support-diagnostics-8.0.3/lib/netty-handler-4.1.32.Final.jar new file mode 100644 index 0000000..c24540f Binary files /dev/null and b/support-diagnostics-8.0.3/lib/netty-handler-4.1.32.Final.jar differ diff --git a/support-diagnostics-8.0.3/lib/netty-handler-proxy-4.1.32.Final.jar b/support-diagnostics-8.0.3/lib/netty-handler-proxy-4.1.32.Final.jar new file mode 100644 index 0000000..fee3c93 Binary files /dev/null and b/support-diagnostics-8.0.3/lib/netty-handler-proxy-4.1.32.Final.jar differ diff --git a/support-diagnostics-8.0.3/lib/netty-resolver-4.1.32.Final.jar b/support-diagnostics-8.0.3/lib/netty-resolver-4.1.32.Final.jar new file mode 100644 index 0000000..40cb359 Binary files /dev/null and b/support-diagnostics-8.0.3/lib/netty-resolver-4.1.32.Final.jar differ diff --git a/support-diagnostics-8.0.3/lib/netty-transport-4.1.32.Final.jar b/support-diagnostics-8.0.3/lib/netty-transport-4.1.32.Final.jar new file mode 100644 index 0000000..0aa6d0b Binary files /dev/null and b/support-diagnostics-8.0.3/lib/netty-transport-4.1.32.Final.jar differ diff --git a/support-diagnostics-8.0.3/lib/opentest4j-1.2.0.jar b/support-diagnostics-8.0.3/lib/opentest4j-1.2.0.jar new file mode 100644 index 0000000..d500636 Binary files /dev/null and b/support-diagnostics-8.0.3/lib/opentest4j-1.2.0.jar differ diff --git a/support-diagnostics-8.0.3/lib/oshi-core-3.13.4.jar b/support-diagnostics-8.0.3/lib/oshi-core-3.13.4.jar new file mode 100644 index 0000000..9dc2c7a Binary files /dev/null and b/support-diagnostics-8.0.3/lib/oshi-core-3.13.4.jar differ diff --git a/support-diagnostics-8.0.3/lib/oshi-json-3.13.4.jar b/support-diagnostics-8.0.3/lib/oshi-json-3.13.4.jar new file mode 100644 index 0000000..3c9a6db Binary files /dev/null and b/support-diagnostics-8.0.3/lib/oshi-json-3.13.4.jar differ diff --git a/support-diagnostics-8.0.3/lib/rhino-1.7.7.1.jar b/support-diagnostics-8.0.3/lib/rhino-1.7.7.1.jar new file mode 100644 index 0000000..a8b9417 Binary files /dev/null and b/support-diagnostics-8.0.3/lib/rhino-1.7.7.1.jar differ diff --git a/support-diagnostics-8.0.3/lib/semver4j-3.1.0.jar b/support-diagnostics-8.0.3/lib/semver4j-3.1.0.jar new file mode 100644 index 0000000..881d670 Binary files /dev/null and b/support-diagnostics-8.0.3/lib/semver4j-3.1.0.jar differ diff --git a/support-diagnostics-8.0.3/lib/slf4j-api-1.7.25.jar b/support-diagnostics-8.0.3/lib/slf4j-api-1.7.25.jar new file mode 100644 index 0000000..0143c09 Binary files /dev/null and b/support-diagnostics-8.0.3/lib/slf4j-api-1.7.25.jar differ diff --git a/support-diagnostics-8.0.3/lib/snakeyaml-1.24.jar b/support-diagnostics-8.0.3/lib/snakeyaml-1.24.jar new file mode 100644 index 0000000..07cee32 Binary files /dev/null and b/support-diagnostics-8.0.3/lib/snakeyaml-1.24.jar differ diff --git a/support-diagnostics-8.0.3/lib/support-diagnostics-8.0.3.jar b/support-diagnostics-8.0.3/lib/support-diagnostics-8.0.3.jar new file mode 100644 index 0000000..20c95c6 Binary files /dev/null and b/support-diagnostics-8.0.3/lib/support-diagnostics-8.0.3.jar differ diff --git a/support-diagnostics-8.0.3/lib/surefire-api-2.22.0.jar b/support-diagnostics-8.0.3/lib/surefire-api-2.22.0.jar new file mode 100644 index 0000000..7eac6c9 Binary files /dev/null and b/support-diagnostics-8.0.3/lib/surefire-api-2.22.0.jar differ diff --git a/support-diagnostics-8.0.3/lib/surefire-logger-api-2.22.0.jar b/support-diagnostics-8.0.3/lib/surefire-logger-api-2.22.0.jar new file mode 100644 index 0000000..c967534 Binary files /dev/null and b/support-diagnostics-8.0.3/lib/surefire-logger-api-2.22.0.jar differ diff --git a/support-diagnostics-8.0.3/lib/text-io-3.4.0.jar b/support-diagnostics-8.0.3/lib/text-io-3.4.0.jar new file mode 100644 index 0000000..2d0806a Binary files /dev/null and b/support-diagnostics-8.0.3/lib/text-io-3.4.0.jar differ diff --git a/support-diagnostics-8.0.3/lib/uri-template-0.9.jar b/support-diagnostics-8.0.3/lib/uri-template-0.9.jar new file mode 100644 index 0000000..fa50197 Binary files /dev/null and b/support-diagnostics-8.0.3/lib/uri-template-0.9.jar differ diff --git a/support-diagnostics-8.0.3/lib/velocity-engine-core-2.0.jar b/support-diagnostics-8.0.3/lib/velocity-engine-core-2.0.jar new file mode 100644 index 0000000..c48d660 Binary files /dev/null and b/support-diagnostics-8.0.3/lib/velocity-engine-core-2.0.jar differ diff --git a/support-diagnostics-8.0.3/lib/velocity-engine-scripting-2.0.jar b/support-diagnostics-8.0.3/lib/velocity-engine-scripting-2.0.jar new file mode 100644 index 0000000..3f169e3 Binary files /dev/null and b/support-diagnostics-8.0.3/lib/velocity-engine-scripting-2.0.jar differ diff --git a/support-diagnostics-8.0.3/lib/xmlunit-core-2.6.2.jar b/support-diagnostics-8.0.3/lib/xmlunit-core-2.6.2.jar new file mode 100644 index 0000000..dec8eb5 Binary files /dev/null and b/support-diagnostics-8.0.3/lib/xmlunit-core-2.6.2.jar differ diff --git a/support-diagnostics-8.0.3/scrub.bat b/support-diagnostics-8.0.3/scrub.bat new file mode 100644 index 0000000..3133b5a --- /dev/null +++ b/support-diagnostics-8.0.3/scrub.bat @@ -0,0 +1,29 @@ +@echo off +setlocal enabledelayedexpansion + +SET scriptpath=%~dp0 +SET diagpath=%scriptpath:~0,-1% +SET libpath=%diagpath%\lib\NUL + +IF NOT EXIST %libpath% ( + ECHO "Runtimes library does not exist - make sure you are running the " + ECHO "archive with 'dist' in the name, not the one labeled: 'source'." + EXIT +) + +set JAVA_EXEC=java +if not defined JAVA_HOME ( + set JAVA_EXEC=java + echo No Java Home was found. Using current path. If execution fails please install Java and make sure it is in the search path or exposed via the JAVA_HOME environment variable. +) else ( + echo JAVA_HOME found, using !JAVA_HOME! + set JAVA_EXEC=!JAVA_HOME!\bin\java +) + +if not defined DIAG_JAVA_OPTIONS ( + set DIAG_JAVA_OPTIONS=-Xmx2000m +) + +"%JAVA_EXEC%" %DIAG_JAVA_OPTIONS% -cp %diagpath%;%diagpath%\lib\* com.elastic.support.scrub.ScrubApp %* + +endlocal diff --git a/support-diagnostics-8.0.3/scrub.sh b/support-diagnostics-8.0.3/scrub.sh new file mode 100755 index 0000000..3d0191d --- /dev/null +++ b/support-diagnostics-8.0.3/scrub.sh @@ -0,0 +1,31 @@ +#!/usr/bin/env bash + +scriptDir=$0 +scriptDir=${scriptDir/\/scrub.sh/$''} +libDir=$scriptDir'/lib' + +if [ -d "libDir" ]; then + echo "Runtimes library does not exist - make sure you are running the " + echo "archive with 'dist-' in the name, not the one labeled: 'source'." + exit +fi + +if [ -x "$JAVA_HOME/bin/java" ]; then + JAVA="$JAVA_HOME/bin/java" +else + JAVA=`which java` +fi + +echo "Using ${JAVA} as Java Runtime" + +if [ ! -x "$JAVA" ]; then + echo "Could not find any executable java binary. Please install java in your PATH and/or set JAVA_HOME" + exit 1 +fi + +[[ ${DIAG_DEBUG} != "" ]] && export DIAG_DEBUG_OPTS=" -Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=8000,suspend=y" + +[[ ${DIAG_JAVA_OPTS} == "" ]] && export DIAG_JAVA_OPTS="-Xms256m -Xmx2000m" + +echo "Using ${DIAG_JAVA_OPTS} ${DIAG_DEBUG_OPTS} for options." +"$JAVA" $DIAG_JAVA_OPTS ${DIAG_DEBUG_OPTS} -cp ${scriptDir}:${scriptDir}/lib/* com.elastic.support.scrub.ScrubApp "$@" \ No newline at end of file diff --git a/support-diagnostics-8.0.3/scrub.yml b/support-diagnostics-8.0.3/scrub.yml new file mode 100644 index 0000000..3514300 --- /dev/null +++ b/support-diagnostics-8.0.3/scrub.yml @@ -0,0 +1,6 @@ +tokens: +# Examples: +# - node-[\d?]* +# - cluster-630 +# - disk1 +# - Typhoid diff --git a/wait_for_es.sh b/wait_for_es.sh new file mode 100755 index 0000000..67215f1 --- /dev/null +++ b/wait_for_es.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +host="$1" + +# First wait for ES to start... +response=$(curl --write-out %{http_code} --silent --output /dev/null "$host") +until [ "$response" = "200" ]; do + response=$(curl --write-out %{http_code} --silent --output /dev/null "$host") + >&2 echo "Waiting for ElasticSearch to boot up..." + sleep 1 +done + +# next wait for ES status to turn to Yellow +health="$(curl -fsSL "$host/_cat/health?h=status")" +health="$(echo "$health" | sed -r 's/^[[:space:]]+|[[:space:]]+$//g')" # trim whitespace (otherwise we'll have "yellow ") +until [[ "$health" = 'yellow' || "$health" = "green" ]]; do + health="$(curl -fsSL "$host/_cat/health?h=status")" + health="$(echo "$health" | sed -r 's/^[[:space:]]+|[[:space:]]+$//g')" # trim whitespace (otherwise we'll have "yellow ") + >&2 echo "Waiting for ElasticSearch to boot up..." + sleep 1 +done + +>&2 echo "ElasticSearch is up" \ No newline at end of file