Hi Folks,
I am almost getting mad. Please help me our here. I am trying to collect kibana monitoring data with metricbeat. I get strangely the following error:
{"file.name":"module/wrapper.go","file.line":256},"message":"Error fetching data for metricset kibana.node_rules: error making http request: Get \"https://10.10.10.11:5601/api/status\. x509: certificate signed by unknown authority","service.name":"metricbeat","ecs.version":"1.6.0"}
{"file.name":"module/wrapper.go","file.line":256},"message":"Error fetching data for metricset kibana.node_actions: error making http request: Get \"https://10.10.10.11:5601/api/status. x509: certificate signed by unknown authority","service.name":"metricbeat","ecs.version":"1.6.0"}
metricset kibana.stats: error making http request: Get \"https://10.10.10.11:5601/api/status\": x509: certificate signed by unknown authority","service.name":"metricbeat","ecs.version":"1.6.0"}. x509: certificate signed by unknown authority","service.name":"metricbeat","ecs.version":"1.6.0"}
it is saying that unknow authority but I generated the certs with the self generated CA
here is the test output of metricbeat:
root@kibana:/etc/metricbeat# metricbeat test output
elasticsearch: https://10.10.10.9:9200...
parse url... OK
connection...
parse host... OK
dns lookup... OK
addresses: 10.10.10.9
dial up... OK
TLS...
security: server's certificate chain verification is enabled
handshake... OK
TLS version: TLSv1.3
dial up... OK
here is metricbeat.yml config:
-kibana
host: "https://10.10.10.11:5601"
username: "user"
password: "passw"
- elastic.output:
#hosts: ["10.10.10.9:9200", "10.10.10.10:9200"]
hosts: ["10.10.10.9:9200"]
# Protocol - either `http` (default) or `https`.
protocol: "https"
# Authentication credentials - either API key or username/password.
#api_key: "id:api_key"
username: "elastic"
password: "huseyin"
#ssl.certificate: "/etc/kibana/certs/chamber1/chamber1.crt"
#ssl.key: "/etc/kibana/certs/chamber1/chamber1.key"
ssl.certificate_authorities: "/etc/kibana/certs/elasticsearch
here is kibana.yml:
# =================== System: Elasticsearch ===================
# The URLs of the Elasticsearch instances to use for all your queries.
elasticsearch.hosts: ["https://10.10.10.9:9200", "https://10.10.10.10:9200"]
# If your Elasticsearch is protected with basic authentication, these settings provide
# the username and password that the Kibana server uses to perform maintenance on the Kibana
# index at startup. Your Kibana users still need to authenticate with Elasticsearch, which
# is proxied through the Kibana server.
elasticsearch.username: "user"
elasticsearch.password: "passw"
ssl.certificate: "/etc/kibana/certs/chamber1/chamber1.crt"
ssl.key: "/etc/kibana/certs/chamber1/chamber1.key"
ssl.certificate_authorities: "/etc/kibana/certs/elasticsearch-ca.pem"
here is the kibana authority cert:
elasticsearch.ssl.certificateAuthorities: [ "/etc/kibana/certs/elasticsearch-ca.pem" ]
cert generate command:
#Generate crt and key file:
./bin/elasticsearch-certutil cert --pem --silent --in instances.yml --out certs.zip -ca /usr/share/elasticsearch/elastic-stack-ca.p12
here is the modules.d/kibana-xpack.yml file:
module: kibana
# metricsets:
# - stats
period: 10s
xpack.enabled: true
hosts: ["https://10.10.10.11:5601"]
username: "kibana_huseyin"
password: "huseyin"
#basepath: ""
server.ssl.enabled: true
server.ssl.certificate: "/etc/kibana/certs/kibana-server.crt"
server.ssl.key: "/etc/kibana/certs/kibana-server.key"
#ssl.certificateAuthorities: [ "/etc/kibana/certs/elasticsearch-ca.pem" ]
Can you please help me with this issue? how can I test or verify that I have the same CA .
I didnt see any section in the official side regarding, securing the kibana elasticsearch logstash with self generated CA and ssl certs.