hi all,
10.40.12.20 is my local IP
----------apm-server.yml--------
apm-server:
host: "0.0.0.0:8200"
kibana:
enabled: true
host: "http://10.40.12.20:5601" # Replace with your Kibana URL
username: "kibana_system" # If authentication is required
password: "password" # If authentication is required
rum:
enabled: true
ssl:
enabled: false # Set to true if using SSL
verification_mode: none
setup:
kibana:
host: "http://10.40.12.20:5601" # Replace with your Kibana URL
output.elasticsearch:
hosts: ["http://10.40.12.20:9200"]
username: "elastic"
password: "password"
ssl:
enabled: false # Set to true if using SSL
verification_mode: none
-----------elasticsearch.yml --------------
xpack.security.enabled: true
discovery.type: single-node
network.host: 127.0.0.1
http.port: 9200
----------------kibana.yml------------
server.name: "kibana"
server.host: "0.0.0.0" # Bind to all network interfaces
server.port: "5601"
elasticsearch.hosts: ["http://127.0.0.1:9200"]
elasticsearch.username: "elastic"
elasticsearch.password: "password"
server.publicBaseUrl: "http://localhost:5601"
xpack.security.encryptionKey: "VtG9FgY8JQ8CZW4eZbL2rHw8u9wT1mXy"
xpack.encryptedSavedObjects.encryptionKey: "VtG9FgY8JQ8CZW4eZbL2rHw8u9wT1mXy"
xpack.reporting.encryptionKey : "VtG9FgY8JQ8CZW4eZbL2rHw8u9wT1mXy"
xpack.security.session.idleTimeout: "1h"
xpack.security.session.lifespan: "30d"
elasticsearch.ssl.verificationMode: none
---------code in application----------
import apm from 'elastic-apm-node'
apm.start({
serviceName: 'application-1',
secretToken: '',
serverUrl: 'http://elastic:password@10.40.12.20:8200',
environment: process.env.NODE_ENV,
logLevel: 'debug',
active: true,
instrument: true
})
getting error in application code:-
{"log.level":"error","@timestamp":"2024-08-19T07:36:06.598Z","log.logger":"elastic-apm-node","ecs.version":"8.10.0","message":"APM Server transport error (503): Unexpected APM Server response when polling config\n{\"statusCode\":403,\"error\":\"Forbidden\",\"message\":\"Forbidden\"}"}
Thanks in advance.