{"id":99515,"date":"2019-10-28T15:02:08","date_gmt":"2019-10-28T13:02:08","guid":{"rendered":"http:\/\/www.javacodegeeks.com\/?p=99515"},"modified":"2019-11-04T08:53:52","modified_gmt":"2019-11-04T06:53:52","slug":"get-started-with-the-elk-stack","status":"publish","type":"post","link":"https:\/\/www.javacodegeeks.com\/2019\/10\/get-started-with-the-elk-stack.html","title":{"rendered":"Get Started with the ELK Stack"},"content":{"rendered":"<p><span style=\"font-size: 20px;\"><strong>Friends don\u2019t let friends write user auth. Tired of managing your own users?<\/strong><a href=\"https:\/\/developer.okta.com\/signup\/?utm_campaign=text_website_all_multiple_dev_dev_elk-stack_null&amp;utm_source=jcg&amp;utm_medium=cpc\"> Try Okta\u2019s API and Java SDKs today. Authenticate, manage, and secure users in any application within minutes.<\/a><\/span><\/p>\n<p>Good design principles require that microservices architectures are observable, and provide a centralized monitoring tool. This tool allows development teams to verify the overall system health, inspect logs and errors, and get feedback after deployments. So what is the Elastic (or ELK) Stack and why it is an excellent option to meet this need?<\/p>\n<p>In this tutorial post, you will learn how to \u2026<\/p>\n<ul class=\"wp-block-list\">\n<li>Set up and run the ELK stack in Docker containers<\/li>\n<li>Set up JHipster Console to monitor microservices infrastructure<\/li>\n<li>Create a microservices architecture with JHipster<\/li>\n<li>Enable monitoring with JHipster Console<\/li>\n<li>Configure OpenID Connect authentication for microservices<\/li>\n<\/ul>\n<h2 class=\"wp-block-heading\" id=\"the-evolution-of-the-elastic-stack\">The Evolution of the Elastic Stack<\/h2>\n<p>The acronym ELK stands for&nbsp;<em>Elasticsearch, Logstash, and Kibana<\/em>, three open-source projects that form a powerful stack for log ingestion and visualization, log search, event analysis, and helpful visual metrics for monitoring applications.<\/p>\n<p><em><strong>E<\/strong>lasticsearch<\/em>&nbsp;is the heart of the stack: a JSON-based search and analytics engine, distributed and scalable. It was built on top of Apache Lucene and provides a JSON REST API, cluster management, high availability, and fault tolerance.<\/p>\n<p><em><strong>L<\/strong>ogstash<\/em>&nbsp;is an ETL (extract, transform, load) tool to enrich documents, run data processing pipelines. These pipelines ingest data from multiple sources, transform and send it to Elasticsearch.<\/p>\n<p><em><strong>K<\/strong>ibana<\/em>&nbsp;provides the visualization front-end, a window into the Elastic Stack. With dashboards and visualization elements, the data stored in Elasticsearch can be explored, aggregated and analyzed.<\/p>\n<p>From version 7 on, the ELK Stack was renamed to&nbsp;<a href=\"https:\/\/www.elastic.co\/elk-stack\">Elastic Stack<\/a>&nbsp;and added Beats to the stack. Beats is a family of lightweight data shippers that work with Elasticsearch and Logstash.<\/p>\n<h2 class=\"wp-block-heading\" id=\"set-up-the-elastic-stack\">Set up the Elastic Stack<\/h2>\n<p>Elastic has published&nbsp;<a href=\"https:\/\/github.com\/elastic\/stack-docker\">a Docker Compose configuration<\/a>, to demonstrate the stack components on a single machine. Install&nbsp;<a href=\"https:\/\/docs.docker.com\/install\/\">Docker<\/a>&nbsp;and&nbsp;<a href=\"https:\/\/docs.docker.com\/compose\/install\/\">Docker Compose<\/a>&nbsp;and follow these steps to start up the stack:<\/p>\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p> Windows users must configure 2 environment variables, check out the instructions on the&nbsp;<a href=\"https:\/\/github.com\/elastic\/stack-docker\"><strong>stack-docker<\/strong>&nbsp;github repository<\/a><br \/>Allow at least 4GB of RAM for the containers, also check out instructions for your environment <\/p>\n<\/blockquote>\n<ul class=\"wp-block-list\">\n<li> Clone the&nbsp;<code style=\"font-size:13px\" class=\"highlighter-rouge\">stack-docker<\/code>&nbsp;repository <\/li>\n<\/ul>\n<pre class=\"gutter: false;brush:java\"> git clone https:\/\/github.com\/elastic\/stack-docker.git\n<\/pre>\n<ul class=\"wp-block-list\">\n<li> Setup the stack with Docker Compose <\/li>\n<\/ul>\n<pre class=\"gutter: false;brush:java\">cd stack-docker\n docker-compose -f setup.yml up\n<\/pre>\n<p>When the setup completes, it will output the&nbsp;<strong>password<\/strong>&nbsp;for the&nbsp;<strong>elastic<\/strong>&nbsp;user. On a slow connection, this can take up to 20 minutes. When it completes, you will see the following logs: <\/p>\n<pre class=\"gutter: false;brush:java\"> setup_1  | Setup completed successfully. To start the stack please run:\n setup_1  | \t docker-compose up -d\n setup_1  |\n setup_1  | If you wish to remove the setup containers please run:\n setup_1  | \tdocker-compose -f docker-compose.yml -f docker-compose.setup.yml down --remove-orphans\n setup_1  |\n setup_1  | You will have to re-start the stack after removing setup containers.\n setup_1  |\n setup_1  | Your 'elastic' user password is: Z8GFVXu9UVsBrM6nup5fHw==\n stack-docker_setup_1 exited with code 0\n<\/pre>\n<ul class=\"wp-block-list\">\n<li> Launch the stack <\/li>\n<\/ul>\n<p>Start the stack in the foreground to watch the containers logs:<\/p>\n<pre class=\"gutter: false;brush:java\">docker-compose up\n<\/pre>\n<p>When you see Kibana log the response to health check requests sent by the Beats family and you see at least one heartbeat entry in the logs, you can try the login (step 4 below): <\/p>\n<pre class=\"gutter: false;brush:bash\">kibana           | {\"type\":\"response\",\"@timestamp\":\"2019-09-23T20:38:47Z\",\"tags\":[],\"pid\":1,\"method\":\"get\",\"statusCode\":200,\"req\":{\"url\":\"\/login?next=%2F\",\"method\":\"get\",\"headers\":{\"host\":\"kibana:5601\",\"user-agent\":\"Go-http-client\/1.1\",\"referer\":\"http:\/\/kibana:5601\"},\"remoteAddress\":\"172.25.0.9\",\"userAgent\":\"172.25.0.9\",\"referer\":\"http:\/\/kibana:5601\"},\"res\":{\"statusCode\":200,\"responseTime\":30,\"contentLength\":9},\"message\":\"GET \/login?next=%2F 200 30ms - 9.0B\"}\n ...\n heartbeat        | 2019-09-23T20:38:52.213Z\tINFO\t[monitoring]\tlog\/log.go:144\tNon-zero metrics in the last 30s\t{\"monitoring\": {\"metrics\": {\"beat\":{\"cpu\":{\"system\":{\"ticks\":160,\"time\":{\"ms\":50}},\"total\":{\"ticks\":430,\"time\":{\"ms\":120},\"value\":430},\"user\":{\"ticks\":270,\"time\":{\"ms\":70}}},\"handles\":{\"limit\":{\"hard\":1048576,\"soft\":1048576},\"open\":9},\"info\":{\"ephemeral_id\":\"d8d4f6a2-39fa-41cb-9e9c-520438d49a9e\",\"uptime\":{\"ms\":93132}},\"memstats\":{\"gc_next\":4194304,\"memory_alloc\":3365792,\"memory_total\":12191384,\"rss\":327680}},\"libbeat\":{\"config\":{\"module\":{\"running\":0}},\"output\":{\"events\":{\"acked\":24,\"batches\":6,\"total\":24},\"read\":{\"bytes\":5970},\"write\":{\"bytes\":16878}},\"pipeline\":{\"clients\":4,\"events\":{\"active\":0,\"published\":24,\"total\":24},\"queue\":{\"acked\":24}}},\"system\":{\"load\":{\"1\":4.83,\"15\":2.43,\"5\":3.44,\"norm\":{\"1\":1.2075,\"15\":0.6075,\"5\":0.86}}}}}}\n<\/pre>\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p> You may notice exceptions in the log output. For this demonstration, they can be safely ignored. If you run into any issues with docker, you can start fresh with:<br \/><code style=\"font-size:13px\" class=\"highlighter-rouge\"> docker container ls -a | cut -c1-12 | xargs docker container rm --force  docker images | cut -c69-80 | xargs docker rmi  docker system prune -a <\/code><br \/><strong>NOTE:<\/strong>&nbsp;This will destroy all docker containers, images and networks, so use at your own risk. <\/p>\n<\/blockquote>\n<ul class=\"wp-block-list\">\n<li> Go to&nbsp;<a href=\"http:\/\/localhost:5601\/\">http:\/\/localhost:5601<\/a>&nbsp;to log into Kibana. <\/li>\n<\/ul>\n<p>Once you log in (using the&nbsp;<strong>elastic<\/strong>&nbsp;user and the password you captured above), explore the installed dashboards from the Dashboards section via the menu on the left. Heartbeat is one of the Beat services that monitors your services uptime from a provided list of URLs. Open the dashboard&nbsp;<em>Heartbeat HTTP monitoring<\/em>&nbsp;and see the power of the stack for data visualization. <\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><img decoding=\"async\" src=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/10\/http-heartbeat-1024x576.png\" alt=\"\" class=\"wp-image-99517\" width=\"768\" height=\"432\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/10\/http-heartbeat-1024x576.png 1024w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/10\/http-heartbeat-300x169.png 300w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/10\/http-heartbeat-768x432.png 768w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/10\/http-heartbeat.png 1600w\" sizes=\"(max-width: 768px) 100vw, 768px\" \/><\/figure>\n<\/div>\n<h2 class=\"wp-block-heading\" id=\"the-jhipster-console\">The JHipster Console<\/h2>\n<p>The Jhipster Console, an awesome monitoring solution based on the Elastic Stack, allows the visualization and analysis of JHipster applications metrics over time. The Console provides pre-configured dashboards to monitor microservices infrastructure. You can review the complete list of features in&nbsp;<a href=\"https:\/\/www.jhipster.tech\/monitoring\/#jhipster-console\">JHipster Console\u2019s documentation<\/a>.<\/p>\n<p>One of the easier ways to start with the JHipster Console is to deploy the applications and enable monitoring with the&nbsp;<a href=\"https:\/\/www.jhipster.tech\/docker-compose\/\">docker-compose sub-generator<\/a>. You\u2019ll use this to:<\/p>\n<ul class=\"wp-block-list\">\n<li>Create a microservices architecture with JHipster<\/li>\n<li>Enable monitoring with JHipster Console<\/li>\n<li>Configure OpenID Connect for authentication to microservices<\/li>\n<\/ul>\n<h2 class=\"wp-block-heading\" id=\"create-a-java-microservices-architecture-with-jhipster\">Create a Java Microservices Architecture with JHipster<\/h2>\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p> To install a version of JHipster that will work here, you need to install&nbsp;<a href=\"https:\/\/nodejs.org\/\">Node.js<\/a>. <div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<\/blockquote>\n<h3 class=\"wp-block-heading\" id=\"install-jhipster\">Install JHipster<\/h3>\n<pre class=\"gutter: false;brush:java\">npm install -g generator-jhipster@6.3.1\njhipster --version\n<\/pre>\n<p>The version command should output something like this:<\/p>\n<pre class=\"gutter: false;brush:java\">INFO! Using JHipster version installed globally\n6.3.1\n<\/pre>\n<p>Create a directory for the project:<\/p>\n<pre class=\"gutter: false;brush:java\">mkdir jhipster\ncd jhipster\n<\/pre>\n<p>Create&nbsp;<code style=\"font-size:13px\" class=\"highlighter-rouge\">apps.jh<\/code>&nbsp;to define store, blog, and gateway microservices in JHipster Domain Language (JDL). We are going to recreate&nbsp;<a href=\"https:\/\/developer.okta.com\/blog\/2019\/05\/23\/java-microservices-spring-cloud-config\/?utm_campaign=text_website_all_multiple_dev_dev_elk-stack_null&amp;utm_source=jcg&amp;utm_medium=cpc\">a Java-based example of microservices architecture we have built before<\/a>&nbsp;for this tutorial. <\/p>\n<pre class=\"gutter: false;brush:java\">application {\n  config {\n    baseName gateway,\n    packageName com.okta.developer.gateway,\n    applicationType gateway,\n    authenticationType oauth2,\n    prodDatabaseType postgresql,\n    serviceDiscoveryType eureka,\n    testFrameworks [protractor]\n  }\n  entities Blog, Post, Tag, Product\n}\n\napplication {\n  config {\n    baseName blog,\n    packageName com.okta.developer.blog,\n    applicationType microservice,\n    authenticationType oauth2,\n    prodDatabaseType postgresql,\n    serverPort 8081,\n    serviceDiscoveryType eureka\n  }\n  entities Blog, Post, Tag\n}\n\napplication {\n  config {\n    baseName store,\n    packageName com.okta.developer.store,\n    applicationType microservice,\n    authenticationType oauth2,\n    databaseType mongodb,\n    devDatabaseType mongodb,\n    prodDatabaseType mongodb,\n    enableHibernateCache false,\n    serverPort 8082,\n    serviceDiscoveryType eureka\n  }\n  entities Product\n}\n\nentity Blog {\n  name String required minlength(3),\n  handle String required minlength(2)\n}\n\nentity Post {\n  title String required,\n  content TextBlob required,\n  date Instant required\n}\n\nentity Tag {\n  name String required minlength(2)\n}\n\nentity Product {\n  title String required,\n  price BigDecimal required min(0),\n  image ImageBlob\n}\n\nrelationship ManyToOne {\n  Blog{user(login)} to User,\n  Post{blog(name)} to Blog\n}\n\nrelationship ManyToMany {\n  Post{tag(name)} to Tag{post}\n}\n\npaginate Post, Tag with infinite-scroll\npaginate Product with pagination\n\nmicroservice Product with store\nmicroservice Blog, Post, Tag with blog\n<\/pre>\n<p>Now, in your&nbsp;<code style=\"font-size:13px\" class=\"highlighter-rouge\">jhipster<\/code>&nbsp;folder, run the&nbsp;<a href=\"https:\/\/www.jhipster.tech\/jdl\/#importingjdl\"><strong>import-jdl<\/strong>&nbsp;generator<\/a>.<\/p>\n<pre class=\"gutter: false;brush:java\">jhipster import-jdl apps.jh\n<\/pre>\n<h3 class=\"wp-block-heading\" id=\"deploy-monitoring-using-docker-compose\">Deploy Monitoring using&nbsp;<code style=\"font-size:13px\" class=\"highlighter-rouge\">docker-compose<\/code><\/h3>\n<p>In the project folder, create a subfolder for the&nbsp;<code style=\"font-size:13px\" class=\"highlighter-rouge\">docker-compose<\/code>&nbsp;configuration and run the subgenerator.<\/p>\n<pre class=\"gutter: false;brush:java\">mkdir docker-compose\ncd docker-compose\njhipster docker-compose\n<\/pre>\n<p>The generator will ask you to define the following configurations:<\/p>\n<ol class=\"wp-block-list\">\n<li>Type of application:&nbsp;<strong>Microservices application<\/strong><\/li>\n<li>Type of gateway:&nbsp;<strong>JHipster based on Zuul<\/strong><\/li>\n<li>Which applications to include:&nbsp;<strong>blog<\/strong>,&nbsp;<strong>gateway<\/strong>,&nbsp;<strong>store<\/strong><\/li>\n<li>If the database is clustered:&nbsp;<strong>no<\/strong><\/li>\n<li>if monitoring must be enabled:&nbsp;<strong>yes, with JHipster console<\/strong><\/li>\n<li>Additional technologies for monitoring:&nbsp;<strong>Zipkin<\/strong><\/li>\n<li>Password for JHipster Registry:&nbsp;<strong>default<\/strong><\/li>\n<\/ol>\n<p>You can see how this works in the recording below.<\/p>\n<p><div style=\"text-align: center\">\n<script id=\"asciicast-261254\" src=\"https:\/\/asciinema.org\/a\/261254.js\" async=\"\"><\/script>\n<\/div>\n<\/p>\n<p>When the generator has almost finished, a warning shows in the output:<\/p>\n<pre class=\"gutter: false;brush:java\">WARNING! Docker Compose configuration generated, but no Jib cache found\nIf you forgot to generate the Docker image for this application, please run:\nTo generate the missing Docker image(s), please run:\n  .\/mvnw package -Pprod verify jib:dockerBuild in \/home\/indiepopart\/jhipster\/blog\n  .\/mvnw package -Pprod verify jib:dockerBuild in \/home\/indiepopart\/jhipster\/gateway\n  .\/mvnw package -Pprod verify jib:dockerBuild in \/home\/indiepopart\/jhipster\/store\n<\/pre>\n<p>You can follow the instructions above for creating the microservices images, or create an aggregator&nbsp;<code style=\"font-size:13px\" class=\"highlighter-rouge\">pom.xml<\/code>&nbsp;and use just one command for building all the images, as described in&nbsp;<a href=\"https:\/\/developer.okta.com\/blog\/2019\/05\/23\/java-microservices-spring-cloud-config\/?utm_campaign=text_website_all_multiple_dev_dev_elk-stack_null&amp;utm_source=jcg&amp;utm_medium=cpc\">our post on Java microservices<\/a>.<\/p>\n<h3 class=\"wp-block-heading\" id=\"setup-okta-openid-connect-oidc-authentication-for-your-microservices\">Setup Okta OpenID Connect (OIDC) Authentication for Your Microservices<\/h3>\n<p>By default, the microservices architecture authenticates against Keycloak. Update the settings to use Okta as the authentication provider:<\/p>\n<p>First of all, go to Okta for a&nbsp;<a href=\"https:\/\/developer.okta.com\/signup\/?utm_campaign=text_website_all_multiple_dev_dev_elk-stack_null&amp;utm_source=jcg&amp;utm_medium=cpc\">free developer account<\/a>.<\/p>\n<p>Once you log in, click&nbsp;<strong>Your Org<\/strong>, and it will take you to the&nbsp;<strong>Developer Console<\/strong>. Go to the&nbsp;<strong>Applications<\/strong>&nbsp;section and add a new&nbsp;<strong>Web Application<\/strong>. Set the following authentication settings:<\/p>\n<ul class=\"wp-block-list\">\n<li>Name: give a name for your application<\/li>\n<li>Base URIs:&nbsp;<code style=\"font-size:13px\" class=\"highlighter-rouge\">http:\/\/localhost:8761<\/code>&nbsp;and&nbsp;<code style=\"font-size:13px\" class=\"highlighter-rouge\">http:\/\/localhost:8080<\/code><\/li>\n<li>Login redirect URIs:&nbsp;<code style=\"font-size:13px\" class=\"highlighter-rouge\">http:\/\/localhost:8080\/login\/oauth2\/code\/oidc<\/code>&nbsp;and&nbsp;<code style=\"font-size:13px\" class=\"highlighter-rouge\">http:\/\/localhost:8761\/login\/oauth2\/code\/oidc<\/code><\/li>\n<li>Grant Type Allowed: Authorization Code and Refresh Token<\/li>\n<\/ul>\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>For simplicity, this tutorial only creates Web App, and its credentials will be used for all the services. In a real environment, each service must identify itself with its own credentials, and you should create one Web App or Service for each one of them in the Okta console. <\/p>\n<\/blockquote>\n<p>Copy the&nbsp;<strong>Client ID<\/strong>&nbsp;and&nbsp;<strong>Client secret<\/strong>, as we will use it for the application\u2019s setup. Find the&nbsp;<strong>Org URL<\/strong>&nbsp;at the top right corner in the Okta Dashboard.<\/p>\n<p>Create a&nbsp;<code style=\"font-size:13px\" class=\"highlighter-rouge\">docker-compose\/.env<\/code>&nbsp;file with the following content:<\/p>\n<pre class=\"gutter: false;brush:xml\">OIDC_CLIENT_ID=&lt;client_id&gt;\nOIDC_CLIENT_SECRET=&lt;client_secret&gt;\nRESOURCE_ISSUER_URI=&lt;org_url&gt;\/oauth2\/default\n<\/pre>\n<p>Edit&nbsp;<code style=\"font-size:13px\" class=\"highlighter-rouge\">docker-compose\/docker-compose.yml<\/code>&nbsp;and update the&nbsp;<code style=\"font-size:13px\" class=\"highlighter-rouge\">SECURITY_*<\/code>&nbsp;settings for the services&nbsp;<code style=\"font-size:13px\" class=\"highlighter-rouge\">blog-app<\/code>,&nbsp;<code style=\"font-size:13px\" class=\"highlighter-rouge\">gateway-app<\/code>, and&nbsp;<code style=\"font-size:13px\" class=\"highlighter-rouge\">store-app<\/code>:<\/p>\n<pre class=\"gutter: false;brush:java\">SPRING_SECURITY_OAUTH2_CLIENT_PROVIDER_OIDC_ISSUER_URI=${RESOURCE_ISSUER_URI}\nSPRING_SECURITY_OAUTH2_CLIENT_REGISTRATION_OIDC_CLIENT_ID=${OIDC_CLIENT_ID}\nSPRING_SECURITY_OAUTH2_CLIENT_REGISTRATION_OIDC_CLIENT_SECRET=${OIDC_CLIENT_SECRET}\n<\/pre>\n<p>The same authentication must be set up for the JHipster Registry. Edit&nbsp;<code style=\"font-size:13px\" class=\"highlighter-rouge\">docker-compose\/jhipster-registry.yml<\/code>&nbsp;and set the same values as the environment section of the&nbsp;<code style=\"font-size:13px\" class=\"highlighter-rouge\">gateway-app<\/code>.<\/p>\n<p>JHipster applications require the specific user roles&nbsp;<code style=\"font-size:13px\" class=\"highlighter-rouge\">ROLE_USER<\/code>&nbsp;and&nbsp;<code style=\"font-size:13px\" class=\"highlighter-rouge\">ROLE_ADMIN<\/code>&nbsp;as claims in the ID Token. In the Okta Developer Console, go to&nbsp;<strong>Users<\/strong>&nbsp;&gt;&nbsp;<strong>Groups<\/strong>&nbsp;and create a group for each JHipster role, and add users to each group.<\/p>\n<p>Now go to&nbsp;<strong>API<\/strong>&nbsp;&gt;&nbsp;<strong>Authorization Servers<\/strong>, select the&nbsp;<strong>default<\/strong>&nbsp;server and&nbsp;<strong>Add Claim<\/strong>&nbsp;with the following settings:<\/p>\n<ol class=\"wp-block-list\">\n<li>Name: groups<\/li>\n<li>Include in token type: ID Token, Always<\/li>\n<li>Value type: Groups<\/li>\n<li>Filter: Matches regex, set the Regex to&nbsp;<code style=\"font-size:13px\" class=\"highlighter-rouge\">.*<\/code><\/li>\n<\/ol>\n<h3 class=\"wp-block-heading\" id=\"enable-debug-logs-and-zipkin\">Enable Debug Logs and Zipkin<\/h3>\n<p>To send debug logs to the JHipster Console, let\u2019s update the log level in the prod profile. Edit&nbsp;<code style=\"font-size:13px\" class=\"highlighter-rouge\">src\/main\/resources\/config\/application-prod.yml<\/code>&nbsp;to set the level for each service (<code style=\"font-size:13px\" class=\"highlighter-rouge\">blog-app<\/code>,&nbsp;<code style=\"font-size:13px\" class=\"highlighter-rouge\">store-app<\/code>, and&nbsp;<code style=\"font-size:13px\" class=\"highlighter-rouge\">gateway-app<\/code>) to&nbsp;<strong>DEBUG<\/strong>&nbsp;for the&nbsp;<code style=\"font-size:13px\" class=\"highlighter-rouge\">com.okta.developer.*<\/code>&nbsp;logger. For example, in the blog\u2019s&nbsp;<code style=\"font-size:13px\" class=\"highlighter-rouge\">application-prod.yml<\/code>:<\/p>\n<pre class=\"gutter: false;brush:java\">logging:\n    level:\n        com.okta.developer.blog: DEBUG\n<\/pre>\n<p>Also, for each service, update the&nbsp;<code style=\"font-size:13px\" class=\"highlighter-rouge\">LoggingAspectConfiguration<\/code>&nbsp;to load when the prod profile is active. Change the&nbsp;<code style=\"font-size:13px\" class=\"highlighter-rouge\">@Profile<\/code>&nbsp;annotation:<\/p>\n<pre class=\"gutter: false;brush:java\">@Configuration\n@EnableAspectJAutoProxy\npublic class LoggingAspectConfiguration {\n\n    @Bean\n    @Profile({JHipsterConstants.SPRING_PROFILE_DEVELOPMENT, JHipsterConstants.SPRING_PROFILE_PRODUCTION})\n    public LoggingAspect loggingAspect(Environment env) {\n        return new LoggingAspect(env);\n    }\n}\n<\/pre>\n<p><a href=\"https:\/\/zipkin.io\/\">Zipkin<\/a>&nbsp;is a distributed tracing system that helps to troubleshoot latency issues in microservices architectures. With a traceId propagated from service to service, calls to different services can be correlated and analyzed as a part of the same flow. The Zipkin server and UI are provided with the JHipster Console, and JHipster apps can integrate with Zipkin through&nbsp;<a href=\"https:\/\/cloud.spring.io\/spring-cloud-sleuth\/reference\/html\/#sleuth-with-zipkin-via-http\">Spring Cloud Sleuth<\/a>. To enable Zipkin tracing, add the&nbsp;<code style=\"font-size:13px\" class=\"highlighter-rouge\">zipkin<\/code>&nbsp;profile to&nbsp;<code style=\"font-size:13px\" class=\"highlighter-rouge\">blog-app<\/code>,&nbsp;<code style=\"font-size:13px\" class=\"highlighter-rouge\">gateway-app<\/code>, and&nbsp;<code style=\"font-size:13px\" class=\"highlighter-rouge\">store-app<\/code>&nbsp;in&nbsp;<code style=\"font-size:13px\" class=\"highlighter-rouge\">docker-compose\/docker-compose.yml<\/code>.<\/p>\n<pre class=\"gutter: false;brush:java\">- SPRING_PROFILES_ACTIVE=prod,swagger,zipkin\n<\/pre>\n<p>You also need to rebuild the Docker images with the&nbsp;<code style=\"font-size:13px\" class=\"highlighter-rouge\">zipkin<\/code>&nbsp;profile, for&nbsp;<code style=\"font-size:13px\" class=\"highlighter-rouge\">blog-app<\/code>,&nbsp;<code style=\"font-size:13px\" class=\"highlighter-rouge\">store-app<\/code>, and&nbsp;<code style=\"font-size:13px\" class=\"highlighter-rouge\">gateway-app<\/code>&nbsp;with the following Maven command:<\/p>\n<pre class=\"gutter: false;brush:java\">.\/mvnw package -Pprod -Pzipkin verify jib:dockerBuild -DskipTests\n<\/pre>\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>  ProTip: If you\u2019re on a system with bash shell, like Linux or MacOs, you can do this from the&nbsp;<code style=\"font-size:13px\" class=\"highlighter-rouge\">jhipster<\/code>&nbsp;folder to build each project at once:<br \/><code style=\"font-size:13px\" class=\"highlighter-rouge\">for i in blog gateway store do  cd $i  .\/mvnw package -Pprod -Pzipkin verify jib:dockerBuild -DskipTests cd .. done<\/code> <\/p>\n<\/blockquote>\n<h3 class=\"wp-block-heading\" id=\"run-the-monitored-microservices-architecture\">Run the Monitored Microservices Architecture<\/h3>\n<p>Are you ready for the best? Go to the&nbsp;<code style=\"font-size:13px\" class=\"highlighter-rouge\">docker-compose<\/code>&nbsp;folder and start the services with the following command:<\/p>\n<pre class=\"gutter: false;brush:java\">docker-compose up\n<\/pre>\n<pre class=\"gutter: false;brush:bash\">jhipster-registry_1           | ----------------------------------------------------------\njhipster-registry_1           | \tApplication 'jhipster-registry' is running! Access URLs:\njhipster-registry_1           | \tLocal: \t\thttp:\/\/localhost:8761\njhipster-registry_1           | \tExternal: \thttp:\/\/172.20.0.2:8761\njhipster-registry_1           | \tProfile(s): \t[composite, dev, swagger, oauth2]\njhipster-registry_1           | ----------------------------------------------------------\n<\/pre>\n<p>Log into the JHipster Registry at&nbsp;<code style=\"font-size:13px\" class=\"highlighter-rouge\">http:\/\/localhost:8761<\/code>&nbsp;with Okta user credentials and check the service\u2019s health.<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><img decoding=\"async\" src=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/10\/registry-1024x576.png\" alt=\"\" class=\"wp-image-99520\" width=\"768\" height=\"432\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/10\/registry-1024x576.png 1024w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/10\/registry-300x169.png 300w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/10\/registry-768x432.png 768w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/10\/registry.png 1600w\" sizes=\"(max-width: 768px) 100vw, 768px\" \/><\/figure>\n<\/div>\n<p>Once all the services are up, log in to the gateway application and create some blogs and posts to generate traffic. To do this, use the&nbsp;<strong>Entities<\/strong>&nbsp;menu at the top left of the application. The gateway home is at&nbsp;<code style=\"font-size:13px\" class=\"highlighter-rouge\">http:\/\/localhost:8080<\/code>.<\/p>\n<p>The fun part! Access the JHipster Console at&nbsp;<code style=\"font-size:13px\" class=\"highlighter-rouge\">http:\/\/localhost:5601<\/code>. Go to the Dashboards section, and open the&nbsp;<strong>requests-dashboard<\/strong>. You should see some nice curves:<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><img decoding=\"async\" src=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/10\/requests-dashboard-1024x576.png\" alt=\"\" class=\"wp-image-99521\" width=\"768\" height=\"432\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/10\/requests-dashboard-1024x576.png 1024w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/10\/requests-dashboard-300x169.png 300w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/10\/requests-dashboard-768x432.png 768w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/10\/requests-dashboard.png 1600w\" sizes=\"(max-width: 768px) 100vw, 768px\" \/><\/figure>\n<\/div>\n<p>Since you integrated the JHipster Console with Zipkin UI, in the traces-dashboard, you can find the longest traces duration on the left. If you click on a traceId on the right, it will open the trace in the UI and you will be able to examine the flow.<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><img decoding=\"async\" src=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/10\/zipkin-ui-1024x270.png\" alt=\"\" class=\"wp-image-99522\" width=\"768\" height=\"203\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/10\/zipkin-ui-1024x270.png 1024w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/10\/zipkin-ui-300x79.png 300w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/10\/zipkin-ui-768x203.png 768w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/10\/zipkin-ui.png 1600w\" sizes=\"(max-width: 768px) 100vw, 768px\" \/><\/figure>\n<\/div>\n<h2 class=\"wp-block-heading\" id=\"learn-more-about-jhipster-and-elastic-stack\">Learn More About JHipster and Elastic Stack<\/h2>\n<p>I hope you enjoyed this tutorial and the power of the&nbsp;<strong>Elastic Stack<\/strong>&nbsp;and the&nbsp;<strong>JHipster Console<\/strong>&nbsp;for monitoring a microservices architecture. To continue expanding your knowledge on JHipster monitoring and Okta integration with the Elastic Stack, check out the following links:<\/p>\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/github.com\/jhipster\/jhipster-console\">JHipster Console on Github<\/a><\/li>\n<li><a href=\"https:\/\/www.jhipster.tech\/monitoring\/\">JHipster Monitoring Documentation<\/a><\/li>\n<li><a href=\"https:\/\/www.elastic.co\/blog\/how-to-enable-saml-authentication-in-kibana-and-elasticsearch\">SAML Authentication and the Elastic Stack<\/a><\/li>\n<li><a href=\"https:\/\/www.elastic.co\/guide\/en\/kibana\/current\/kibana-authentication.html\">Authentication in Kibana<\/a><\/li>\n<\/ul>\n<p>If you liked this post, chances are you\u2019ll like our other posts on JHipster and microservices:<\/p>\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/developer.okta.com\/blog\/2019\/04\/04\/java-11-java-12-jhipster-oidc\/?utm_campaign=text_website_all_multiple_dev_dev_elk-stack_null&amp;utm_source=jcg&amp;utm_medium=cpc \">Better, Faster, Lighter Java with Java 12 and JHipster 6<\/a><\/li>\n<li><a href=\"https:\/\/developer.okta.com\/blog\/2019\/04\/15\/testing-spring-security-oauth-with-junit\/?utm_campaign=text_website_all_multiple_dev_dev_elk-stack_null&amp;utm_source=jcg&amp;utm_medium=cpc\">Upgrading Spring Security OAuth and JUnit Tests through the \ud83d\udc40 of a Java Hipster<\/a><\/li>\n<li><a href=\"https:\/\/developer.okta.com\/blog\/2019\/05\/22\/java-microservices-spring-boot-spring-cloud\/?utm_campaign=text_website_all_multiple_dev_dev_elk-stack_null&amp;utm_source=jcg&amp;utm_medium=cpc\">Java Microservices with Spring Boot and Spring Cloud<\/a><\/li>\n<li><a href=\"https:\/\/developer.okta.com\/blog\/2019\/05\/23\/java-microservices-spring-cloud-config\/?utm_campaign=text_website_all_multiple_dev_dev_elk-stack_null&amp;utm_source=jcg&amp;utm_medium=cpc\">Java Microservices with Spring Cloud Config and JHipster<\/a><\/li>\n<li><a href=\"https:\/\/developer.okta.com\/blog\/2019\/08\/28\/reactive-microservices-spring-cloud-gateway\/?utm_campaign=text_website_all_multiple_dev_dev_elk-stack_null&amp;utm_source=jcg&amp;utm_medium=cpc\">Secure Reactive Microservices with Spring Cloud Gateway<\/a><\/li>\n<\/ul>\n<p>To be notified when we published new posts,&nbsp;<a href=\"https:\/\/twitter.com\/oktadev\">follow @oktadev on Twitter<\/a>. We also publish screencasts to&nbsp;<a href=\"https:\/\/www.youtube.com\/c\/oktadev\">our YouTube channel<\/a>&nbsp;on a regular basis.<\/p>\n<p><a href=\"https:\/\/developer.okta.com\/blog\/2019\/09\/26\/get-started-elk-stack\/?utm_campaign=text_website_all_multiple_dev_dev_elk-stack_null&amp;utm_source=jcg&amp;utm_medium=cpc\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">Get Started with the ELK Stack<\/a>&nbsp;was originally published on the Okta Developer Blog on September 26, 2019. <\/p>\n<p><span style=\"font-size: 20px;\"><strong>Friends don\u2019t let friends write user auth. Tired of managing your own users?<\/strong><a href=\"https:\/\/developer.okta.com\/signup\/?utm_campaign=text_website_all_multiple_dev_dev_elk-stack_null&amp;utm_source=jcg&amp;utm_medium=cpc\"> Try Okta\u2019s API and Java SDKs today. Authenticate, manage, and secure users in any application within minutes.<\/a><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Friends don\u2019t let friends write user auth. Tired of managing your own users? Try Okta\u2019s API and Java SDKs today. Authenticate, manage, and secure users in any application within minutes. Good design principles require that microservices architectures are observable, and provide a centralized monitoring tool. This tool allows development teams to verify the overall system &hellip;<\/p>\n","protected":false},"author":100428,"featured_media":24013,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[936],"class_list":["post-99515","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-enterprise-java","tag-docker"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Get Started with the ELK Stack - Java Code Geeks<\/title>\n<meta name=\"description\" content=\"Interested to learn about ELK Stack? Check our article explaining how Set up and run the ELK stack in Docker containers\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/developer.okta.com\/blog\/2019\/09\/26\/get-started-elk-stack\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Get Started with the ELK Stack - Java Code Geeks\" \/>\n<meta property=\"og:description\" content=\"Interested to learn about ELK Stack? Check our article explaining how Set up and run the ELK stack in Docker containers\" \/>\n<meta property=\"og:url\" content=\"https:\/\/developer.okta.com\/blog\/2019\/09\/26\/get-started-elk-stack\" \/>\n<meta property=\"og:site_name\" content=\"Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2019-10-28T13:02:08+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2019-11-04T06:53:52+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2014\/04\/docker-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Jimena Garbarino\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jimena Garbarino\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"12 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/developer.okta.com\\\/blog\\\/2019\\\/09\\\/26\\\/get-started-elk-stack#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2019\\\/10\\\/get-started-with-the-elk-stack.html\"},\"author\":{\"name\":\"Jimena Garbarino\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/a5a31a2e38d1966173d27442b15e8f5b\"},\"headline\":\"Get Started with the ELK Stack\",\"datePublished\":\"2019-10-28T13:02:08+00:00\",\"dateModified\":\"2019-11-04T06:53:52+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2019\\\/10\\\/get-started-with-the-elk-stack.html\"},\"wordCount\":1819,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/developer.okta.com\\\/blog\\\/2019\\\/09\\\/26\\\/get-started-elk-stack#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2014\\\/04\\\/docker-logo.jpg\",\"keywords\":[\"Docker\"],\"articleSection\":[\"Enterprise Java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/developer.okta.com\\\/blog\\\/2019\\\/09\\\/26\\\/get-started-elk-stack#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2019\\\/10\\\/get-started-with-the-elk-stack.html\",\"url\":\"https:\\\/\\\/developer.okta.com\\\/blog\\\/2019\\\/09\\\/26\\\/get-started-elk-stack\",\"name\":\"Get Started with the ELK Stack - Java Code Geeks\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/developer.okta.com\\\/blog\\\/2019\\\/09\\\/26\\\/get-started-elk-stack#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/developer.okta.com\\\/blog\\\/2019\\\/09\\\/26\\\/get-started-elk-stack#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2014\\\/04\\\/docker-logo.jpg\",\"datePublished\":\"2019-10-28T13:02:08+00:00\",\"dateModified\":\"2019-11-04T06:53:52+00:00\",\"description\":\"Interested to learn about ELK Stack? Check our article explaining how Set up and run the ELK stack in Docker containers\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/developer.okta.com\\\/blog\\\/2019\\\/09\\\/26\\\/get-started-elk-stack#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/developer.okta.com\\\/blog\\\/2019\\\/09\\\/26\\\/get-started-elk-stack\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/developer.okta.com\\\/blog\\\/2019\\\/09\\\/26\\\/get-started-elk-stack#primaryimage\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2014\\\/04\\\/docker-logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2014\\\/04\\\/docker-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/developer.okta.com\\\/blog\\\/2019\\\/09\\\/26\\\/get-started-elk-stack#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Enterprise Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\\\/enterprise-java\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Get Started with the ELK Stack\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Developers Resource Center\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.javacodegeeks.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/javacodegeeks\",\"https:\\\/\\\/x.com\\\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/a5a31a2e38d1966173d27442b15e8f5b\",\"name\":\"Jimena Garbarino\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/9d90792ef285836e7872046fa29035c7bae53493e466020b6dfa490464afc278?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/9d90792ef285836e7872046fa29035c7bae53493e466020b6dfa490464afc278?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/9d90792ef285836e7872046fa29035c7bae53493e466020b6dfa490464afc278?s=96&d=mm&r=g\",\"caption\":\"Jimena Garbarino\"},\"sameAs\":[\"https:\\\/\\\/developer.okta.com\"],\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/author\\\/jimena-garbarino\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Get Started with the ELK Stack - Java Code Geeks","description":"Interested to learn about ELK Stack? Check our article explaining how Set up and run the ELK stack in Docker containers","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/developer.okta.com\/blog\/2019\/09\/26\/get-started-elk-stack","og_locale":"en_US","og_type":"article","og_title":"Get Started with the ELK Stack - Java Code Geeks","og_description":"Interested to learn about ELK Stack? Check our article explaining how Set up and run the ELK stack in Docker containers","og_url":"https:\/\/developer.okta.com\/blog\/2019\/09\/26\/get-started-elk-stack","og_site_name":"Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2019-10-28T13:02:08+00:00","article_modified_time":"2019-11-04T06:53:52+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2014\/04\/docker-logo.jpg","type":"image\/jpeg"}],"author":"Jimena Garbarino","twitter_card":"summary_large_image","twitter_creator":"@javacodegeeks","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Jimena Garbarino","Est. reading time":"12 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/developer.okta.com\/blog\/2019\/09\/26\/get-started-elk-stack#article","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/2019\/10\/get-started-with-the-elk-stack.html"},"author":{"name":"Jimena Garbarino","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/a5a31a2e38d1966173d27442b15e8f5b"},"headline":"Get Started with the ELK Stack","datePublished":"2019-10-28T13:02:08+00:00","dateModified":"2019-11-04T06:53:52+00:00","mainEntityOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2019\/10\/get-started-with-the-elk-stack.html"},"wordCount":1819,"commentCount":0,"publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/developer.okta.com\/blog\/2019\/09\/26\/get-started-elk-stack#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2014\/04\/docker-logo.jpg","keywords":["Docker"],"articleSection":["Enterprise Java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/developer.okta.com\/blog\/2019\/09\/26\/get-started-elk-stack#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.javacodegeeks.com\/2019\/10\/get-started-with-the-elk-stack.html","url":"https:\/\/developer.okta.com\/blog\/2019\/09\/26\/get-started-elk-stack","name":"Get Started with the ELK Stack - Java Code Geeks","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/developer.okta.com\/blog\/2019\/09\/26\/get-started-elk-stack#primaryimage"},"image":{"@id":"https:\/\/developer.okta.com\/blog\/2019\/09\/26\/get-started-elk-stack#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2014\/04\/docker-logo.jpg","datePublished":"2019-10-28T13:02:08+00:00","dateModified":"2019-11-04T06:53:52+00:00","description":"Interested to learn about ELK Stack? Check our article explaining how Set up and run the ELK stack in Docker containers","breadcrumb":{"@id":"https:\/\/developer.okta.com\/blog\/2019\/09\/26\/get-started-elk-stack#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/developer.okta.com\/blog\/2019\/09\/26\/get-started-elk-stack"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/developer.okta.com\/blog\/2019\/09\/26\/get-started-elk-stack#primaryimage","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2014\/04\/docker-logo.jpg","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2014\/04\/docker-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/developer.okta.com\/blog\/2019\/09\/26\/get-started-elk-stack#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Java","item":"https:\/\/www.javacodegeeks.com\/category\/java"},{"@type":"ListItem","position":3,"name":"Enterprise Java","item":"https:\/\/www.javacodegeeks.com\/category\/java\/enterprise-java"},{"@type":"ListItem","position":4,"name":"Get Started with the ELK Stack"}]},{"@type":"WebSite","@id":"https:\/\/www.javacodegeeks.com\/#website","url":"https:\/\/www.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Developers Resource Center","publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/a5a31a2e38d1966173d27442b15e8f5b","name":"Jimena Garbarino","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/9d90792ef285836e7872046fa29035c7bae53493e466020b6dfa490464afc278?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/9d90792ef285836e7872046fa29035c7bae53493e466020b6dfa490464afc278?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/9d90792ef285836e7872046fa29035c7bae53493e466020b6dfa490464afc278?s=96&d=mm&r=g","caption":"Jimena Garbarino"},"sameAs":["https:\/\/developer.okta.com"],"url":"https:\/\/www.javacodegeeks.com\/author\/jimena-garbarino"}]}},"_links":{"self":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/99515","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/users\/100428"}],"replies":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=99515"}],"version-history":[{"count":0,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/99515\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media\/24013"}],"wp:attachment":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=99515"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=99515"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=99515"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}