You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: _docs/kb/articles/enable-engine-pod-metrics.md
+55-20Lines changed: 55 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ toc: true
7
7
kb:true
8
8
ht:false
9
9
common:false
10
-
categories:[Runtimes, CLI]
10
+
categories:[Runtimes]
11
11
support-reviewed:2023-04-18 LG
12
12
---
13
13
@@ -18,29 +18,64 @@ If you want to scrape the metrics from the Codefresh Runner to your existing Pro
18
18
19
19
##Details
20
20
21
-
You will needtoadd the`METRICS_PROMETHEUS_ENABLED: 'true'` environment variable in your Runtime Environment spec.
21
+
###Howtoenable
22
22
23
-
To make the changes in your Runtime Environment, you will need to usethe[Codefresh CLI.](https://codefresh-io.github.io/cli/installation/)
23
+
You will need to add the`METRICS_PROMETHEUS_ENABLED: 'true'` environment variable fortheengine pod.
24
24
25
-
1. Get your Runtime Environment spec:
25
+
To make such a change, you need to change Codefresh Runner Helm chart values. Full path to the entity in question is`runtime.engine.env.METRICS_PROMETHEUS_ENABLED`.
26
26
27
-
`codefresh get re <name> -o yaml > spec.yaml`
27
+
Complete documentation on this and other environment variables available in the engine can be found on[Artifact Hub](https://artifacthub.io/packages/helm/codefresh-runner/cf-runtime?modal=values&path=runtime.engine.env).
28
28
29
-
2. Modify\add the`envVar` section in`runtimeScheduler` in the downloaded
30
-
file:
31
29
32
-
```yaml
33
-
...
34
-
runtimeScheduler:
35
-
envVars:
36
-
METRICS_PROMETHEUS_ENABLED: 'true'
37
-
...
38
-
cluster:
39
-
...
40
-
```
30
+
###Available metrics
41
31
42
-
3. Save thefile and then patch your RE usingthe followingCLI command:
32
+
Each of themetrics below hasthe followingadditional labels:`account_name`,`docker_node_address`,`pipeline_id`,`repo_branch`,`workflow`
43
33
44
-
`codefresh patch re -f spec.yaml`
45
-
46
-
Start a new build and check if you can scrape the metrics using port 9100 at the /metrics endpoint. The metrics in the dind pod should be enabled by default at the same port and endpoint.