Skip to content

Configure service discovery rules

Observable Insight supports the way of creating CRD ServiceMonitor through container management to meet your collection requirements for custom service discovery. Users can use ServiceMonitor to define the scope of the Namespace discovered by the Pod and select the monitored Service through matchLabel .

Prerequisites

The cluster has the Helm application insight-agent installed and in the running state.

Steps

  1. Select Data Collection on the left navigation bar to view the status of all cluster collection plug-ins.

    Data Collection

  2. Click a cluster name to enter the collection configuration details.

    Data Collection

  3. Click the link to jump to Container Management to create a Service Monitor.

    apiVersion: monitoring.coreos.com/v1
    kind: ServiceMonitor
    metadata:
      name: micrometer-demo # 
      namespace: insight-system # 
        labels: 
         operator.insight.io/managed-by: insight
    spec:
      endpoints: # 
        - honorLabels: true
           interval: 15s
            path: /actuator/prometheus
            port: http
      namespaceSelector: # 
        matchNames:
          - insight-system  # 
      selector: # 
        matchLabels:
          micrometer-prometheus-discovery: "true"
    

Comments