0
votes

I'm having trouble getting the APM "button" and dashboard to appear on the Kibana page. Yes, there is the "Add APM" button which tells you what to do, but it doesn't seem to actually work.

Actually, this is not entirely true - I was able to get the APM "button" and corresponding dashboard "installed" in my Kibana view, but I can't remember what I had to do to make that happen.

I believe that I have the various components (Elasticsearch, Kibana, APM server) installed and running. The "check APM server status" button indicates that it's been set up properly. If I click the "APM dashboard" button at the bottom of the page, it gives me a list of items, but I don't know what they are or whether they have anything to do with APM.

I am at a loss as to how to get APM to appear in Kibana. Does anybody have any ideas?

UPDATE:

https://www.elastic.co/guide/en/apm/server/current/getting-started-apm-server.html

then

https://www.elastic.co/guide/en/apm/server/current/installing.html

then

https://www.elastic.co/guide/en/apm/server/current/apm-server-configuration.html

This seems to provide specific information I haven't been able to find elsewhere. The usage of apm-server setup <flags> seems promising. I'm not sure which flags (if any) I should use?

1
Could you please provide additional information on whether you are using APM locally or using the Elastic Cloud instead? Also, what language are you going to set up APM for?Lulu
I am not using Elastic Cloud and I am using a Java agent.Joseph Gagnon
Ok, so you are using the localhost then which the configuration is fairly easier. I haven't used the Java agent before, I've used Python Flask agent. I'm sorry I haven't used apm-server flags before, but the Elastic community is more active in here discuss.elastic.co. Make sure to post your question under APM.Lulu
@JosephGagnon did you fix it?tstudent

1 Answers

0
votes

Try this official docker-compose set up:

version: '2.2'
services:
  apm-server:
    image: docker.elastic.co/apm/apm-server:7.7.0
    depends_on:
      elasticsearch:
        condition: service_healthy
      kibana:
        condition: service_healthy
    cap_add: ["CHOWN", "DAC_OVERRIDE", "SETGID", "SETUID"]
    cap_drop: ["ALL"]
    ports:
    - 8200:8200
    networks:
    - elastic
    command: >
       apm-server -e
         -E apm-server.rum.enabled=true
         -E setup.kibana.host=kibana:5601
         -E setup.template.settings.index.number_of_replicas=0
         -E apm-server.kibana.enabled=true
         -E apm-server.kibana.host=kibana:5601
         -E output.elasticsearch.hosts=["elasticsearch:9200"]
    healthcheck:
      interval: 10s
      retries: 12
      test: curl --write-out 'HTTP %{http_code}' --fail --silent --output /dev/null http://localhost:8200/

  elasticsearch:
    image: docker.elastic.co/elasticsearch/elasticsearch:7.7.0
    environment:
    - bootstrap.memory_lock=true
    - cluster.name=docker-cluster
    - cluster.routing.allocation.disk.threshold_enabled=false
    - discovery.type=single-node
    - ES_JAVA_OPTS=-XX:UseAVX=2 -Xms1g -Xmx1g
    ulimits:
      memlock:
        hard: -1
        soft: -1
    volumes:
    - esdata:/usr/share/elasticsearch/data
    ports:
    - 9200:9200
    networks:
    - elastic
    healthcheck:
      interval: 20s
      retries: 10
      test: curl -s http://localhost:9200/_cluster/health | grep -vq '"status":"red"'

  kibana:
    image: docker.elastic.co/kibana/kibana:7.7.0
    depends_on:
      elasticsearch:
        condition: service_healthy
    environment:
      ELASTICSEARCH_URL: http://elasticsearch:9200
      ELASTICSEARCH_HOSTS: http://elasticsearch:9200
    ports:
    - 5601:5601
    networks:
    - elastic
    healthcheck:
      interval: 10s
      retries: 20
      test: curl --write-out 'HTTP %{http_code}' --fail --silent --output /dev/null http://localhost:5601/api/status

volumes:
  esdata:
    driver: local

networks:
  elastic:
    driver: bridge