Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v2-3] Update custom metrics guide to HelmRelease v2 #2030

Merged
merged 1 commit into from
Jul 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions content/en/flux/monitoring/custom-metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ about that in the next section.

Similarly, more custom metrics can be added by appending them to the `metrics`
list. For example, to create a metric about the HelmRelease last applied
revision, append the HelmRelease resource metrics section:
chart and app version, append the HelmRelease resource metrics section:

```yaml
...
Expand Down Expand Up @@ -103,11 +103,12 @@ customResourceState:
type: Info
info:
labelsFromPath:
version: [status, lastAppliedRevision]
chart_version: [status, history, "0", chartVersion]
app_version: [ status, history, "0", appVersion ]
labelsFromPath:
name: [metadata, name]
exported_namespace: [metadata, namespace]
chartName: [spec, chart, spec, chart]
chart_name: [spec, chart, spec, chart]
...
```

Expand All @@ -117,12 +118,10 @@ will be exported for HelmReleases.
```
# HELP gotk_resource_info The current state of a GitOps Toolkit resource.
# TYPE gotk_resource_info info
gotk_resource_info{customresource_group="helm.toolkit.fluxcd.io",customresource_kind="HelmRelease",customresource_version="v2beta2",exported_namespace="monitoring",name="kube-prometheus-stack",ready="True"} 1
gotk_resource_info{customresource_group="helm.toolkit.fluxcd.io",customresource_kind="HelmRelease",customresource_version="v2beta2",exported_namespace="monitoring",name="loki-stack",ready="True"} 1
gotk_resource_info{customresource_group="helm.toolkit.fluxcd.io",customresource_kind="HelmRelease",customresource_version="v2",exported_namespace="monitoring",name="kube-prometheus-stack",ready="True"} 1
# HELP gotk_helmrelease_version_info The version information of helm release resource.
# TYPE gotk_helmrelease_version_info info
gotk_helmrelease_version_info{chartName="kube-prometheus-stack",customresource_group="helm.toolkit.fluxcd.io",customresource_kind="HelmRelease",customresource_version="v2beta2",exported_namespace="monitoring",name="kube-prometheus-stack",version="48.3.1"} 1
gotk_helmrelease_version_info{chartName="loki-stack",customresource_group="helm.toolkit.fluxcd.io",customresource_kind="HelmRelease",customresource_version="v2beta2",exported_namespace="monitoring",name="loki-stack",version="2.9.11"} 1
gotk_helmrelease_version_info{chart_mame="kube-prometheus-stack",chart_version="61.3.2",app_version="v0.75.1",customresource_group="helm.toolkit.fluxcd.io",customresource_kind="HelmRelease",customresource_version="v2",exported_namespace="monitoring",name="kube-prometheus-stack"} 1
```

## Adding custom metric labels
Expand Down