Skip to content

Update templates for external monitoring - #208

Merged
mattkjames7 merged 47 commits into
mainfrom
add-loki
Apr 10, 2026
Merged

Update templates for external monitoring#208
mattkjames7 merged 47 commits into
mainfrom
add-loki

Conversation

@mattkjames7

@mattkjames7 mattkjames7 commented Mar 17, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR adds end-to-end remote observability support for both memgraph and memgraph-high-availability Helm charts by introducing:

  • optional vmagentRemote support for Prometheus remote_write metrics export,
  • optional vectorRemote sidecars for shipping Memgraph logs to Loki-compatible endpoints,
  • chart value/template updates and README examples for configuring auth, labels, and namespaces.

It also improves HA behavior by adding safer cluster setup hook/retry handling and forcing mg-exporter rollout on relevant config changes.

Validation

  • Adds a new CI workflow: .github/workflows/test-remote-monitoring.yaml
  • Provisions a remote monitoring stack (scripts/remote-monitoring-stack.yaml)
  • Verifies both metrics and logs ingestion with scripts/verify-remote-monitoring.sh for:
    • HA chart deployment
    • standalone chart deployment

Notes

  • Includes minor formatting cleanup in charts/memgraph-lab/values.yaml.

@mattkjames7 mattkjames7 mentioned this pull request Mar 18, 2026
25 tasks
@mattkjames7 mattkjames7 self-assigned this Apr 8, 2026
@mattkjames7
mattkjames7 marked this pull request as ready for review April 8, 2026 14:23
Comment thread charts/memgraph-high-availability/values.yaml
Comment thread charts/memgraph-high-availability/values.yaml Outdated
Comment thread charts/memgraph-high-availability/values.yaml
Comment thread charts/memgraph-high-availability/templates/vmagent.yaml Outdated
Comment thread charts/memgraph-high-availability/templates/data.yaml Outdated
Comment thread charts/memgraph-high-availability/templates/_helpers.tpl Outdated
Comment thread charts/memgraph/templates/statefulset.yaml Outdated
Comment thread charts/memgraph/templates/vmagent.yaml Outdated
Comment thread scripts/remote-monitoring-stack.yaml Outdated
Comment thread scripts/remote-monitoring-stack.yaml Outdated
Comment thread charts/memgraph-high-availability/values.yaml
@as51340 as51340 added memgraph-ha Memgraph HA chart issue memgraph Memgraph standalone issue labels Apr 9, 2026
Comment thread charts/memgraph-high-availability/templates/_helpers.tpl Outdated
@as51340

as51340 commented Apr 9, 2026

Copy link
Copy Markdown
Collaborator

Also, make sure to open a PR on docs for this 😄

Comment thread charts/memgraph-high-availability/templates/cluster-setup.yaml Outdated
Comment thread charts/memgraph-high-availability/values.yaml Outdated
@mattkjames7
mattkjames7 merged commit e5fd382 into main Apr 10, 2026
7 checks passed
pull Bot pushed a commit to weslien/memgraph that referenced this pull request May 20, 2026
Adding monitoring of metrics and logs to S3 for CI runs.

Related infra PRs:
- memgraph/infra#455
- memgraph/infra#452

Related on helm-charts:
- memgraph/helm-charts#208

Related on prometheus-exporter
- memgraph/prometheus-exporter#31

Table showing example `CLUSTER_ID`, `CLUSTER_ENV` and `SERVICE_NAME` for
each monitored job:

| Workflow | Job (`github.job`) | Step | CLUSTER_ID | CLUSTER_ENV |
SERVICE_NAME | Backend |
|---|---|---|---|---|---|---|
| reusable_stress_tests.yaml | `stress_test_standalone` | Run stress
tests (native standalone) | `17834421029-stress_test_standalone` |
`ci-stress-tests` | `stress-native-standalone` *(default from
test_name)* | Docker |
| reusable_stress_tests.yaml | `stress_test_native_ha` | Run stress
tests (native HA) | `17834421029-stress_test_native_ha` |
`ci-stress-tests` | `stress-native-ha` | Docker |
| reusable_stress_tests.yaml | `stress_test_docker_ha` | Run stress
tests (docker HA) | `17834421029-stress_test_docker_ha` |
`ci-stress-tests` | `stress-docker-ha` | Docker |
| reusable_stress_tests.yaml | `stress_test_eks_ha` | Run stress tests
(EKS HA) | `17834421029-stress_test_eks_ha` | `ci-stress-tests` |
`stress-eks-ha` | Docker + `kube-prometheus-stack` within the cluster |
| reusable_package_mage.yaml | `BuildAndPush` | Run end-to-end tests |
`17834421029-BuildAndPush` | `ci-mage-<arch>` | `mage-e2e` *(default)* |
Docker |
| reusable_package_mage.yaml | `BuildAndPush` | Run End-to-end
correctness tests | `17834421029-BuildAndPush` | `ci-mage-<arch>` |
`mage-e2e-correctness` *(default)* | Docker |
| reusable_package_mage.yaml | `BuildAndPush` | Run End-to-end migration
tests | `17834421029-BuildAndPush` | `ci-mage-<arch>` |
`mage-e2e-migration` *(default)* | Docker |
| diff_debug.yaml | `core` | Run drivers tests | `17834421029-core` |
`ci-diff-debug` | `drivers` *(default)* | Docker |
| diff_debug.yaml | `core` | Run HA driver tests | `17834421029-core` |
`ci-diff-debug` | `drivers-high-availability` *(default)* | Docker |
| diff_debug.yaml | `integration` | Run integration tests |
`17834421029-integration` | `ci-diff-debug` | `integration` *(default)*
| Docker |
| diff_release.yaml | `core` | Run GQL Behave tests | `17834421029-core`
| `ci-diff-release` | `gql-behave` *(default)* | Docker |
| diff_release.yaml | `stress` | Run stress test (plain) |
`17834421029-stress` | `ci-diff-release` | `stress-plain` *(default)* |
Docker |
| diff_release.yaml | `stress` | Run stress test (SSL) |
`17834421029-stress` | `ci-diff-release` | `stress-ssl` *(default)* |
Docker |
| diff_release.yaml | `stress` | Run durability test (plain) |
`17834421029-stress` | `ci-diff-release` | `durability` *(default)* |
Docker |
| diff_release.yaml | `stress` | Run durability test (large) |
`17834421029-stress` | `ci-diff-release` | `durability-large`
*(default)* | Docker |
| reusable_release_tests.yaml | `debug_build` | Run drivers tests |
`17834421029-debug_build` | `ci-release-tests` | `drivers` *(default)* |
Docker |
| reusable_release_tests.yaml | `debug_build` | Run HA driver tests |
`17834421029-debug_build` | `ci-release-tests` |
`drivers-high-availability` *(default)* | Docker |
| reusable_release_tests.yaml | `debug_build` | Run cppcheck and
clang-format | `17834421029-debug_build` | `ci-release-tests` |
`cppcheck-and-clang-format` *(default)* | Docker |
| reusable_release_tests.yaml | `debug_integration_test` | Run
integration tests | `17834421029-debug_integration_test` |
`ci-release-tests` | `integration` *(default)* | Docker |
| reusable_release_tests.yaml | `malloc_build` | Run GQL Behave tests |
`17834421029-malloc_build` | `ci-release-tests` | `gql-behave`
*(default)* | Docker |
| reusable_release_tests.yaml | `release_build` | Run GQL Behave tests |
`17834421029-release_build` | `ci-release-tests` | `gql-behave`
*(default)* | Docker |
| reusable_release_tests.yaml | `release_durability_stress_tests` | Run
stress test (plain) | `17834421029-release_durability_stress_tests` |
`ci-release-tests` | `stress-plain` *(default)* | Docker |
| reusable_release_tests.yaml | `release_durability_stress_tests` | Run
stress test (SSL) | `17834421029-release_durability_stress_tests` |
`ci-release-tests` | `stress-ssl` *(default)* | Docker |
| reusable_release_tests.yaml | `release_durability_stress_tests` | Run
durability test (plain) | `17834421029-release_durability_stress_tests`
| `ci-release-tests` | `durability` *(default)* | Docker |
| reusable_release_tests.yaml | `release_durability_stress_tests` | Run
durability test (large) | `17834421029-release_durability_stress_tests`
| `ci-release-tests` | `durability-large` *(default)* | Docker |
| reusable_release_tests.yaml | `stress_test_large` | Run stress test
(large) | `17834421029-stress_test_large` | `ci-release-tests` |
`stress-large` *(default)* | Docker |
| reusable_release_tests.yaml | `release_jepsen_test` | Start Jepsen
monitoring (habank) | `17834421029-release_jepsen_test` |
`ci-release-tests` | `jepsen-habank` | Docker (jepsen script) |
| reusable_stress_jepsen.yaml | `ha-test` | Start Jepsen monitoring
(workload) | `17834421029-ha-test` | `ci-stress-jepsen` | `jepsen-ha-mt`
or `jepsen-hacreate` | Docker (jepsen script) |
| diff_jepsen.yaml | `core` | Start Jepsen monitoring (habank) |
`17834421029-core` | `ci-jepsen` | `jepsen-habank` | Docker (jepsen
script) |

Added monitoring to the following CI Jobs/tests:

- [x] Diff and Release build and test workflows
  - [x] Release / Core / GQL Behave
  - [x] Release / Stress /
    - [x] stress-plain
    - [x] stress-ssl
    - [x] durability
    - [x] durability-large
  - [x] Debug / Core / 
    - [x] drivers
    - [x] drivers-high-availability
  - [x] Debug / Integration
  - [x] Jepsen
    - [x] habank

- [x] Stress test large workflow
- [x] Stress tests
  - [x] Native standalone
  - [x] Native HA
  - [x] Docker HA
  - [x] EKS HA
- [x] Jepsen stress tests
- [x] ISSU
- [x] MAGE
  - [x] E2E
  - [x] E2E Correctness
  - [x] E2E Migration

TODO  (next PR):
- Add automated core dump and stack trace uploads to S3 + log entry with
links to both.
- Monitor E2E tests (currently broken, but should work with
OpenTelemetry endpoint being added in memgraph#3911 )


<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> Touches core CI execution paths (GitHub workflows, `mgbuild.sh`, and
stress/Jepsen/EKS deployment scripts) and introduces new Docker
Compose-based monitoring sidecars, which could cause CI flakes or
failures if endpoints/targets are misconfigured.
> 
> **Overview**
> Adds optional **remote monitoring of CI runs** (metrics + websocket
logs) across multiple GitHub workflows by passing new `mgbuild.sh` flags
(`--enable-monitoring`, `--monitoring-host`, `--cluster-id`,
`--cluster-env`, optional `--service-name`) and wiring in
monitoring-related secrets.
> 
> Extends `release/package/mgbuild.sh` to start/stop a new Docker
Compose monitoring stack around `test-memgraph`/`test-mage` runs,
auto-resolve HA monitoring targets (native/docker/EKS), validate
required monitoring args, and handle cleanup/trap chaining.
> 
> Introduces `tools/ci/monitoring/` (compose files + `up.sh`/`down.sh` +
templates + Jepsen helper) and updates stress/HA deployment scripts to
emit `MEMGRAPH_METRICS_TARGETS`/`MEMGRAPH_LOG_WS_TARGETS` and, for EKS,
create external monitoring services; ISSU upgrade test now clones
helm-charts and can enable remote write/log shipping via Helm values
when monitoring creds are provided.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
da0e4ec. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

memgraph Memgraph standalone issue memgraph-ha Memgraph HA chart issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants