Ensure Compatibility of Your Kubernetes Monitoring with Finout
Updated over a week ago

For DevOps teams looking to confirm their Kubernetes monitoring setup works seamlessly with Finout, this concise guide provides the essentials. Learn how to leverage Finout's cronjob support across Prometheus-compatible systems, ensuring your monitoring solution is fully compatible and optimized for use with Finout. This straightforward approach aims to equip DevOps professionals with the knowledge needed to validate their exporter's functionality swiftly.

Before you begin, ensure you have the following prerequisites in place:

  • Prometheus-compatible system: Your metrics collection system must be compatible with Prometheus. This includes systems such as VictoriaMetrics, Thanos, Cortex, and M3, among others. These systems must support PromQL queries for integration.

  • Kubernetes cluster: You need an operational Kubernetes cluster where you can deploy the Finout Cronjob.

  • Connect to Kubernetes Prometheus: Refer to the main documentation for detailed instructions on setting up the Kubernetes Prometheus integration.

  • Environment variables: Ensure you have the necessary environment variables configured for connectivity. These include SCHEME, HOSTNAME, PORT, PROMETHEUS_USERNAME, PROMETHEUS_PASSWORD, and optionally, PROMETHEUS_AUTH_TOKEN, PROMETHEUS_BEARER_AUTH_TOKEN, and PROMETHEUS_X_SCOPE_ORGID.

Integration Steps

  1. Validate metrics export: Ensure that your system exports the correct metrics to Finout. Validate the following queries in your system:

    • Memory Usage (V2 or Standard):

      • For Memory Usage V2:

        - name: memory_usage_v2
        query: sum without (instance) (label_replace(sum(container_memory_working_set_bytes{pod!="", container!="",container!="POD", instance!=""}) by (instance, namespace, pod, container, %%%cluster_label), "node", "$1", "instance", "(.+)"))

      • For Standard Memory Usage:

        - name: memory_usage
        query: sum(node_namespace_pod_container:container_memory_working_set_bytes{pod!="", containeč!="",container!="POD", instance!=""}) by (node, namespace, pod, container, %%%cluster_label)

    • CPU Usage (V2 or Standard):

      • For CPU Usage V2:

        - name: cpu_usage_v2
        query: sum without (instance) (label_replace( sum(rate(container_cpu_usage_seconds_total{pod!="", container!="", container!="POD", instance!=""}[1m])) by (instance, namespace, pod, container, %%%cluster_label), "node", "$1", "instance", "(.+)"))

      • For Standard CPU Usage:

        - name: cpu_usage
        query: sum(rate(container_cpu_usage_seconds_total{pod!="", container!="", container!="POD", instance!=""}[1m])) by (node, namespace, pod, container,%%%cluster_label)

    • Network Usage (V2 or Standard):

      • Bytes Received and Transmitted:

        • For V2:

          - name: bytes_received_v2
          query: sum without (instance) (label_replace(sum(rate(container_network_receive_bytes_total{pod!="", instance!=""}[5m])) by (instance, namespace, pod, container, %%%cluster_label), "node", "$1", "instance", "(.+)"))
          - name: bytes_transmitted_v2
          query: sum without (instance) (label_replace(sum(rate(container_network_transmit_bytes_total{pod!="", instance!=""}[5m])) by (instance, namespace, pod, container, %%%cluster_label), "node", "$1", "instance", "(.+)"))

        • For standard Bytes Received and Transmitted:

          - name: bytes_received
          query: sum(rate(container_network_receive_bytes_total{pod!="", instance!=""}[1m])) by (node, namespace, pod, container, %%%cluster_label)
          - name: bytes_transmitted
          query: sum(rate(container_network_transmit_bytes_total{pod!="", instance!=""}[1m])) by (node, namespace, pod, container, %%%cluster_label)

    • Node Info:

      - name: node_info
      query: max(kube_node_info) by (node, provider_id,%%%cluster_label)

    Note: You may omit the cluster_label grouping when testing these queries.

  2. Deploy the Finout Cronjob: Deploy the Finout Cronjob in your Kubernetes cluster. This is essential for scheduling and running the integration tasks.

  3. Configure connectivity: Utilize the environment variables to configure the connectivity between Finout and your Prometheus-compatible metrics system. This setup allows Finout to execute PromQL queries against your metrics database.

  4. Grant Finout permissions: Ensure Finout has the necessary permissions to read your metrics export from your S3 bucket, as detailed in the documentation.

By following these steps and ensuring your Prometheus-compatible system meets the requirements, you can successfully integrate Kubernetes metrics with Finout for enhanced monitoring and management capabilities.

Did this answer your question?