-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support creating LogFileMetricsExporter CR
In logging version 5.8 and newer versions, the LogFileMetricExporter is no longer deployed with the collector by default. You must manually create a LogFileMetricExporter custom resource (CR) to generate metrics from the logs produced by running containers. If you do not create the LogFileMetricExporter CR, you may see a No datapoints found message in the OpenShift Container Platform web console dashboard for Produced Logs.
- Loading branch information
1 parent
36503f7
commit 9c29863
Showing
9 changed files
with
159 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
local kap = import 'lib/kapitan.libjsonnet'; | ||
local kube = import 'lib/kube.libjsonnet'; | ||
|
||
local inv = kap.inventory(); | ||
local params = inv.parameters.openshift4_logging; | ||
|
||
local logMetricExporter = kube._Object('logging.openshift.io/v1alpha1', 'LogFileMetricExporter', 'instance') { | ||
metadata+: { | ||
namespace: params.namespace, | ||
}, | ||
spec: params.components.logmetrics.spec, | ||
}; | ||
|
||
{ | ||
'70_logmetricsexporter': logMetricExporter, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
tests/golden/defaults/openshift4-logging/openshift4-logging/70_logmetricsexporter.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
apiVersion: logging.openshift.io/v1alpha1 | ||
kind: LogFileMetricExporter | ||
metadata: | ||
annotations: {} | ||
labels: | ||
name: instance | ||
name: instance | ||
namespace: openshift-logging | ||
spec: | ||
nodeSelector: | ||
node-role.kubernetes.io/infra: '' | ||
resources: | ||
limits: | ||
cpu: 500m | ||
memory: 256Mi | ||
requests: | ||
cpu: 200m | ||
memory: 128Mi |
18 changes: 18 additions & 0 deletions
18
tests/golden/elasticsearch/openshift4-logging/openshift4-logging/70_logmetricsexporter.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
apiVersion: logging.openshift.io/v1alpha1 | ||
kind: LogFileMetricExporter | ||
metadata: | ||
annotations: {} | ||
labels: | ||
name: instance | ||
name: instance | ||
namespace: openshift-logging | ||
spec: | ||
nodeSelector: | ||
node-role.kubernetes.io/infra: '' | ||
resources: | ||
limits: | ||
cpu: 500m | ||
memory: 256Mi | ||
requests: | ||
cpu: 200m | ||
memory: 128Mi |
18 changes: 18 additions & 0 deletions
18
tests/golden/forwardingonly/openshift4-logging/openshift4-logging/70_logmetricsexporter.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
apiVersion: logging.openshift.io/v1alpha1 | ||
kind: LogFileMetricExporter | ||
metadata: | ||
annotations: {} | ||
labels: | ||
name: instance | ||
name: instance | ||
namespace: openshift-logging | ||
spec: | ||
nodeSelector: | ||
node-role.kubernetes.io/infra: '' | ||
resources: | ||
limits: | ||
cpu: 500m | ||
memory: 256Mi | ||
requests: | ||
cpu: 200m | ||
memory: 128Mi |
18 changes: 18 additions & 0 deletions
18
tests/golden/master/openshift4-logging/openshift4-logging/70_logmetricsexporter.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
apiVersion: logging.openshift.io/v1alpha1 | ||
kind: LogFileMetricExporter | ||
metadata: | ||
annotations: {} | ||
labels: | ||
name: instance | ||
name: instance | ||
namespace: openshift-logging | ||
spec: | ||
nodeSelector: | ||
node-role.kubernetes.io/infra: '' | ||
resources: | ||
limits: | ||
cpu: 500m | ||
memory: 256Mi | ||
requests: | ||
cpu: 200m | ||
memory: 128Mi |
18 changes: 18 additions & 0 deletions
18
tests/golden/multilineerr/openshift4-logging/openshift4-logging/70_logmetricsexporter.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
apiVersion: logging.openshift.io/v1alpha1 | ||
kind: LogFileMetricExporter | ||
metadata: | ||
annotations: {} | ||
labels: | ||
name: instance | ||
name: instance | ||
namespace: openshift-logging | ||
spec: | ||
nodeSelector: | ||
node-role.kubernetes.io/infra: '' | ||
resources: | ||
limits: | ||
cpu: 500m | ||
memory: 256Mi | ||
requests: | ||
cpu: 200m | ||
memory: 128Mi |