我试图在GKE集群中运行弹性APM。我安装了elastic-search
,kibana
和apm-server
。所有服务都已启动并运行。所有这些部件都已通过舵机图表。下面是每个组件的配置。
apmConfig:
apm-server.yml: |
apm-server:
host: "0.0.0.0:8200"
queue: {}
output.elasticsearch:
hosts: ["http://elasticsearch-master.monitoring.svc.cluster.local:9200"]
username: "elastic"
password: "password"
kibanaConfig:
kibana.yml: |
server.host: 0.0.0.0
server.port: 5601
elasticsearch.hosts: "http://elasticsearch-master.monitoring.svc.cluster.local:9200"
kibana.index: ".kibana"
server.basePath: "/kibana"
server.rewriteBasePath: true
server.publicBaseUrl: "https://mydomain/kibana"
elasticsearch:
username: "kibana_system"
password: "password"
通过使用以下配置,我尝试将APM集成添加到我的服务中:
var apm = require('elastic-apm-node').start({
// Override the service name from package.json
// Allowed characters: a-z, A-Z, 0-9, -, _, and space
serviceName: 'shopping',
// Use if APM Server requires a secret token
secretToken: '',
// Set the custom APM Server URL (default: http://localhost:8200)
serverUrl: 'https://mydomain/apm',
// Set the service environment
environment: 'production'
})
当我启动服务时,我在日志中得到以下错误:
{"log.level":"error","@timestamp":"2022-08-18T10:08:31.584Z","log":{"logger":"elastic-apm-node"},"ecs":{"version":"1.6.0"},"message":"APM Server transport error (301): Unexpected APM Server response"}
301 -永久移动。如果我能得到帮助那就太好了?
发布于 2022-08-24 05:31:11
这个问题已经解决了。原因是我使用代理并访问端口80,而在APM服务器服务中,我使用端口为8200。
在将apm服务器服务中的端口更改为80,将targetPort更改为8200之后,我能够正确地使用我的服务测试弹性APM。
https://stackoverflow.com/questions/73401231
复制相似问题