Skip to content

Infrastructure Integration

Configuration

  1. Configure the agent by editing /etc/nutanix/epoch-dd-agent/conf.d/prometheus.yaml with the proper prometheus_url, desired namespace, and required metrics.

Example:

    init_config:
      # Leave empty

    instances:
      # The prometheus metrics endpoint to query
      #
      - prometheus_url: http://service/prometheus

      #   The namespace to be appended before all metrics namespace
      #
        namespace: "service"

      #  List of metrics to be fetched from the prometheus endpoint, if there's a value it'll be renamed
      #  This list should contain at least one metric
      #  Replace the below examples with your required metrics
      #  "*" can be used as a wildcard, i.e. "http*" will capture all metrics starting with "http"
      #  "*" by itself can be used to capture all metrics
      #
        metrics:
          - processor: cpu # "processor" metric would be seen as "service.cpu" on AOC
          - memory: mem
          - io

      # Prefix for exposed Prometheus metrics
      #
      # prometheus_metrics_prefix: prefix_

      #   Send a service check reporting about the health of the prometheus endpoint
      #   It will be named <namespace>.prometheus.health (true by default)
      #
      #   health_service_check: True

      #   Override the hostname with the value of one label
      #
      #   label_to_hostname: node

      #   The label join allows to target a metric and retrieve it's label via a 1:1 mapping
      #
      #   label_joins:
      #     target_metric:
      #       label_to_match: matched_label
      #       labels_to_get:
      #         - extra_label_1
      #         - extra_label_2 
      #   The label mapper allows you to rename some labels
      #
      #   labels_mapper:
      #     flavor: origin

      #   Type override allows you to override a type in the prometheus the payload
      #   or type an untyped metrics (they're ignored by default)
      #   type_overrides:
      #     metric_name: gauge

      #   Tags to be added to all metrics
      #
      #   tags:
      #     - foo:bar

      #   To send the histograms bucket
      #
      #   send_histograms_buckets: True

      #   List of label to be excluded
      #
      #   exclude_labels:
      #     - timestamp

      # If your prometheus endpoint is secured, here are the settings to configure it
      #
      # Can either be only the path to the certificate and thus you should specify the private key
      # or it can be the path to a file containing both the certificate & the private key
      # self.ssl_cert: "/path/to/cert"
      #
      # Needed if the certificate does not include the private key
      #
      # /!\ The private key to your local certificate must be unencrypted.
      # self.ssl_private_key: "/path/to/key"
      #
      # The path to the trusted CA used for generating custom certificates
      # self.ssl_ca_cert: "/path/to/cacert"

Make sure to specify the prometheus endpoint, choose a namespace, and identify which metrics to pull from the endpoint.

  1. Check and make sure that all yaml files are valid with following command:

    /etc/init.d/epoch-collectors configcheck
    
  2. Restart the Agent for the edited file using the following command:

    /etc/init.d/epoch-collectors restart
    
  3. Execute the info command to verify that the integration check has passed:

    /etc/init.d/epoch-collectors info
    

The output of the info command should contain a section similar to the following:

    Checks
    ======
      [...]
      prometheus
      ----------
          - instance #0 [OK]
          - Collected 7 metrics, 0 events & 1 service check