Versions Compared

Key

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

...

    • 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 

Check Elasticsearch:

  • Test Elasticsearch by accessing its URL in a browser:  curl -X GET "localhost:9200/"

...

check if traces are visible in APM section of kibana 

  

Logging 

  1. WAR file changes 

    - create a Logs folder inside wildfly  

    - in application.properties of war file ensure that `logging.file.name` is set to `{wildfly-location}/Logs/{service}.log` 

        - Ex: if wildfly is deployed at `E:\wildfly` and service is Common API then set `logging.file.name=E:/wildfly/Logs/common-api.log` 

    - download [http_ca.crt] to the server (preferably in the filebeat installation location) 

    - edit filebeat.yml in filebeat installation folder and replace its contents with [filebeat.yml]

        - set the [paths](filebeat.yml) to Logs folder created in step 1 `{wildfly-location}/Logs` 

            - Ex: if wildfly is deployed at `E:\wildfly` then set paths to `E:/wildfly/Logs/*.json` 

        - set the [environment](filebeat.yml) to match the one set in APM agent 

            - Ex: if the server is in `Hyderabad` and it is a `sandbox` server set `environment` to `hyd-sandbox` 

        - set [API KEY](filebeat.yml) used for filebeat to communicate with elasticsearch 

        - set the [certificate](filebeat.yml) location of http_ca.crt 


     

Filebeat.yml file:

filebeat.inputs:
  - type: log
    enabled: true
    paths:
      - "E:/AppServer/wildfly-30.0.0.Final/wildfly-30.0.0.Final/Logs/*.json"
    json.keys_under_root: true
    json.overwrite_keys: true
  
processors:
  - add_fields:
      target: ''
      fields:
        environment: hyd-sandbox

...