This section shows how to modify the default rules file in the probe
ConfigMap
using the command line.
Note:
The
ConfigMap
will be deleted when the probe instance is deleted.
You should keep a copy of any custom rules file in case you need to use them in the future.
Getting the ConfigMap name and rules filename
Extracting and Customizing the rules file
Patching the Configmap
Restarting the Probe Pods
Getting the ConfigMap name and rules filename
You need to determine the probe instance name and get the
ConfigMap
name that
contains the probe rules files. The
ConfigMap
with the
-rules
suffix should contain the rules files.
The following command uses
example-kafkaprobe
as the probe instance name to
query the
ConfigMap
using the
app.kubernetes.io/instance
label.
The
--namespace
option can also be specified if required:
$ kubectl get configmap -l app.kubernetes.io/instance=example-kafkaprobe
NAME DATA AGE
example-kafkaprobe-probe-mb-kfk-config 8 12d
example-kafkaprobe-probe-mb-kfk-rules 5 12d
Note: The rules file(s) name from the Data
field. You need to extract the
files that you want to customize. This example customizes the
message_bus.rules
.
$ kubectl describe configmap example-kafkaprobe-probe-mb-kfk-rules
Name: example-kafkaprobe-probe-mb-kfk-rules
Namespace: default
Labels: app.kubernetes.io/component=mb
app.kubernetes.io/instance=example-kafkaprobe
app.kubernetes.io/managed-by=Tiller
app.kubernetes.io/name=probe-mb-kfk
hdm.ibm.com/chartversion=3.0.0
hdm.ibm.com/lastreconciled=
hdm.ibm.com/resourceowner=
helm.sh/chart=ibm-netcool-probe-messagebus-kafka-prod
release=example-kafkaprobe
Annotations: hdm.ibm.com/lastknownstate: 67c4b74cd6d3b5c44718b38e3cd4517b
message_bus.rules:
<message_bus.rules file content omitted>
message_bus_cbe.rules:
<message_bus_cbe.rules file content omitted>
message_bus_netcool.rules:
<message_bus_netcool.rules content omitted>
message_bus_wbe.rules:
<message_bus_wbe.rules content omitted>
message_bus_wef.rules:
<message_bus_wef.rules content omitted>
Events: <none>