<p>I am using prometheus operator to monitor my Kubernetes  cluster. I want to change the scrape_interval for some targets dynamically (increase and decrease it when needed at runtime).</p>

<p>Any suggestions to do that?</p>

<p>Thanks</p>

khaoulaZ
<p>you can change that on the fly-<br>
find servicemonitor ( on prometheus UI it is target ) as-<br>
<code>kubectl get servicemonitor -n &lt;NAMESPACE&gt;</code>.  </p>

<blockquote>
  <p><code>k get servicemonitor -n &lt;NAMESPACE&gt; &lt;SERVICEMONITOR_NAME&gt; -o yaml | sed 's/interval: [0-9][0-9]s/interval: 50s/' | kubectl replace -f -</code>   </p>
</blockquote>

<p>To reload automatically, prometheus operator has config-reloader, you can install that as a container alongside your prometheus.  </p>
