title: Can two different time series be compared in prometheus?
body: <p>I would like compare the following two time series which are different from each other. All I want to do is divide the result of the <strong><em>Second time series</em></strong> by the result of the <strong><em>First time series</em></strong> and generate an alert if the value is less than 1. The query that I am using is below the time series that I have mentioned below. How to achieve my goal?</p>
  
  <p><strong><em>First time series:</em></strong></p>
  
  <p>container_memory_usage_bytes{container_name="documentation"}</p>
  
  <p><strong>RESULT:</strong></p>
  
  <pre><code>container_memory_usage_bytes{
     beta_kubernetes_io_arch="amd64",
     beta_kubernetes_io_fluentd_ds_ready="true",
     beta_kubernetes_io_instance_type="n1-highmem-8",
     beta_kubernetes_io_os="linux",
     cloud_google_com_gke_nodepool="pool-1",
     container_name="documentation",
     failure_domain_beta_kubernetes_io_region="europe-west1",
     failure_domain_beta_kubernetes_io_zone="europe-west1-b",
     id="/kubepods/burstable/podb79239ff-1ee9-11e8-a6c1-42010a840fd9/3ccdaa6597d5bd306d228e37d9d4c65a9681dba2e894aa7b7ed4502ec54e5619",
     image="gcr.io/ingenious-169318/publicapi/documentation@sha256:60a5454bb40ed34f24cbeb9f330e1097191754cf2890eee1ca4f2988188a7705",
     instance="gke-ingenious-pool-1-bbd77706-5rbz",
     job="kubernetes-cadvisor",
     kubernetes_io_hostname="gke-ingenious-pool-1-bbd77706-5rbz",
     name="k8s_documentation_documentation-6c4c4c9f5f-dn2bv_apimanager_b79239ff-1ee9-11e8-a6c1-42010a840fd9_0",
     namespace="apimanager",
     pod_name="documentation-6c4c4c9f5f-dn2bv"
  }
  </code></pre>
  
  <p><strong><em>Second time series:-</em></strong></p>
  
  <p>kube_pod_container_resource_requests_memory_bytes{container="documentation"}</p>
  
  <p><strong>RESULT:</strong> </p>
  
  <pre><code>kube_pod_container_resource_requests_memory_bytes{
     container="documentation",
     instance="10.32.0.30:8080",
     job="kubernetes-service-endpoints",
     k8s_app="kube-state-metrics",
     kubernetes_name="kube-state-metrics",
     kubernetes_namespace="kube-system",
     namespace="apimanager",
     node="gke-ingenious-pool-1-bbd77706-pdsz",
     pod="documentation-6c4c4c9f5f-mzd54"
  }
  </code></pre>
  
  <p><strong><em>PromQL:</em></strong></p>
  
  <p>kube_pod_container_resource_requests_memory_bytes{container="documentation"} / (container_memory_usage_bytes{namespace="apimanager"})</p>