<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>4. Prometheus exporters on Prometheus Basics Training</title><link>/docs/04/</link><description>Recent content in 4. Prometheus exporters on Prometheus Basics Training</description><generator>Hugo</generator><language>en</language><atom:link href="/docs/04/index.xml" rel="self" type="application/rss+xml"/><item><title>4.1 Tasks: Blackbox exporter</title><link>/docs/04/labs/41-baloise/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/04/labs/41-baloise/</guid><description>&lt;h3 id="task-411-add-a-blackbox-target">Task 4.1.1: Add a blackbox target&lt;/h3>
&lt;p>We will use the blackbox exporter to create a new probe which accepts a &lt;code>2xx&lt;/code> return code as a valid http return code. This will return the &lt;code>probe_success&lt;/code> metric from the blackbox exporter with the value &lt;code>1&lt;/code>, if the http status code is &lt;code>2xx&lt;/code>.&lt;/p>
&lt;p>&lt;strong>Task description&lt;/strong>:&lt;/p>
&lt;ul>
&lt;li>Create a probe in the monitoring directory which uses the HTTP prober and expects a &lt;code>2xx&lt;/code> return code as a valid status code&lt;/li>
&lt;li>Define &lt;code>https://bitbucket.balgroupit.com/status&lt;/code> as a single static target, which the blackbox should probe&lt;/li>
&lt;li>Use the following documentation as reference &lt;a href="https://confluence.baloisenet.com/atlassian/display/BALMATE/06&amp;#43;-&amp;#43;HTTP&amp;#43;and&amp;#43;TCP&amp;#43;endpoint&amp;#43;monitoring" target="_blank" rel="noopener">06 - HTTP and TCP endpoint monitoring&lt;/a>
&lt;/li>
&lt;/ul>
&lt;details data-mode="normalexpertmode" class="normalexpertmode">
 &lt;summary>Hints&lt;/summary>
&lt;p>To configure the blackbox exporter you have to add the following file &lt;code>training_blackbox_target.yaml&lt;/code> to your monitoring directory, commit and push the changes:&lt;/p></description></item><item><title>4.1 Tasks: Blackbox exporter</title><link>/docs/04/labs/41/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/04/labs/41/</guid><description>&lt;h3 id="task-411-install-blackbox-exporter">Task 4.1.1: Install Blackbox exporter&lt;/h3>
&lt;p>Similar to the basic setup, we are just going to update our configuration of the ArgoCD application to install the Blackbox exporter. Update your monitoring application (&lt;code>charts/user-monitoring/values.yaml&lt;/code>) and update the &lt;code>blackboxexporter.enabled&lt;/code> flag to &lt;code>true&lt;/code>:&lt;/p>
&lt;p>&lt;code>charts/user-monitoring/values.yaml&lt;/code>:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-yaml" data-lang="yaml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">user&lt;/span>: &lt;span style="color:#ae81ff">&amp;lt;user&amp;gt;&lt;/span> &lt;span style="color:#75715e"># Replace me&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># prometheus&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">prometheus&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f92672">enabled&lt;/span>: &lt;span style="color:#66d9ef">true&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># thanos-query&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">query&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f92672">enabled&lt;/span>: &lt;span style="color:#66d9ef">true&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># grafana&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">grafana&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f92672">enabled&lt;/span>: &lt;span style="color:#66d9ef">true&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f92672">datasources&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> - &lt;span style="color:#f92672">name&lt;/span>: &lt;span style="color:#ae81ff">prometheus&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f92672">access&lt;/span>: &lt;span style="color:#ae81ff">proxy&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f92672">editable&lt;/span>: &lt;span style="color:#66d9ef">false&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f92672">type&lt;/span>: &lt;span style="color:#ae81ff">prometheus&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f92672">url&lt;/span>: &lt;span style="color:#ae81ff">http://prometheus-operated:9090&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># blackboxexporter&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">blackboxexporter&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f92672">enabled&lt;/span>: &lt;span style="color:#66d9ef">true&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># pushgateway&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">pushgateway&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f92672">enabled&lt;/span>: &lt;span style="color:#66d9ef">false&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># alertmanager&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">alertmanager&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f92672">enabled&lt;/span>: &lt;span style="color:#66d9ef">false&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># thanos-ruler&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">ruler&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f92672">enabled&lt;/span>: &lt;span style="color:#66d9ef">false&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Commit and push the changes.&lt;/p></description></item><item><title>4.2 Tasks: Pushgateway</title><link>/docs/04/labs/42/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/04/labs/42/</guid><description>&lt;h3 id="task-421---install-and-configure-pushgateway">Task 4.2.1 - Install and configure Pushgateway&lt;/h3>
&lt;p>Update your monitoring application (&lt;code>charts/user-monitoring/values.yaml&lt;/code>) and update the &lt;code>blackboxexporter.enabled&lt;/code> flag to &lt;code>true&lt;/code>:&lt;/p>
&lt;p>&lt;code>charts/user-monitoring/values.yaml&lt;/code>:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-yaml" data-lang="yaml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">user&lt;/span>: &lt;span style="color:#ae81ff">&amp;lt;user&amp;gt;&lt;/span> &lt;span style="color:#75715e"># Replace me&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># prometheus&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">prometheus&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f92672">enabled&lt;/span>: &lt;span style="color:#66d9ef">true&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># thanos-query&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">query&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f92672">enabled&lt;/span>: &lt;span style="color:#66d9ef">true&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># grafana&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">grafana&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f92672">enabled&lt;/span>: &lt;span style="color:#66d9ef">true&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f92672">datasources&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> - &lt;span style="color:#f92672">name&lt;/span>: &lt;span style="color:#ae81ff">prometheus&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f92672">access&lt;/span>: &lt;span style="color:#ae81ff">proxy&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f92672">editable&lt;/span>: &lt;span style="color:#66d9ef">false&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f92672">type&lt;/span>: &lt;span style="color:#ae81ff">prometheus&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f92672">url&lt;/span>: &lt;span style="color:#ae81ff">http://prometheus-operated:9090&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># blackboxexporter&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">blackboxexporter&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f92672">enabled&lt;/span>: &lt;span style="color:#66d9ef">true&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># pushgateway&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">pushgateway&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f92672">enabled&lt;/span>: &lt;span style="color:#66d9ef">true&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># alertmanager&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">alertmanager&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f92672">enabled&lt;/span>: &lt;span style="color:#66d9ef">false&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># thanos-ruler&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#f92672">ruler&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#f92672">enabled&lt;/span>: &lt;span style="color:#66d9ef">false&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Commit and push the changes and verify whether the deployment worked correctly.&lt;/p></description></item><item><title>4.3 Tasks: Exporter as a sidecar</title><link>/docs/04/labs/43-baloise/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/04/labs/43-baloise/</guid><description>&lt;h3 id="task-431-deploy-a-database-and-use-a-sidecar-container-to-expose-metric">Task 4.3.1: Deploy a database and use a sidecar container to expose metric&lt;/h3>
&lt;p>&lt;strong>Task description&lt;/strong>:&lt;/p>
&lt;p>As we&amp;rsquo;ve learned in &lt;a href="../../../04/">Lab 4 - Prometheus exporters&lt;/a>
 when applications do not expose metrics in the Prometheus format, there are a lot of exporters available to convert metrics into the correct format. In Kubernetes this is often done by deploying so called sidecar containers along with the actual application.&lt;/p>
&lt;p>Use the following command to deploy a MariaDB database your monitoring or application namespace on CAAST.&lt;/p></description></item><item><title>4.3 Tasks: Exporter as a sidecar</title><link>/docs/04/labs/43/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/04/labs/43/</guid><description>&lt;h3 id="task-431-deploy-a-database-and-use-a-sidecar-container-to-expose-metric">Task 4.3.1: Deploy a database and use a sidecar container to expose metric&lt;/h3>
&lt;p>As we&amp;rsquo;ve learned in &lt;a href="../../../04/">Lab 4 - Prometheus exporters&lt;/a>
 when applications do not expose metrics in the Prometheus format, there are a lot of exporters available to convert metrics into the correct format. In Kubernetes this is often done by deploying so called sidecar containers along with the actual application.&lt;/p>
&lt;p>This lab demonstrates that with a &lt;code>mariadb&lt;/code> database. In the first step, we are going to install a plain &lt;code>mariadb&lt;/code> with a &lt;a href="https://kubernetes.io/docs/concepts/configuration/secret/" target="_blank" rel="noopener">Secret&lt;/a>
 (username password to access the database), a &lt;a href="https://kubernetes.io/docs/concepts/services-networking/service/" target="_blank" rel="noopener">Service&lt;/a>
 and the &lt;a href="https://kubernetes.io/docs/concepts/workloads/controllers/deployment/" target="_blank" rel="noopener">Deployment&lt;/a>
.&lt;/p></description></item></channel></rss>