Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Install and configure ELK on UBUNTU as single node cluster.
  2. Copy the apm_agent folder to the server (preferably in the wildfly installation location) 

  3. apm_agent folder contains two files elastic-apm-agent.jar, elasticapm.properties 

    Add below lines in File elasticapm.proerties

    server_url=http://<private-ip>:8200

    enable_log_correlation=true

    environment=hyd-sandbox

  4. Filebeat Setup on Application Nodes
    • Filebeat is used to forward logs from our application nodes to Logstash or Elasticsearch.
    • Download and install 
    • Download http_ca.crt to the server (preferably in the filebeat installation location)
    • Create a Logs folder inside Wildfly 
    • Edit Filebeat.yml file do the changes 

...

  • Navigate to the "Discover" section and check if logs are being indexed in Elasticsearch.


Switch to Wildfly/bin/wildfly/ and edit standalone.conf.bat add below line under wildfly folder

set "JAVA_OPTS=%JAVA_OPTS% -javaagent:E:\\AppServer\\wildfly-30.0.0.Final\\wildfly-30.0.0.Final\\apm_agent\\elastic-apm-agent-1.52.0.jar"

...

check for logs under filebeat in kibana 


Changes need to be done in GitHub in Do the changes in github repo under ci-properties & application properties for properties for each service line.

Example:

Goto common-ci.properties

ADD a new line

logging.file.name=@env.HWC_API_LOGGING_FILE_NAME@ 

Goto Goto application.properties 

Add below two lines:

...

env.HWC_API_LOGGING_FILE_NAME='E:/AppServer/wildfly-30.0.0.Final/wildfly-30.0.0.Final/Logs/hwc-api.log'                       

  1. Verifying the Setup

5.1. Check Elasticsearch:

  • Test Elasticsearch by accessing its URL in a browser:

              curl -X GET "localhost:9200/"

  • If Elasticsearch is running correctly, you should see a JSON response with Elasticsearch cluster details.

5.2. Check Logstash Input:

  • Test the connection between Filebeat and Logstash:

              curl -XGET 'http://your_logstash_host:5044/_cat/health'

  • Verify that Filebeat is sending logs to Logstash.

5.3. Check Kibana:

...

 

...

5.4. Check Application Logs:

...