<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>2. Metrics on Prometheus Basics Training</title><link>/docs/02/</link><description>Recent content in 2. Metrics on Prometheus Basics Training</description><generator>Hugo</generator><language>en-us</language><atom:link href="/docs/02/index.xml" rel="self" type="application/rss+xml"/><item><title>2.1 Tasks: File-Based Service Discovery</title><link>/docs/02/labs/21-baloise/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/02/labs/21-baloise/</guid><description>&lt;p&gt;In this lab you are going to configure Prometheus to scrape OpenShift-external targets by using file-based service discovery.&lt;/p&gt;
&lt;h3 id="task-211-create-static-targets"&gt;Task 2.1.1: Create static targets&lt;/h3&gt;
&lt;p&gt;We are going to use the file-based service discovery mechanism that has been deployed on OpenShift (documented in &lt;a href="https://confluence.baloisenet.com/atlassian/display/BALMATE/02&amp;#43;-&amp;#43;Add&amp;#43;your&amp;#43;application&amp;#43;as&amp;#43;monitoring&amp;#43;target#id-02Addyourapplicationasmonitoringtarget-AddMonitoringTargetsoutsideofOpenShift" target="_blank" rel="noopener"&gt;Confluence&lt;/a&gt;
). As file input you will create a ConfigMap defining the static targets.&lt;/p&gt;
&lt;p&gt;In the monitoring folder within your repository, create a YAML file &lt;code&gt;training_target.yaml&lt;/code&gt; defining a ConfigMap and add the file to your repository. Use the following example:&lt;/p&gt;</description></item><item><title>2.1 Tasks: Thanos Querier</title><link>/docs/02/labs/21/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/02/labs/21/</guid><description>&lt;p&gt;To have centralized access to the metrics of both the shared infrastructure Prometheus instance as well as your own userwokload Prometheus instance, we will install the Thanos Querier in this lab. This will give us a central point of view for the following prometheus instances:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Infrastructure Prometheus (K8S Metrics, Node Metrics, &amp;hellip;) in the global &lt;code&gt;monitoring&lt;/code&gt; namespace&lt;/li&gt;
&lt;li&gt;Userworkload Prometheus (the stack we can use for our application metrics) in the &lt;code&gt;&amp;lt;user&amp;gt;-monitoring&lt;/code&gt; namespace&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="task-211-install-thanos-querier"&gt;Task 2.1.1: Install Thanos Querier&lt;/h3&gt;
&lt;p&gt;To install the Thanos Querier, change &lt;code&gt;query.enabled&lt;/code&gt; to &lt;code&gt;true&lt;/code&gt; in the &lt;code&gt;values.yaml&lt;/code&gt; of your user-monitoring Helm release. ArgoCD will automagically install all needed components in your namespace.&lt;/p&gt;</description></item><item><title>2.2 Tasks: Explore metrics</title><link>/docs/02/labs/22/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/02/labs/22/</guid><description>&lt;p&gt;In this lab you are going to explore various metrics, which your Prometheus server is collecting.&lt;/p&gt;
&lt;h3 id="task-221-prometheusthanos-web-ui"&gt;Task 2.2.1: Prometheus/Thanos web UI&lt;/h3&gt;
&lt;p&gt;As we have multiple Prometheus instances, we will use the Thanos Querier to query metrics on our Prometheus instances running on different clusters. To get an overview of the how Thanos fits into the picture, check out the diagram in &lt;a href="https://confluence.baloisenet.com/display/BALMATE/Application&amp;#43;Monitoring" target="_blank" rel="noopener"&gt;Confluence&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;Get a feel for how to use the Thanos Querier web UI. Open the &lt;a href="http://LOCALHOST_QUERIER" target="_blank" rel="noopener"&gt;web UI&lt;/a&gt;
 and navigate to the &lt;strong&gt;Graph&lt;/strong&gt; menu (right on top in the grey navigation bar next to Stores).&lt;/p&gt;</description></item><item><title>2.3 Tasks: PromQL</title><link>/docs/02/labs/23/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/docs/02/labs/23/</guid><description>&lt;p&gt;In this lab you are going to learn a bit more about &lt;a href="https://prometheus.io/docs/prometheus/latest/querying/basics/" target="_blank" rel="noopener"&gt;PromQL (Prometheus Query Language)&lt;/a&gt;
.&lt;/p&gt;
&lt;p&gt;PromQL is the query language that allows you to select, aggregate and filter the time series data collected by prometheus in real time.&lt;/p&gt;


&lt;div class="alert alert-info" role="alert"&gt;
&lt;h4 class="alert-heading"&gt;Note&lt;/h4&gt;

&lt;p&gt;Execute the queries in the &lt;a href="http://LOCALHOST_QUERIER" target="_blank" rel="noopener"&gt;Thanos Querier UI&lt;/a&gt;
.&lt;/p&gt;
&lt;p&gt;PromQL can seem overwhelming. It may take a little time to get used to it. There may be different approaches to solve the tasks. Our solution is just one possibility.&lt;/p&gt;</description></item></channel></rss>