Hello,
So still playing with Elastic Security Serverless at home. Considering Security starts with asset management, I was hoping to monitor my home assets with Heartbeat and send the data to Elastic Security Serverless.
But this seems to be much harder then I thought.
Is it actually possible to send heartbeat data to Elastic Security Serverless?
I'm not interested in the Uptime / Synthetics GUI, I only need the raw data.
I disabled ilm and enabled datastreams:
setup.ilm.enabled: false
setup.dsl.enabled: true
I created an API key with privileges:
{
"heartbeat_writer": {
"cluster": ["monitor"],
"indices": [
{
"names": ["heartbeat-*"],
"privileges": ["auto_configure", "create_doc"]
}
]
}
}
Set the host and api key:
hosts: ["https://custom-elastic-serverless-security-id.kb.eu-west-1.aws.elastic.cloud:443"]
api_key: "id:mysecureapikey"
But I keep getting a 401.
Jun 24 15:14:38 Z02-RPI5UD heartbeat[51430]: {"log.level":"debug","@timestamp":"2025-06-24T15:14:38.409+0200","log.logger":"esclientleg","log.origin":{"function":"github.com/elastic/elastic-agent-libs/transport/httpcommon.(*HTTPTransportSettings).RoundTripper.LoggingDialer.func2","file.name":"transport/logging.go","file.line":43},"message":"Completed dialing successfully","service.name":"heartbeat","network.transport":"tcp","server.address":"custom-elastic-serverless-security-id.kb.eu-west-1.aws.elastic.cloud:443","ecs.version":"1.6.0"}
Jun 24 15:14:38 Z02-RPI5UD heartbeat[51430]: {"log.level":"debug","@timestamp":"2025-06-24T15:14:38.493+0200","log.logger":"esclientleg","log.origin":{"function":"github.com/elastic/beats/v7/libbeat/esleg/eslegclient.(*Connection).Ping","file.name":"eslegclient/connection.go","file.line":307},"message":"Ping request failed with: 401 Unauthorized:.....
Any help is welcome
I feel like I'm missing something obvious or it might just not be possible at all...
Also tried with the cloud.id but that seems for Elastic Cloud Hosted and not Serverless.
Willem