Ce contenu n'est pas disponible dans la langue sélectionnée.
Chapter 3. Installing the core components of Service Telemetry Framework
You can use Operators to load the Service Telemetry Framework (STF) components and objects. Operators manage each of the following STF core and community components:
- cert-manager
- AMQ Interconnect
- Smart Gateway
- Prometheus and AlertManager
- Elasticsearch
- Grafana
Prerequisites
- An Red Hat OpenShift Container Platform version inclusive of 4.10 through 4.12 is running.
- You have prepared your Red Hat OpenShift Container Platform environment and ensured that there is persistent storage and enough resources to run the STF components on top of the Red Hat OpenShift Container Platform environment. For more information, see Service Telemetry Framework Performance and Scaling.
- Your environment is fully connected. STF does not work in a Red Hat OpenShift Container Platform-disconnected environments or network proxy environments.
STF is compatible with Red Hat OpenShift Container Platform version 4.10 through 4.12.
Additional resources
- For more information about Operators, see the Understanding Operators guide.
- For more information about Operator catalogs, see Red Hat-provided Operator catalogs.
3.1. Deploying Service Telemetry Framework to the Red Hat OpenShift Container Platform environment Copier lienLien copié sur presse-papiers!
Deploy Service Telemetry Framework (STF) to collect, store, and monitor events:
Procedure
Create a namespace to contain the STF components, for example,
service-telemetry
:oc new-project service-telemetry
$ oc new-project service-telemetry
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Create an OperatorGroup in the namespace so that you can schedule the Operator pods:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow For more information, see OperatorGroups.
Create a namespace for the cert-manager Operator:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Create an OperatorGroup for the cert-manager Operator:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Subscribe to the cert-manager Operator by using the redhat-operators CatalogSource:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Validate your ClusterServiceVersion. Ensure that cert-manager Operator displays a phase of
Succeeded
:oc get csv --namespace openshift-cert-manager-operator --selector=operators.coreos.com/openshift-cert-manager-operator.openshift-cert-manager-operator
$ oc get csv --namespace openshift-cert-manager-operator --selector=operators.coreos.com/openshift-cert-manager-operator.openshift-cert-manager-operator NAME DISPLAY VERSION REPLACES PHASE openshift-cert-manager.v1.7.1 cert-manager Operator for Red Hat OpenShift 1.7.1-1 Succeeded
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Subscribe to the AMQ Interconnect Operator by using the redhat-operators CatalogSource:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Validate your ClusterServiceVersion. Ensure that amq7-interconnect-operator.v1.10.x displays a phase of
Succeeded
:oc get csv --selector=operators.coreos.com/amq7-interconnect-operator.service-telemetry
$ oc get csv --selector=operators.coreos.com/amq7-interconnect-operator.service-telemetry NAME DISPLAY VERSION REPLACES PHASE amq7-interconnect-operator.v1.10.15 Red Hat Integration - AMQ Interconnect 1.10.15 amq7-interconnect-operator.v1.10.4 Succeeded
Copy to Clipboard Copied! Toggle word wrap Toggle overflow To store metrics in Prometheus, you must enable the Prometheus Operator by using the community-operators CatalogSource:
WarningCommunity Operators are Operators which have not been vetted or verified by Red Hat. Community Operators should be used with caution because their stability is unknown. Red Hat provides no support for community Operators.
Learn more about Red Hat’s third party software support policy
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Verify that the ClusterServiceVersion for Prometheus
Succeeded
:oc get csv --selector=operators.coreos.com/prometheus.service-telemetry
$ oc get csv --selector=operators.coreos.com/prometheus.service-telemetry NAME DISPLAY VERSION REPLACES PHASE prometheusoperator.0.56.3 Prometheus Operator 0.56.3 prometheusoperator.0.47.0 Succeeded
Copy to Clipboard Copied! Toggle word wrap Toggle overflow To store events in Elasticsearch, you must enable the Elastic Cloud on Kubernetes (ECK) Operator by using the certified-operators CatalogSource:
WarningCertified Operators are Operators from leading independent software vendors (ISVs). Red Hat partners with ISVs to package and ship, but not support, the certified Operators. Supported is provided by the ISV.
Learn more about Red Hat’s third party software support policy
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Verify that the ClusterServiceVersion for Elastic Cloud on Kubernetes
Succeeded
:oc get csv --selector=operators.coreos.com/elasticsearch-eck-operator-certified.service-telemetry
$ oc get csv --selector=operators.coreos.com/elasticsearch-eck-operator-certified.service-telemetry NAME DISPLAY VERSION REPLACES PHASE elasticsearch-eck-operator-certified.v2.8.0 Elasticsearch (ECK) Operator 2.8.0 elasticsearch-eck-operator-certified.v2.7.0 Succeeded
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Create the Service Telemetry Operator subscription to manage the STF instances:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Validate the Service Telemetry Operator and the dependent operators have their phase as Succeeded:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
3.2. Creating a ServiceTelemetry object in Red Hat OpenShift Container Platform Copier lienLien copié sur presse-papiers!
Create a ServiceTelemetry
object in Red Hat OpenShift Container Platform to result in the Service Telemetry Operator creating the supporting components for a Service Telemetry Framework (STF) deployment. For more information, see Section 3.2.1, “Primary parameters of the ServiceTelemetry object”.
Procedure
To create a
ServiceTelemetry
object that results in an STF deployment that uses the default values, create aServiceTelemetry
object with an emptyspec
parameter:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Creating a
ServiceTelemetry
object with an emptyspec
parameter results in an STF deployment with the following default settings:Copy to Clipboard Copied! Toggle word wrap Toggle overflow To override these defaults, add the configuration to the
spec
parameter.View the STF deployment logs in the Service Telemetry Operator:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Verification
To determine that all workloads are operating correctly, view the pods and the status of each pod.
NoteIf you set the
backends.events.elasticsearch.enabled
parameter totrue
, the notification Smart Gateways reportError
andCrashLoopBackOff
error messages for a period of time before Elasticsearch starts.Copy to Clipboard Copied! Toggle word wrap Toggle overflow
3.2.1. Primary parameters of the ServiceTelemetry object Copier lienLien copié sur presse-papiers!
The ServiceTelemetry
object comprises the following primary configuration parameters:
-
alerting
-
backends
-
clouds
-
graphing
-
highAvailability
-
transports
You can configure each of these configuration parameters to provide different features in an STF deployment.
The backends parameter
Use the backends
parameter to control which storage back ends are available for storage of metrics and events, and to control the enablement of Smart Gateways that the clouds
parameter defines. For more information, see the section called “The clouds parameter”.
You can use Prometheus as the metrics storage back end and Elasticsearch as the events storage back end. You can use the Service Telemetry Operator to create other custom resource objects that the Prometheus Operator and Elastic Cloud on Kubernetes Operator watch to create Prometheus and Elasticsearch workloads.
Enabling Prometheus as a storage back end for metrics
To enable Prometheus as a storage back end for metrics, you must configure the ServiceTelemetry
object.
Procedure
Edit the
ServiceTelemetry
object:oc edit stf default
$ oc edit stf default
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Set the value of the backends.metrics.prometheus.enabled parameter to
true
:Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Configuring persistent storage for Prometheus
Use the additional parameters that are defined in backends.metrics.prometheus.storage.persistent
to configure persistent storage options for Prometheus, such as storage class and volume size.
Use storageClass
to define the back end storage class. If you do not set this parameter, the Service Telemetry Operator uses the default storage class for the Red Hat OpenShift Container Platform cluster.
Use the pvcStorageRequest
parameter to define the minimum required volume size to satisfy the storage request. If volumes are statically defined, it is possible that a volume size larger than requested is used. By default, Service Telemetry Operator requests a volume size of 20G
(20 Gigabytes).
Procedure
List the available storage classes:
oc get storageclasses
$ oc get storageclasses NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE csi-manila-ceph manila.csi.openstack.org Delete Immediate false 20h standard (default) kubernetes.io/cinder Delete WaitForFirstConsumer true 20h standard-csi cinder.csi.openstack.org Delete WaitForFirstConsumer true 20h
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Edit the
ServiceTelemetry
object:oc edit stf default
$ oc edit stf default
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Set the value of the backends.metrics.prometheus.enabled parameter to
true
and the value of backends.metrics.prometheus.storage.strategy topersistent
:Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Enabling Elasticsearch as a storage back end for events
To enable Elasticsearch as a storage back end for events, you must configure the ServiceTelemetry
object.
Procedure
Edit the
ServiceTelemetry
object:oc edit stf default
$ oc edit stf default
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Set the value of the backends.events.elasticsearch.enabled parameter to
true
:Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Configuring persistent storage for Elasticsearch
Use the additional parameters defined in backends.events.elasticsearch.storage.persistent
to configure persistent storage options for Elasticsearch, such as storage class and volume size.
Use storageClass
to define the back end storage class. If you do not set this parameter, the Service Telemetry Operator uses the default storage class for the Red Hat OpenShift Container Platform cluster.
Use the pvcStorageRequest
parameter to define the minimum required volume size to satisfy the storage request. If volumes are statically defined, it is possible that a volume size larger than requested is used. By default, Service Telemetry Operator requests a volume size of 20Gi
(20 Gibibytes).
Procedure
List the available storage classes:
oc get storageclasses
$ oc get storageclasses NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE csi-manila-ceph manila.csi.openstack.org Delete Immediate false 20h standard (default) kubernetes.io/cinder Delete WaitForFirstConsumer true 20h standard-csi cinder.csi.openstack.org Delete WaitForFirstConsumer true 20h
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Edit the
ServiceTelemetry
object:oc edit stf default
$ oc edit stf default
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Set the value of the backends.events.elasticsearch.enabled parameter to
true
and the value of backends.events.elasticsearch.storage.strategy topersistent
:Copy to Clipboard Copied! Toggle word wrap Toggle overflow
The clouds parameter
Use the clouds
parameter to define which Smart Gateway objects deploy, thereby providing the interface for multiple monitored cloud environments to connect to an instance of STF. If a supporting back end is available, then metrics and events Smart Gateways for the default cloud configuration are created. By default, the Service Telemetry Operator creates Smart Gateways for cloud1
.
You can create a list of cloud objects to control which Smart Gateways are created for the defined clouds. Each cloud consists of data types and collectors. Data types are metrics
or events
. Each data type consists of a list of collectors, the message bus subscription address, and a parameter to enable debugging. Available collectors for metrics are collectd
, ceilometer
, and sensubility
. Available collectors for events are collectd
and ceilometer
. Ensure that the subscription address for each of these collectors is unique for every cloud, data type, and collector combination.
The default cloud1
configuration is represented by the following ServiceTelemetry
object, which provides subscriptions and data storage of metrics and events for collectd, Ceilometer, and Sensubility data collectors for a particular cloud instance:
Each item of the clouds
parameter represents a cloud instance. A cloud instance consists of three top-level parameters: name
, metrics
, and events
. The metrics
and events
parameters represent the corresponding back end for storage of that data type. The collectors
parameter specifies a list of objects made up of two required parameters, collectorType
and subscriptionAddress
, and these represent an instance of the Smart Gateway. The collectorType
parameter specifies data collected by either collectd, Ceilometer, or Sensubility. The subscriptionAddress
parameter provides the AMQ Interconnect address to which a Smart Gateway subscribes.
You can use the optional Boolean parameter debugEnabled
within the collectors
parameter to enable additional console debugging in the running Smart Gateway pod.
Additional resources
- For more information about deleting default Smart Gateways, see Section 4.3.3, “Deleting the default Smart Gateways”.
- For more information about how to configure multiple clouds, see Section 4.3, “Configuring multiple clouds”.
The alerting parameter
Use the alerting
parameter to control creation of an Alertmanager instance and the configuration of the storage back end. By default, alerting
is enabled. For more information, see Section 5.3, “Alerts in Service Telemetry Framework”.
The graphing parameter
Use the graphing
parameter to control the creation of a Grafana instance. By default, graphing
is disabled. For more information, see Section 5.1, “Dashboards in Service Telemetry Framework”.
The highAvailability parameter
Use the highAvailability
parameter to control the instantiation of multiple copies of STF components to reduce recovery time of components that fail or are rescheduled. By default, highAvailability
is disabled. For more information, see Section 5.6, “High availability”.
The transports parameter
Use the transports
parameter to control the enablement of the message bus for a STF deployment. The only transport currently supported is AMQ Interconnect. By default, the qdr
transport is enabled.
3.3. Accessing user interfaces for STF components Copier lienLien copié sur presse-papiers!
In Red Hat OpenShift Container Platform, applications are exposed to the external network through a route. For more information about routes, see Configuring ingress cluster traffic.
In Service Telemetry Framework (STF), HTTPS routes are exposed for each service that has a web-based interface. These routes are protected by Red Hat OpenShift Container Platform RBAC and any user that has a ClusterRoleBinding
that enables them to view Red Hat OpenShift Container Platform Namespaces can log in. For more information about RBAC, see Using RBAC to define and apply permissions.
Procedure
- Log in to Red Hat OpenShift Container Platform.
Change to the
service-telemetry
namespace:oc project service-telemetry
$ oc project service-telemetry
Copy to Clipboard Copied! Toggle word wrap Toggle overflow List the available web UI routes in the
service-telemetry
project:oc get routes | grep web
$ oc get routes | grep web default-alertmanager-proxy default-alertmanager-proxy-service-telemetry.apps.infra.watch default-alertmanager-proxy web reencrypt/Redirect None default-prometheus-proxy default-prometheus-proxy-service-telemetry.apps.infra.watch default-prometheus-proxy web reencrypt/Redirect None
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - In a web browser, navigate to https://<route_address> to access the web interface for the corresponding service.
3.4. Configuring an alternate observability strategy Copier lienLien copié sur presse-papiers!
To configure STF to skip the deployment of storage, visualization, and alerting backends, add observabilityStrategy: none
to the ServiceTelemetry spec. In this mode, only AMQ Interconnect routers and metrics Smart Gateways are deployed, and you must configure an external Prometheus-compatible system to collect metrics from the STF Smart Gateways.
Currently, only metrics are supported when you set observabilityStrategy
to none
. Events Smart Gateways are not deployed.
Procedure
Create a
ServiceTelemetry
object with the propertyobservabilityStrategy: none
in thespec
parameter. The manifest shows results in a default deployment of STF that is suitable for receiving telemetry from a single cloud with all metrics collector types.Copy to Clipboard Copied! Toggle word wrap Toggle overflow Delete the left over objects that are managed by community operators
for o in alertmanager/default prometheus/default elasticsearch/elasticsearch grafana/default; do oc delete $o; done
$ for o in alertmanager/default prometheus/default elasticsearch/elasticsearch grafana/default; do oc delete $o; done
Copy to Clipboard Copied! Toggle word wrap Toggle overflow To verify that all workloads are operating correctly, view the pods and the status of each pod:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Additional resources
For more information about configuring additional clouds or to change the set of supported collectors, see Section 4.3.2, “Deploying Smart Gateways”