Metricbeat on Openshift & Nginx

Hi, I was wondering if there's any way to monitor nginx inside openshift service with metricbeat & filebeat. Can anyone help me with this?

Hi @Ivan_Hosea. You can refer the the official docs for running (file/metric)beat on OpenShift here. Additionally, you may want to make use of the autodiscovery(here) to enable the proper modules. These should help you get started.

If for example I want to monitor redis for containers that have redis image plus their infrastructure, and just monitor infrastructure for the rest, do I need to create different templates? What do I need to add in this configuration below to do that?

        - type: kubernetes
          scope: cluster
          node: ${NODE_NAME}
          # In large Kubernetes clusters consider setting unique to false
          # to avoid using the leader election strategy and
          # instead run a dedicated Metricbeat instance using a Deployment in addition to the DaemonSet
          unique: true
            - config:
                - module: kubernetes
                  hosts: ["kube-state-metrics:8080"]
                  period: 10s
                  add_metadata: true
                    - state_node
                    - state_deployment
                    - state_daemonset
                    - state_replicaset
                    - state_pod
                    - state_container
                    - state_job
                    - state_cronjob
                    - state_resourcequota
                    - state_statefulset
                    - state_service
                    - state_persistentvolume
                    - state_persistentvolumeclaim
                    - state_storageclass
                  # If `https` is used to access `kube-state-metrics`, uncomment following settings:
                  # bearer_token_file: /var/run/secrets/
                  # ssl.certificate_authorities:
                  #   - /var/run/secrets/
                - module: kubernetes
                    - apiserver
                  hosts: ["https://${KUBERNETES_SERVICE_HOST}:${KUBERNETES_SERVICE_PORT}"]
                  bearer_token_file: /var/run/secrets/
                    - /var/run/secrets/
                  period: 30s
                # Uncomment this to get k8s events:
                #- module: kubernetes
                #  metricsets:
                #    - event
        # To enable hints based autodiscover uncomment this:
        #- type: kubernetes
        #  node: ${NODE_NAME}
        #  hints.enabled: true

The metricbeat autodiscover manifest above is from the default metricbeat kubernetes deployment file here:

Also, does the metricbeat monitors all pods / service / deployments? If so, is there any way to filter it?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.