<p>For <strong>k8s v1.8</strong> and <strong>Prometheus v2.2.1</strong></p>

<p><em>I want to know number of metrics per second stored by Prometheus</em></p>

<p>How do I extract that information?</p>

최준환
<p>Prometheus exposes the metric <code>prometheus_tsdb_head_samples_appended_total</code> in the <code>/metrics</code> path of your prometheus instance. This counter represents the <code>Total number of appended samples</code>.</p>

<p>You can then use if for computing the rate of ingestion:</p>

<pre><code>rate(prometheus_tsdb_head_samples_appended_total[1m])
</code></pre>

<p>Which is effectively the number of metrics per second stored by Prometheus as taken from the last minute.</p>

<p>If you want to sample the instantaneous number of metrics per second, you can also use <a href="https://www.robustperception.io/irate-graphs-are-better-graphs" rel="noreferrer">irate()</a> instead.</p>
