title: How to divide two Prometheus Counters
body: <p>I have two metrics, Counters to be precise, lets say they are called</p>
  
  <ul>
  <li>NumberOfVisitors </li>
  <li>NumberOfLogins</li>
  </ul>
  
  <p>In grafana I would like to plot is the number-of-logins divided by the number of visitors (or the other way around) over time. So I tried</p>
  
  <pre><code>rate(NumberOfLogins) / rate(NumberOfVisitors)
  </code></pre>
  
  <p>but this results in an error </p>
  
  <blockquote>
    <p>Error executing query: invalid parameter 'query': parse error at char
    46: expected type range vector in call to function "rate", got instant
    vector</p>
  </blockquote>
  
  <p>I'm not sure what all that means. Hopefully something like this is possible. Any help would be appreciated</p>