Logs are not showing from APM

Hello Guys

I have configured the Kibana, APM, elasticsearch, For APM I have created a domain https://example.com as APM Agent in flask application, When I run the application on development environment logs are getting showing inside APM tab, but in production environment I'm not seeing any logs.

For Kibana
server.host: ""
elasticsearch.hosts: http://IP:PORT
elasticsearch.ssl.certificateAuthorities: ["ca.pem"]

For APM Server
host: ""
hosts: ["http://IP:9200"]
ssl.certificate_authorities: ["ca.pem"]

For Elasticsearch
network.host: IP
discovery.seed_hosts: ["IP"]

For Flask APM Agent:

current_app.config['ELASTIC_APM'] = {
        # Set required service name. Allowed characters:
        # a-z, A-Z, 0-9, -, _, and space
        'SERVICE_NAME': app_name,

        # Use if APM Server requires a token
        'SECRET_TOKEN': '',

        # Set custom APM Server URL (default: http://localhost:8200)
        'SERVER_URL': "https://example.com",
        'LOGGING': True,
        'DEBUG': True,
        'VERIFY_SERVER_CERT': False,

    apm = ElasticAPM(current_app, logging=True)
    apm.init_app(current_app, service_name=app_name, secret_token='')

Please let me know where I need to make correction to make it work?


What does curl https://example.com/ says when executed from the machine where your Flask app runs?

curl: (60) server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none
More details here: http://curl.haxx.se/docs/sslcerts.html

curl performs SSL certificate verification by default, using a "bundle"
of Certificate Authority (CA) public keys (CA certs). If the default
bundle file isn't adequate, you can specify an alternate file
using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
the bundle, the certificate verification probably failed due to a
problem with the certificate (it might be expired, or the name might
not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
the -k (or --insecure) option.

but it works fine with -k option.

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