title: daily average value for the last 30 days in prometheus
body: <p>I'm trying to get the average value during the day for the last 30 days for a metric size using a python script. in the following format:</p>
  <ul>
  <li>day1: Calculated avg value for day1</li>
  <li>day2: Calculated avg value for day 2</li>
  <li>.....</li>
  <li>day30: Calculated avg value for day30</li>
  </ul>
  <p>But when I compare the expected values to the real values, they don't look like each other. this is my query request from the python script to the Prometheus host.</p>
  <pre><code>response = requests.get(PROMETHUESURL + RANGE_QUERY_API, params={'query': avg(size_total{action=&quot;rrrr&quot;,product=&quot;test&quot;}) , 'start': (30DaysAgo), 'end': (NOW), 'step': '1d'})
  </code></pre>
  <p>The start and end parameters are replaced with a timestamp.</p>
  <p>Is my query correct and if not how can I fix it to get the daily average for the last 30 days?</p>