Giter VIP home page Giter VIP logo

docker_observability's Introduction

Observability, what the heck is that?

Knowing everything about the application / service that you are providing so that you can answer the questions "How is your app doing?", "what is the user experience like?", "Why is xyz happening?", "Did you know that it was unresponsive last night at 9:15?", and of course "what was the root cause?"

The files here will get you a sample app and shippers (to collect the logs and metrics) running in a Docker env. The code for the sample app has been instrumented to collect application performance metrics (APM) and support distributed tracing. All of the data is shipped to an Elasticsearch Service on Elastic Cloud instance that you will deploy (use a trial account if you are not already a customer). You can use a self managed deployment of the Elastic Stack if you like.

Steps

Deploy an Elasticsearch Service instance on Elastic Cloud

Make sure that you have APM enabled when you create the deployment

Make sure that you copy the elastic user password. All of the other details can be retrieved later, but if you lose the elastic password you have to reset that password.

Grab this repo

git clone [email protected]:DanRoscigno/docker_observability.git

cd docker_observability/

Set your environment vars

The functionality depends on having a connection to the Elastic Stack. Edit the file environment and set your specifics. They will look something like this:

export ELASTIC_APM_SERVER_URL=https://xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.apm.europe-west1.gcp.cloud.es.io:443

export ELASTIC_CLOUD_ID=xxx:xxxxxxxxxxxxxxxxxxxxxxx==

export ELASTIC_CLOUD_CREDENTIALS=elastic:xxxxxxxxxxxxxxxxxxxxxxxx

export ELASTIC_APM_SECRET_TOKEN=##################

# This one you don't have to edit
export ELASTIC_APM_TRACE_METHODS=co.elastic.apm.opbeans.*#*

Source the environment vars

source ./environment

Grab the source for the sample app

git clone https://github.com/elastic/apm-integration-testing.git

cd apm-integration-testing

Start the app

./scripts/compose.py start master --apm-server-url=$ELASTIC_APM_SERVER_URL --apm-server-secret-token=$ELASTIC_APM_SECRET_TOKEN --no-apm-server --no-elasticsearch --no-kibana --with-opbeans-node --with-opbeans-ruby --with-opbeans-go --no-metricbeat --no-filebeat

Start collecting logs and metrics

After the downloads happen and things start running, then deploy Filebeat and Metricbeat cd ..

./metricbeat.sh

./filebeat.sh

Add in uptime / heartbeat here

Have a look

Navigate to Kibana in your Elasticsearch Service instance

docker_observability's People

Contributors

danroscigno avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.