{"id":84777,"date":"2018-12-25T13:00:20","date_gmt":"2018-12-25T11:00:20","guid":{"rendered":"http:\/\/www.javacodegeeks.com\/?p=84777"},"modified":"2018-12-22T13:57:23","modified_gmt":"2018-12-22T11:57:23","slug":"log-aggregation-using-elk-stack","status":"publish","type":"post","link":"https:\/\/www.javacodegeeks.com\/2018\/12\/log-aggregation-using-elk-stack.html","title":{"rendered":"Log Aggregation using ELK Stack"},"content":{"rendered":"<h2>1. Introduction<\/h2>\n<p>With the use of microservices, it has become easy to create stable distributed applications and get rid of many legacy problems. But the use of microservices has introduced a few challenges also and <strong>Distributed log management <\/strong>is one of them. As microservices are isolated hence they don\u2019t share database and log files, so it becomes challenging to search, analyse and view log data in real time. This is where ELK stack comes to rescue.<\/p>\n<h2>2. ELK<\/h2>\n<p>It is a collection of three open source products:<\/p>\n<ul>\n<li><strong>Elastic search<\/strong> is a JSON Based NoSQL database<\/li>\n<li><strong>Logstash<\/strong> a log pipeline tool that takes inputs from various sources, executes different conversions and exports the data to various targets (here to elastic search)<\/li>\n<li><strong>Kibana<\/strong> is a visualization layer that works on top of the elastic search<\/li>\n<\/ul>\n<p>Refer to the architecture given below:<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"820\" height=\"396\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2018\/12\/Pic_1.jpg\" alt=\"\" class=\"size-full wp-image-85015\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2018\/12\/Pic_1.jpg 820w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2018\/12\/Pic_1-300x145.jpg 300w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2018\/12\/Pic_1-768x371.jpg 768w\" sizes=\"(max-width: 820px) 100vw, 820px\" \/><figcaption>ELK Stack<\/figcaption><\/figure>\n<\/div>\n<p>Log stash fetches the logs from the microservices. Fetched logs<br \/>\nare transformed into JSON and fed to the elastic search. Logs present in elastic search are viewed by the developer using the Kibana.<\/p>\n<h2>3. Installing ELK<\/h2>\n<p>ELK is java based. Before installing ELK it has to be made sure that <code>JAVA_HOME<\/code>&nbsp;and&nbsp;<code>PATH<\/code> are set up and<br \/>\ninstallation is done using JDK 1.8.<\/p>\n<h3>3.1 Elasticsearch<\/h3>\n<ul>\n<li>The latest version of Elasticsearch can be downloaded from the <a href=\"https:\/\/www.elastic.co\/downloads\/elasticsearch\" target=\"_blank\" rel=\"noreferrer noopener\">download page<\/a>&nbsp;and it can be<br \/>\nextracted in any folder<\/li>\n<li>It can be executed from the command&nbsp;prompt by using <code>bin\\elasticsearch.bat<\/code> <\/li>\n<li>By default, it would start at&nbsp;<a href=\"http:\/\/localhost:9200\/\" target=\"_blank\" rel=\"noreferrer noopener\">http:\/\/localhost:9200<\/a><\/li>\n<\/ul>\n<h3>3.2 Kibana<\/h3>\n<ul>\n<li>The latest version of Kibana can be downloaded from the &nbsp;<a href=\"https:\/\/www.elastic.co\/downloads\/kibana\">download<br \/>\npage&nbsp;<\/a>and<br \/>\nit can be extracted into any folder<\/li>\n<li>It can be executed from the command prompt using <code>bin\\kibana.bat<\/code><\/li>\n<li>Once started successfully, Kibana will start on default port&nbsp;<code>5601<\/code>&nbsp;and<br \/>\nKibana UI will be available at&nbsp;<a href=\"http:\/\/localhost:5601\/\" target=\"_blank\" rel=\"noreferrer noopener\">http:\/\/localhost:5601<\/a><\/li>\n<\/ul>\n<h3>3.3 Logstash<\/h3>\n<ul>\n<li>The latest version of Logstash can be downloaded<br \/>\nfrom the &nbsp;<a href=\"https:\/\/www.elastic.co\/downloads\/logstash\" target=\"_blank\" rel=\"noreferrer noopener\">download page<\/a>&nbsp;and it<br \/>\ncan be extracted into any folder<\/li>\n<li>Create one file&nbsp;<strong>cst_logstash.conf<\/strong>&nbsp;as<br \/>\nper&nbsp;<a href=\"https:\/\/www.elastic.co\/guide\/en\/logstash\/current\/configuration.html\" target=\"_blank\" rel=\"noreferrer noopener\">configuration<br \/>\ninstructions<\/a><\/li>\n<li>It can be executed from the command prompt using <code>bin\/logstash<br \/>\n-f cst_logstash.conf<\/code>&nbsp;&nbsp;to<br \/>\nstart logstash<\/li>\n<\/ul>\n<h2>4. Creating a sample microservice component <\/h2>\n<p>It is required to create a microservice so that logstash can<br \/>\npoint to the API log. Below listing shows the code for the sample microservice.<\/p>\n<p><span style=\"text-decoration: underline\"><em>pom.xml<\/em><\/span><\/p>\n<pre class=\"brush:xml\">&lt;project xmlns=\"http:\/\/maven.apache.org\/POM\/4.0.0\" xmlns:xsi=\"http:\/\/www.w3.org\/2001\/XMLSchema-instance\"\n\txsi:schemaLocation=\"http:\/\/maven.apache.org\/POM\/4.0.0 http:\/\/maven.apache.org\/xsd\/maven-4.0.0.xsd\"&gt;\n\t&lt;modelVersion&gt;4.0.0&lt;\/modelVersion&gt;\n\t&lt;groupId&gt;com.xyz.app&lt;\/groupId&gt;\n\t&lt;artifactId&gt;ArtDemo1001_Rest_Controller_Full_Deployment_Logging&lt;\/artifactId&gt;\n\t&lt;version&gt;0.0.1-SNAPSHOT&lt;\/version&gt;\n\t&lt;!-- Add Spring repositories --&gt;\n\t&lt;!-- (you don't need this if you are using a .RELEASE version) --&gt;\n\t&lt;repositories&gt;\n\t\t&lt;repository&gt;\n\t\t\t&lt;id&gt;spring-snapshots&lt;\/id&gt;\n\t\t\t&lt;url&gt;http:\/\/repo.spring.io\/snapshot&lt;\/url&gt;\n\t\t\t&lt;snapshots&gt;\n\t\t\t\t&lt;enabled&gt;true&lt;\/enabled&gt;\n\t\t\t&lt;\/snapshots&gt;\n\t\t&lt;\/repository&gt;\n\t\t&lt;repository&gt;\n\t\t\t&lt;id&gt;spring-milestones&lt;\/id&gt;\n\t\t\t&lt;url&gt;http:\/\/repo.spring.io\/milestone&lt;\/url&gt;\n\t\t&lt;\/repository&gt;\n\t&lt;\/repositories&gt;\n\t&lt;pluginRepositories&gt;\n\t\t&lt;pluginRepository&gt;\n\t\t\t&lt;id&gt;spring-snapshots&lt;\/id&gt;\n\t\t\t&lt;url&gt;http:\/\/repo.spring.io\/snapshot&lt;\/url&gt;\n\t\t&lt;\/pluginRepository&gt;\n\t\t&lt;pluginRepository&gt;\n\t\t\t&lt;id&gt;spring-milestones&lt;\/id&gt;\n\t\t\t&lt;url&gt;http:\/\/repo.spring.io\/milestone&lt;\/url&gt;\n\t\t&lt;\/pluginRepository&gt;\n\t&lt;\/pluginRepositories&gt;\n\t&lt;parent&gt;\n\t\t&lt;groupId&gt;org.springframework.boot&lt;\/groupId&gt;\n\t\t&lt;artifactId&gt;spring-boot-starter-parent&lt;\/artifactId&gt;\n\t\t&lt;version&gt;1.5.2.RELEASE&lt;\/version&gt;\n\t&lt;\/parent&gt;\n\t&lt;properties&gt;\n\t\t&lt;project.build.sourceEncoding&gt;UTF-8&lt;\/project.build.sourceEncoding&gt;\n\t\t&lt;project.reporting.outputEncoding&gt;UTF-8&lt;\/project.reporting.outputEncoding&gt;\n\t\t&lt;java.version&gt;1.8&lt;\/java.version&gt;\n\t\t&lt;spring-cloud.version&gt;Dalston.SR3&lt;\/spring-cloud.version&gt;\n\t&lt;\/properties&gt;\n\t&lt;!-- Add typical dependencies for a web application --&gt;\n\t&lt;dependencies&gt;\n\t\t&lt;dependency&gt;\n\t\t\t&lt;groupId&gt;org.springframework.boot&lt;\/groupId&gt;\n\t\t\t&lt;artifactId&gt;spring-boot-starter-web&lt;\/artifactId&gt;\n\t\t&lt;\/dependency&gt;\n\t&lt;\/dependencies&gt;\n\n\t&lt;!-- Package as an executable jar --&gt;\n\t&lt;build&gt;\n\t\t&lt;plugins&gt;\n\t\t\t&lt;plugin&gt;\n\t\t\t\t&lt;groupId&gt;org.springframework.boot&lt;\/groupId&gt;\n\t\t\t\t&lt;artifactId&gt;spring-boot-maven-plugin&lt;\/artifactId&gt;\n\t\t\t&lt;\/plugin&gt;\n\t\t&lt;\/plugins&gt;\n\t&lt;\/build&gt;\n\n\t&lt;dependencyManagement&gt;\n\t\t&lt;dependencies&gt;\n\t\t\t&lt;dependency&gt;\n\t\t\t\t&lt;groupId&gt;org.springframework.cloud&lt;\/groupId&gt;\n\t\t\t\t&lt;artifactId&gt;spring-cloud-dependencies&lt;\/artifactId&gt;\n\t\t\t\t&lt;version&gt;${spring-cloud.version}&lt;\/version&gt;\n\t\t\t\t&lt;type&gt;pom&lt;\/type&gt;\n\t\t\t\t&lt;scope&gt;import&lt;\/scope&gt;\n\t\t\t&lt;\/dependency&gt;\n\t\t&lt;\/dependencies&gt;\n\t&lt;\/dependencyManagement&gt;\n\n&lt;\/project&gt;\n<\/pre>\n<p>Above code of the pom.xml has configured dependencies that are required by a spring boot based project. <div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<p><span style=\"text-decoration: underline\"><em>EmployeeDAO.java<\/em><\/span><br \/>\n<\/p>\n<pre class=\"brush:java\">package com.xyz.app.dao;\n\nimport java.util.Collection;\nimport java.util.LinkedHashMap;\nimport java.util.Map;\n\nimport org.springframework.stereotype.Repository;\n\nimport com.xyz.app.model.Employee;\n\n@Repository\npublic class EmployeeDAO {\n\t\/**\n\t * Map is used to Replace the Database \n\t * *\/\n\tstatic public Map&lt;Integer,Employee&gt; mapOfEmloyees = \n                 new LinkedHashMap&lt;Integer,Employee&gt;();\n\tstatic int count=10004;\n\tstatic\n\t{\n\t\tmapOfEmloyees.put(10001, new Employee(\"Jack\",10001,12345.6,1001));\n\t\tmapOfEmloyees.put(10002, new Employee(\"Justin\",10002,12355.6,1002));\n\t\tmapOfEmloyees.put(10003, new Employee(\"Eric\",10003,12445.6,1003));\n\t}\n\t\n\t\/**\n\t * Returns all the Existing Employees\n\t * *\/\n\tpublic Collection getAllEmployee(){\n\t\treturn mapOfEmloyees.values();\t\t\t\n\t}\n\t\n\n\t\/**Get Employee details using EmployeeId .\n\t * Returns an Employee object response with Data if Employee is Found\n\t * Else returns a null\n\t * *\/\n\tpublic Employee getEmployeeDetailsById(int id){\n\t\treturn mapOfEmloyees.get(id);\n\t}\n\t\/**Create Employee details.\n\t * Returns auto-generated Id\n\t * *\/\n\tpublic Integer addEmployee(Employee employee){\n\t\tcount++;\n\t\temployee.setEmployeeId(count);\n\t\tmapOfEmloyees.put(count, employee);\n\t\treturn count;\n\t}\n\t\n\t\/**Update the Employee details,\n\t * Receives the Employee Object and returns the updated Details  \n\t * *\/\n\tpublic Employee updateEmployee (Employee employee){\n\t\tmapOfEmloyees.put(employee.getEmployeeId(), employee);\n\t\treturn employee;\n\t}\n\t\/**Delete the Employee details,\n\t * Receives the EmployeeID and returns the deleted employee's Details  \n\t * *\/\n\tpublic Employee removeEmployee (int id){\n\t\tEmployee emp= mapOfEmloyees.remove(id);\n\t\treturn emp;\n\t}\n\t\n}\n<\/pre>\n<p>Above code represents the DAO layer of the application. CRUD operations are executed on Map collection containing Employee objects, in order to avoid database dependency and keep the application light. <\/p>\n<p><span style=\"text-decoration: underline\"><em>EmployeeController.java<\/em><\/span><br \/>\n<\/p>\n<pre class=\"brush:java\">package com.xyz.app.controller;\n\nimport java.util.Collection;\n\nimport org.apache.log4j.Logger;\nimport org.springframework.beans.factory.annotation.Autowired;\nimport org.springframework.http.HttpStatus;\nimport org.springframework.http.MediaType;\nimport org.springframework.http.ResponseEntity;\nimport org.springframework.web.bind.annotation.PathVariable;\nimport org.springframework.web.bind.annotation.RequestBody;\nimport org.springframework.web.bind.annotation.RequestMapping;\nimport org.springframework.web.bind.annotation.RequestMethod;\nimport org.springframework.web.bind.annotation.RestController;\n\nimport com.xyz.app.dao.EmployeeDAO;\nimport com.xyz.app.model.Employee;\n\n@RestController\npublic class EmployeeController {\n\t\n\t@Autowired \n\tprivate EmployeeDAO employeeDAO;\n\t\n\t\n\tpublic static Logger logger = Logger.getLogger(EmployeeController.class);\n\t\n\t\/** Method is used to get all the employee details and return the same \n\t *\/ \n\t@RequestMapping(value=\"emp\/controller\/getDetails\",method=RequestMethod.GET,produces=MediaType.APPLICATION_JSON_VALUE)\n\tpublic ResponseEntity&lt;Collection&gt; getEmployeeDetails(){\n\t\tlogger.info(\"From Producer method[getEmployeeDetails] start\");\n\t\t\tlogger.debug(\"From Producer method[getEmployeeDetails] start\");\n\t\t\tCollection  listEmployee =employeeDAO.getAllEmployee();\n\t\t\tlogger.debug(\"From Producer method[getEmployeeDetails] start\");\n\t\tlogger.info(\"From Producer method[getEmployeeDetails] end\");\n\t\treturn new ResponseEntity&lt;Collection&gt;(listEmployee, HttpStatus.OK);\n\t}\n\t\/** Method finds an employee using employeeId and returns the found Employee \n\t\tIf no employee is not existing corresponding to the employeeId, \n\t\tthen null is returned with HttpStatus.INTERNAL_SERVER_ERROR as status\n\t *\/ \n\t@RequestMapping(value=\"emp\/controller\/getDetailsById\/{id}\",method=RequestMethod.GET,produces=MediaType.APPLICATION_JSON_VALUE)\n\tpublic ResponseEntity getEmployeeDetailByEmployeeId(@PathVariable(\"id\") int myId){\n\t\tlogger.info(\"From Producer method[getEmployeeDetailByEmployeeId] start\");\n\t\tEmployee employee = employeeDAO.getEmployeeDetailsById(myId);\n\t\tif(employee!=null)\n\t\t{\n\t\t\tlogger.info(\"From Producer method[getEmployeeDetailByEmployeeId] end\");\n\t\t\treturn new ResponseEntity(employee,HttpStatus.OK);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tlogger.info(\"From Producer method[getEmployeeDetailByEmployeeId] end\");\n\t\t\treturn new ResponseEntity(HttpStatus.NOT_FOUND);\n\t\t}\n\t\t\n\t}\n\t\n\t\/** Method creates an employee and returns the auto-generated employeeId *\/ \n\t@RequestMapping(value=\"\/emp\/controller\/addEmp\",\n\t\t\tmethod=RequestMethod.POST,\n\t\t\tconsumes=MediaType.APPLICATION_JSON_VALUE,\n\t\t\tproduces=MediaType.TEXT_HTML_VALUE)\n\tpublic ResponseEntity addEmployee(@RequestBody Employee employee){\n\t\tlogger.info(\"From Producer method[addEmployee] start\");\n\t\t\tlogger.debug(\"From Producer method[addEmployee] start\");\n\t\t\tint empId= employeeDAO.addEmployee(employee);\n\t\t\tlogger.debug(\"From Producer method[addEmployee] start\");\n\t\tlogger.info(\"From Producer method[addEmployee] end\");\n\t\treturn new ResponseEntity(\"Employee added successfully with id:\"+empId,HttpStatus.CREATED);\n\t}\n\n\t\/** Method updates an employee and returns the updated Employee \n \t\tIf Employee to be updated is not existing, then null is returned with \n \t\tHttpStatus.INTERNAL_SERVER_ERROR as status\n\t *\/ \n\t@RequestMapping(value=\"\/emp\/controller\/updateEmp\",\n\t\t\tmethod=RequestMethod.PUT,\n\t\t\tconsumes=MediaType.APPLICATION_JSON_VALUE,\n\t\t\tproduces=MediaType.APPLICATION_JSON_VALUE)\n\tpublic ResponseEntity updateEmployee(@RequestBody Employee employee){\n\t\tlogger.info(\"From Producer method[updateEmployee] start\");\n\t\tif(employeeDAO.getEmployeeDetailsById(employee.getEmployeeId())==null){\n\t\t\tEmployee employee2=null;\n\t\t\treturn new ResponseEntity(employee2,HttpStatus.INTERNAL_SERVER_ERROR);\n\t\t}\n\t\tSystem.out.println(employee);\n\t\temployeeDAO.updateEmployee(employee);\n\t\tlogger.info(\"From Producer method[updateEmployee] end\");\n\t\treturn new ResponseEntity(employee,HttpStatus.OK);\n\t}\n\t\n\t\/** Method deletes an employee using employeeId and returns the deleted Employee \n\t \tIf Employee to be deleted is not existing, then null is returned with \n\t \tHttpStatus.INTERNAL_SERVER_ERROR as status\n\t *\/ \n\t@RequestMapping(value=\"\/emp\/controller\/deleteEmp\/{id}\",\n\t\t\tmethod=RequestMethod.DELETE,\n\t\t\tproduces=MediaType.APPLICATION_JSON_VALUE)\n\tpublic ResponseEntity deleteEmployee(@PathVariable(\"id\") int myId){\n\t\tlogger.info(\"From Producer method[deleteEmployee] start\");\n\t\tif(employeeDAO.getEmployeeDetailsById(myId)==null){\n\t\t\tEmployee employee2=null;\n\t\t\treturn new ResponseEntity(employee2,HttpStatus.INTERNAL_SERVER_ERROR);\n\t\t}\n\t\tEmployee employee = employeeDAO.removeEmployee(myId);\n\t\tSystem.out.println(\"Removed: \"+employee);\n\t\tlogger.info(\"From Producer method[deleteEmployee] end\");\n\t\treturn new ResponseEntity(employee,HttpStatus.OK);\n\t}\n}\n<\/pre>\n<p>Above code represents the controller layer of the application with the request handlers. Request handlers invoke the DAO layer functions and perform the CRUD operations.<br \/>\n<span style=\"text-decoration: underline\"><em>application.properties<\/em><\/span><br \/>\n<\/p>\n<pre class=\"brush:java\"> server.port = 8090\n logging.level.com.xyz.app.controller.EmployeeController=DEBUG\n #name of the log file to be created\n #same file will be given as input to logstash\n logging.file=app.log\n spring.application.name = producer\n<\/pre>\n<p>Above code represents the properties configured for a spring boot based application.<\/p>\n<h2>5. Logstash configuration<\/h2>\n<p>As discussed in section 3.3 it is required to create a configuration file for logstash. This configuration file will be used by logstash to take input from the microservice logs. Logs are transformed into JSON and fed to elasticsearch.<\/p>\n<p><span style=\"text-decoration: underline\"><em><br \/>\ncst_logstash.conf<br \/>\n<\/em><\/span><br \/>\n<\/p>\n<pre class=\"brush:java\">input {\n  file {\n    # If more than one log files from different microservices have to be tracked then a comma-separated list of log files can \n    # be provided\n    path =&gt; [\"PATH-TO-UPDATE\/app.log\"]\n    codec =&gt; multiline {\n      pattern =&gt; \"^%{YEAR}-%{MONTHNUM}-%{MONTHDAY} %{TIME}.*\"\n      negate =&gt; \"true\"\n      what =&gt; \"previous\"\n    }\n  }\n}\noutput {\n  stdout {\n    codec =&gt; rubydebug\n  }\n  # Sending properly parsed log events to elasticsearch\n  elasticsearch {\n    hosts =&gt; [\"localhost:9200\"]\n  }\n}\n<\/pre>\n<p>\nThe above logstash configuration file listens to<br \/>\nthe log file and pushes log messages to elastic search. <br \/><strong>Note<\/strong>: Change the log path as per to your setup.<\/p>\n<h2>6. Execution and Output<\/h2>\n<h3>6.1 Executing microservice for logs<\/h3>\n<p>Spring Boot application can be deployed using <code>clean install spring-boot:run<\/code> and following<br \/>\nURL can be hit from a browser or postman client: <a href=\"http:\/\/localhost:8090\/emp\/controller\/getDetails\">http:\/\/localhost:8090\/emp\/controller\/getDetails<\/a>. This will hit the microservice and produce logs on the microservice&#8217;s side. These logs will be read by logstash and pushed to elastic search and further, these logs can be viewed using Kibana using next steps.<\/p>\n<h3>6.2 Steps to view output on Kibana<\/h3>\n<ul>\n<li>Configure the index in<br \/>\nthe management console. Use index value as <code><strong>logstash-*<\/strong><\/code>&nbsp;as a default<br \/>\nconfiguration. Open the link: <a href=\"http:\/\/localhost:5601\/app\/kibana#\/management\/kibana\/index?_g=()\">http:\/\/localhost:5601\/app\/kibana#\/management\/kibana\/index?_g=()<\/a> and it will display<br \/>\nthe screen as shown below:<\/li>\n<\/ul>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"820\" height=\"433\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2018\/12\/Kib_1_1.jpg\" alt=\"\" class=\"size-full wp-image-85037\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2018\/12\/Kib_1_1.jpg 820w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2018\/12\/Kib_1_1-300x158.jpg 300w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2018\/12\/Kib_1_1-768x406.jpg 768w\" sizes=\"(max-width: 820px) 100vw, 820px\" \/><figcaption>Kibana Index Creation- 1<\/figcaption><\/figure>\n<\/div>\n<p><\/p>\n<ul>\n<li>Click on the Next Step and<br \/>\nthe following screen is displayed<\/li>\n<\/ul>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"820\" height=\"389\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2018\/12\/Kib_2_2.jpg\" alt=\"\" class=\"size-full wp-image-85038\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2018\/12\/Kib_2_2.jpg 820w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2018\/12\/Kib_2_2-300x142.jpg 300w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2018\/12\/Kib_2_2-768x364.jpg 768w\" sizes=\"(max-width: 820px) 100vw, 820px\" \/><figcaption>Kibana Index Creation- 2<\/figcaption><\/figure>\n<\/div>\n<p>Select the option as highlighted above and click on &#8220;Create index pattern&#8221;<\/p>\n<ul class=\"wp-block-list\">\n<li>On selecting Discover option from the left side menu, the page is displayed as shown below:<\/li>\n<\/ul>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"820\" height=\"424\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2018\/12\/Kib_3_3.jpg\" alt=\"\" class=\"size-full wp-image-85039\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2018\/12\/Kib_3_3.jpg 820w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2018\/12\/Kib_3_3-300x155.jpg 300w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2018\/12\/Kib_3_3-768x397.jpg 768w\" sizes=\"(max-width: 820px) 100vw, 820px\" \/><figcaption>Viewing Logs on Kibana- 1<\/figcaption><\/figure>\n<\/div>\n<p><\/p>\n<ul>\n<li>Logs can be visualized and filtered based upon the properties highlighted above. Upon hovering on any of the properties, &#8220;add&#8221; button for the property is displayed. Here on selecting the message property view is displayed as shown below:<\/li>\n<\/ul>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"820\" height=\"308\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2018\/12\/Kib_4_4.jpg\" alt=\"\" class=\"size-full wp-image-85040\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2018\/12\/Kib_4_4.jpg 820w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2018\/12\/Kib_4_4-300x113.jpg 300w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2018\/12\/Kib_4_4-768x288.jpg 768w\" sizes=\"(max-width: 820px) 100vw, 820px\" \/><figcaption>Viewing Logs on Kibana- 2<\/figcaption><\/figure>\n<\/div>\n<h2>7. References<\/h2>\n<ul>\n<li>\n<a href=\"https:\/\/logz.io\/learn\/complete-guide-elk-stack\/\"><br \/>\nhttps:\/\/logz.io\/learn\/complete-guide-elk-stack\/<br \/>\n<\/a>\n<\/li>\n<li>\n<a href=\"https:\/\/howtodoinjava.com\/microservices\/elk-stack-tutorial-example\/\">https:\/\/howtodoinjava.com\/microservices\/elk-stack-tutorial-example\/<\/a>\n<\/li>\n<li>\n<a href=\"https:\/\/dzone.com\/articles\/logging-with-elastic-stack\">https:\/\/dzone.com\/articles\/logging-with-elastic-stack<\/a>\n<\/li>\n<\/ul>\n<h2>8. Download the Eclipse Project<\/h2>\n<div class=\"download\"><strong>Download<\/strong><br \/>\nYou can download the full source code for this example here: <a href=\"http:\/\/www.javacodegeeks.com\/artdemo1001_rest_controller_full_deployment_logging\"><strong>microservice<\/strong><\/a><\/div><\/p>\n","protected":false},"excerpt":{"rendered":"<p>1. Introduction With the use of microservices, it has become easy to create stable distributed applications and get rid of many legacy problems. But the use of microservices has introduced a few challenges also and Distributed log management is one of them. As microservices are isolated hence they don\u2019t share database and log files, so &hellip;<\/p>\n","protected":false},"author":495,"featured_media":112,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[732,132],"class_list":["post-84777","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-enterprise-java","tag-elasticsearch","tag-logging"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Log Aggregation using ELK Stack - Java Code Geeks<\/title>\n<meta name=\"description\" content=\"Interested to learn more about Logging? Then check out our detailed example on Log Aggregation using ELK Stack!\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.javacodegeeks.com\/2018\/12\/log-aggregation-using-elk-stack.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Log Aggregation using ELK Stack - Java Code Geeks\" \/>\n<meta property=\"og:description\" content=\"Interested to learn more about Logging? Then check out our detailed example on Log Aggregation using ELK Stack!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.javacodegeeks.com\/2018\/12\/log-aggregation-using-elk-stack.html\" \/>\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=\"2018-12-25T11:00:20+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-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=\"Mohpreet Singh\" \/>\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=\"Mohpreet Singh\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"10 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/12\\\/log-aggregation-using-elk-stack.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/12\\\/log-aggregation-using-elk-stack.html\"},\"author\":{\"name\":\"Mohpreet Singh\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/0f2ed7fd8fb6b97b756b442420a58620\"},\"headline\":\"Log Aggregation using ELK Stack\",\"datePublished\":\"2018-12-25T11:00:20+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/12\\\/log-aggregation-using-elk-stack.html\"},\"wordCount\":778,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/12\\\/log-aggregation-using-elk-stack.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/enterprise-java-logo.jpg\",\"keywords\":[\"Elasticsearch\",\"Logging\"],\"articleSection\":[\"Enterprise Java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/12\\\/log-aggregation-using-elk-stack.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/12\\\/log-aggregation-using-elk-stack.html\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/12\\\/log-aggregation-using-elk-stack.html\",\"name\":\"Log Aggregation using ELK Stack - Java Code Geeks\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/12\\\/log-aggregation-using-elk-stack.html#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/12\\\/log-aggregation-using-elk-stack.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/enterprise-java-logo.jpg\",\"datePublished\":\"2018-12-25T11:00:20+00:00\",\"description\":\"Interested to learn more about Logging? Then check out our detailed example on Log Aggregation using ELK Stack!\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/12\\\/log-aggregation-using-elk-stack.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/12\\\/log-aggregation-using-elk-stack.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/12\\\/log-aggregation-using-elk-stack.html#primaryimage\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/enterprise-java-logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/enterprise-java-logo.jpg\",\"width\":150,\"height\":150,\"caption\":\"java-interview-questions-answers\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2018\\\/12\\\/log-aggregation-using-elk-stack.html#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\":\"Log Aggregation using 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\\\/0f2ed7fd8fb6b97b756b442420a58620\",\"name\":\"Mohpreet Singh\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/da9f4a8e5c1cfbdee74df2bd556bf3982d43ef035a07588c1c5fc1f59e7e3de6?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/da9f4a8e5c1cfbdee74df2bd556bf3982d43ef035a07588c1c5fc1f59e7e3de6?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/da9f4a8e5c1cfbdee74df2bd556bf3982d43ef035a07588c1c5fc1f59e7e3de6?s=96&d=mm&r=g\",\"caption\":\"Mohpreet Singh\"},\"description\":\"Mohpreet is Java developer and trainer. He is passionate in learning new technologies, having a detailed exposure on the related technology and publishing the related content.\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/author\\\/mohpreet-singh\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Log Aggregation using ELK Stack - Java Code Geeks","description":"Interested to learn more about Logging? Then check out our detailed example on Log Aggregation using ELK Stack!","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:\/\/www.javacodegeeks.com\/2018\/12\/log-aggregation-using-elk-stack.html","og_locale":"en_US","og_type":"article","og_title":"Log Aggregation using ELK Stack - Java Code Geeks","og_description":"Interested to learn more about Logging? Then check out our detailed example on Log Aggregation using ELK Stack!","og_url":"https:\/\/www.javacodegeeks.com\/2018\/12\/log-aggregation-using-elk-stack.html","og_site_name":"Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2018-12-25T11:00:20+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","type":"image\/jpeg"}],"author":"Mohpreet Singh","twitter_card":"summary_large_image","twitter_creator":"@javacodegeeks","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Mohpreet Singh","Est. reading time":"10 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.javacodegeeks.com\/2018\/12\/log-aggregation-using-elk-stack.html#article","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/2018\/12\/log-aggregation-using-elk-stack.html"},"author":{"name":"Mohpreet Singh","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/0f2ed7fd8fb6b97b756b442420a58620"},"headline":"Log Aggregation using ELK Stack","datePublished":"2018-12-25T11:00:20+00:00","mainEntityOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2018\/12\/log-aggregation-using-elk-stack.html"},"wordCount":778,"commentCount":0,"publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2018\/12\/log-aggregation-using-elk-stack.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","keywords":["Elasticsearch","Logging"],"articleSection":["Enterprise Java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.javacodegeeks.com\/2018\/12\/log-aggregation-using-elk-stack.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.javacodegeeks.com\/2018\/12\/log-aggregation-using-elk-stack.html","url":"https:\/\/www.javacodegeeks.com\/2018\/12\/log-aggregation-using-elk-stack.html","name":"Log Aggregation using ELK Stack - Java Code Geeks","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2018\/12\/log-aggregation-using-elk-stack.html#primaryimage"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2018\/12\/log-aggregation-using-elk-stack.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","datePublished":"2018-12-25T11:00:20+00:00","description":"Interested to learn more about Logging? Then check out our detailed example on Log Aggregation using ELK Stack!","breadcrumb":{"@id":"https:\/\/www.javacodegeeks.com\/2018\/12\/log-aggregation-using-elk-stack.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.javacodegeeks.com\/2018\/12\/log-aggregation-using-elk-stack.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/2018\/12\/log-aggregation-using-elk-stack.html#primaryimage","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","width":150,"height":150,"caption":"java-interview-questions-answers"},{"@type":"BreadcrumbList","@id":"https:\/\/www.javacodegeeks.com\/2018\/12\/log-aggregation-using-elk-stack.html#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":"Log Aggregation using 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\/0f2ed7fd8fb6b97b756b442420a58620","name":"Mohpreet Singh","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/da9f4a8e5c1cfbdee74df2bd556bf3982d43ef035a07588c1c5fc1f59e7e3de6?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/da9f4a8e5c1cfbdee74df2bd556bf3982d43ef035a07588c1c5fc1f59e7e3de6?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/da9f4a8e5c1cfbdee74df2bd556bf3982d43ef035a07588c1c5fc1f59e7e3de6?s=96&d=mm&r=g","caption":"Mohpreet Singh"},"description":"Mohpreet is Java developer and trainer. He is passionate in learning new technologies, having a detailed exposure on the related technology and publishing the related content.","url":"https:\/\/www.javacodegeeks.com\/author\/mohpreet-singh"}]}},"_links":{"self":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/84777","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\/495"}],"replies":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=84777"}],"version-history":[{"count":0,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/84777\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media\/112"}],"wp:attachment":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=84777"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=84777"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=84777"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}