APM Can't connect to ElasticSearch

Hello everyone,

So i have a ELK setup on my EC2 Ubuntu 18.04 LTS server working perfectly fine. Now im trying to install APM but im having issues with the configuration. Everytime i try to start the apm service i keep getting connection to ElasticSearch refused because it keeps trying to connect to "localhost:9200" when its supposed to connect to :server-private-ip:9200".

Does anyone know why is that or how can i make apm connect to the correct ES ip and port?

Here is my ES setup starting from RUM:

rum:
    enabled: true

    allow_origins : ['*']
    library_pattern: "node_modules|bower_components|~"
    source_mapping:

      enabled: true

  elasticsearch:
    hosts: ["server-ip:9200"]
    index: "apm-%{[observer.version]}-%{+yyyy.MM.dd}"

I've removed all the comments to make it easier to read. Am i doing something wrong here? if so can someone please direct me into the right way?

Any help or guidance is greatly appreciated!

Cheers

Hi @Ghaith_Haddad. This looks like a yaml formatting issue, can you ensure elasticsearch is nested under output? Alternatively, you can combine things so the config reads:

output.elasticsearch:
    hosts: ["server-ip:9200"]
    index: "apm-%{[observer.version]}-%{+yyyy.MM.dd}"

rum is also a nested configuration, under apm-server. This should look like:

apm-server:
    rum:
        enabled: true

that worked thank you very much!

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.