[evcc] Add evcc integration for site/loadpoint metrics and logs - #20323
[evcc] Add evcc integration for site/loadpoint metrics and logs#20323smnschndr wants to merge 1 commit into
Conversation
ReviewersBuildkite won't run for external contributors automatically; you need to add a comment:
NOTE: https://github.com/elastic/integrations/blob/main/.buildkite/pull-requests.json contains all those details. |
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019CcHjGhVCunZ6cewt2WyrX
56c1e95 to
7be3327
Compare
|
/test |
|
Ran a full self-review pass against this package (package-spec, ecs-field-mappings, cel-programs, ingest-pipelines, integration-testing, anonymize-logs) and pushed fixes for everything it found:
|
d817b86 to
fe94a12
Compare
Adds a new evcc integration collecting metrics and logs from evcc, the open-source solar charging and energy management system. Three data streams: - site (metrics): home power, grid power, solar (PV) power/energy, home battery power/SoC/capacity, and cost/CO2/solar-share statistics, collected via CEL input polling GET /api/state. - loadpoint (metrics): one event per configured charge point - mode, charging/connected/enabled state, charge power/energy/duration, effective current/SoC limits, and connected vehicle name/SoC/range. - log (logs): evcc's own application logs, collected via journald and parsed into ECS fields (event.action/category/type/outcome, destination.ip/port, url.*, http.response.status_code, event.duration), derived from analysis of real production journald data and validated against ~38.5k historical log lines with zero pipeline errors. High-volume DEBUG-level telemetry is kept as plain message text since the same readings are already collected in structured form by site/loadpoint. The battery field is normalized in the site ingest pipeline to handle a real shape difference between evcc versions (older releases publish it as a bare array, newer releases as a single object with a nested device list) - found by running the system tests against a live evcc instance rather than only the public demo. Also includes fixes from a full self-review pass (package-spec, ecs-field-mappings, cel-programs, ingest-pipelines, integration-testing, anonymize-logs): explicit want_more on CEL success paths, related.ip population, base-fields.yml split to the canonical 6 entries plus a new fields/ecs.yml per data stream, tagged on_failure processors, complete manifest variable documentation, preserve_original_event coverage in test fixtures, system-test-generated sample events, RFC 5737 test IP addresses, and a journald-based system test for the log data stream mirroring packages/journald's mock pattern. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019CcHjGhVCunZ6cewt2WyrX
fe94a12 to
01030c0
Compare
Proposed commit message
Adds a new evcc integration collecting metrics and logs from evcc, the open-source solar charging and energy management system.
Three data streams:
GET /api/state.site, split by loadpoint.event.action/category/type/outcome,destination.ip/port,url.*,http.response.status_code,event.duration). Charging session lifecycle events, vehicle API errors, device read failures, and charger logic warnings are parsed into dedicated fields; high-volume DEBUG-level telemetry is kept as plainmessagetext since the same readings are already collected in structured form bysite/loadpoint.The evcc
/api/stateendpoint returns a very large, deeply nested response (including forecast arrays and device certificates) and is not formally documented upstream ("the actual state structure is not documented yet... details may change between releases", per evcc's own OpenAPI spec). The CEL programs curate only the fields listed above rather than shipping the raw payload, and thebatteryfield is normalized in the ingest pipeline to handle a real shape difference observed between evcc versions (older releases publish it as a bare array, newer releases as a single object with a nested device list) — found by running the system tests against a live evcc instance rather than only the public demo.Checklist
changelog.ymlfile.Author's Checklist
elastic-package build/lintpasselastic-package test pipelinepasses for all three data streamselastic-package test systempasses forsiteandloadpointagainst both a mock server and a live evcc instanceHow to test this PR locally
Related issues
Screenshots
No dashboards yet in this initial version.