Enabling Instana metric collection
You can enable License Service Reporter to allow Instana to collect metrics about License Service Reporter pod containers.
After you enable Instana metric collection, you can view metrics about License Service Reporter pod containers in Instana. For more information, see Configuring and monitoring supported technologies in the Instana documentation.
Prerequisites
- A cluster with Instana configured.
Procedure
-
Enable Instana metric collection by adding
enableInstanaMetricCollection: true
to theIBMLicenseServiceReporter
custom resource (CR). This action triggers the License Service Reporter pod to restart.kubectl patch IBMLicenseServiceReporters <name-of-your-License-Service-Reporter-instance> --type merge -p '{"spec": {"enableInstanaMetricCollection": true}}'
-
(Optional) A dedicated
instana_user
is created for License Service Reporter database to allow Instana to collect metrics. By default, the password that is associated with this user ispostgres
. However, you can set a custom password. Access the License Service Reporter instance pod and set a custom password by running the following command:LSR_NAMESPACE=<your-License-Service-Reporter-namespace> LSR_POD=$(kubectl get pod -l app.kubernetes.io/instance=ibm-license-service-reporter -n $LSR_NAMESPACE -o jsonpath="{.items[0].metadata.name}") kubectl exec -i -t $LSR_POD -n $LSR_NAMESPACE --container database -- /bin/psql -U postgres -c "ALTER USER instana_user WITH PASSWORD '<your-custom-password>';"
-
Update the
InstanaAgent
CR instance with the following configuration. If you set a custom password forinstana_user
, change the password frompostgres
to your custom password in the following configuration:... spec: agent: configuration_yaml: | com.instana.plugin.postgresql: user: "instana_user" password: "postgres" database: "postgres" ...
-
Go to Instana and check if Instana collects and shows the License Service Reporter metrics.
Note: The License Service Reporter metrics might not be immediately shown in Instana.
To view the License Service Reporter metrics in Instana, go to Instana and select Infrastructure >
. For more information about Instana, see Instana documentation.
Disabling Instana metric collection
Disable Instana metric collection by changing the value of enableInstanaMetricCollection
parameter to false
in the IBMLicenseServiceReporter
custom resource (CR). This action triggers the License Service Reporter
pod to restart.
kubectl patch IBMLicenseServiceReporters <name-of-your-License-Service-Reporter-instance> --type merge -p '{"spec": {"enableInstanaMetricCollection": false}}'