이 콘텐츠는 선택한 언어로 제공되지 않습니다.

Chapter 3. Monitoring and logging Red Hat Developer Hub on Amazon Web Services (AWS)


You can configure Red Hat Developer Hub to use Amazon CloudWatch for real-time monitoring and Amazon Prometheus for comprehensive logging. This is convenient when hosting Developer Hub on Amazon Web Services (AWS) infrastructure.

3.1. Monitoring with Amazon Prometheus

You can configure Red Hat Developer Hub to use Amazon Prometheus for comprehensive logging. Amazon Prometheus extracts data from pods that have specific pod annotations.

3.1.1. Prerequisites

To enable logging to Amazon Prometheus, you can configure the required pod annotations by using the Red Hat Developer Hub Operator.

Procedure

  1. As an administrator of the Red Hat Developer Hub Operator, edit the default configuration to add Prometheus annotations as follows:

    # Update OPERATOR_NS accordingly
    $ OPERATOR_NS=rhdh-operator
    $ kubectl edit configmap backstage-default-config -n "${OPERATOR_NS}"
  2. Find the deployment.yaml key in the config map and add the annotations to the spec.template.metadata.annotations field as follows:

    deployment.yaml: |-
      apiVersion: apps/v1
      kind: Deployment
      # --- truncated ---
      spec:
        template:
          # --- truncated ---
          metadata:
            labels:
             rhdh.redhat.com/app:  # placeholder for 'backstage-<cr-name>'
            # --- truncated ---
            annotations:
              prometheus.io/scrape: 'true'
              prometheus.io/path: '/metrics'
              prometheus.io/port: '9464'
              prometheus.io/scheme: 'http'
      # --- truncated ---
  3. Save your changes.

Verification

To verify if the scraping works:

  1. Use kubectl to port-forward the Prometheus console to your local machine as follows:

    $ kubectl --namespace=prometheus port-forward deploy/prometheus-server 9090
  2. Open your web browser and navigate to http://localhost:9090 to access the Prometheus console.
  3. Monitor relevant metrics, such as process_cpu_user_seconds_total.

To enable logging to Amazon Prometheus, you can configure the required pod annotations by using the Red Hat Developer Hub Helm chart.

Procedure

  • To annotate the backstage pod for monitoring, update your values.yaml file as follows:

    upstream:
      backstage:
        # --- TRUNCATED ---
        podAnnotations:
          prometheus.io/scrape: 'true'
          prometheus.io/path: '/metrics'
          prometheus.io/port: '9464'
          prometheus.io/scheme: 'http'

Verification

To verify if the scraping works:

  1. Use kubectl to port-forward the Prometheus console to your local machine as follows:

    kubectl --namespace=prometheus port-forward deploy/prometheus-server 9090
  2. Open your web browser and navigate to http://localhost:9090 to access the Prometheus console.
  3. Monitor relevant metrics, such as process_cpu_user_seconds_total.

3.2. Logging with Amazon CloudWatch

Logging within the Red Hat Developer Hub relies on the Winston library.

3.2.1. Configuring the application log level by using the Red Hat Developer Hub Operator

You can configure the application log level by using the Red Hat Developer Hub Operator.

Procedure

  • Modify the logging level by including the environment variable LOG_LEVEL in your custom resource as follows:

    spec:
      # Other fields omitted
      application:
        extraEnvs:
          envs:
            - name: LOG_LEVEL
              value: debug

3.2.2. Configuring the application log level by using the Red Hat Developer Hub Helm chart

You can configure the application log level by using the Red Hat Developer Hub Helm chart.

Procedure

  • Modify the logging level by adding the environment variable LOG_LEVEL to your Helm chart values.yaml file:

    upstream:
      backstage:
        # --- Truncated ---
        extraEnvVars:
          - name: LOG_LEVEL
            value: debug

3.2.3. Retrieving logs from Amazon CloudWatch

Prerequisites

  • CloudWatch Container Insights is used to capture logs and metrics for Amazon Elastic Kubernetes Service. For more information, see Logging for Amazon Elastic Kubernetes Service documentation.
  • To capture the logs and metrics, install the Amazon CloudWatch Observability EKS add-on in your cluster. Following the setup of Container Insights, you can access container logs using Logs Insights or Live Tail views.
  • CloudWatch names the log group where all container logs are consolidated in the following manner:

    /aws/containerinsights/<cluster_name>/application

Procedure

  • To retrieve logs from the Developer Hub instance, run a query such as:

    fields @timestamp, @message, kubernetes.container_name
    | filter kubernetes.container_name in ["install-dynamic-plugins", "backstage-backend"]
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 문서 정보

Legal Notice

Theme

© 2026 Red Hat
맨 위로 이동