<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Kiali – Metrics</title>
    <link>https://staging.kiali.io/docs/configuration/external-services/metrics/</link>
    <description>Recent content in Metrics on Kiali</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    
	  <atom:link href="https://staging.kiali.io/docs/configuration/external-services/metrics/index.xml" rel="self" type="application/rss+xml" />
    
    
      
        
      
    
    
    <item>
      <title>Docs: Prometheus</title>
      <link>https://staging.kiali.io/docs/configuration/external-services/metrics/prometheus/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://staging.kiali.io/docs/configuration/external-services/metrics/prometheus/</guid>
      <description>
        
        
        &lt;h2 id=&#34;prometheus-configuration&#34;&gt;Prometheus configuration&lt;/h2&gt;
&lt;p&gt;Kiali uses Prometheus to generate the
&lt;a href=&#34;https://staging.kiali.io/docs/features/topology/&#34;&gt;topology graph&lt;/a&gt;,
&lt;a href=&#34;https://staging.kiali.io/docs/features/details/#metrics&#34;&gt;show metrics&lt;/a&gt;,
&lt;a href=&#34;https://staging.kiali.io/docs/features/health/&#34;&gt;calculate health&lt;/a&gt; and
for several other features. Prometheus is enabled by default and is required
for full Kiali functionality.&lt;/p&gt;
&lt;h3 id=&#34;disabling-prometheus&#34;&gt;Disabling Prometheus&lt;/h3&gt;
&lt;p&gt;If you want to run Kiali without a Prometheus instance, you can disable it:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;spec&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;external_services&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;prometheus&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;enabled&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;false&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;When Prometheus is disabled, Kiali will still start and serve non-metrics features
such as workload/service/app listing, Istio configuration, and mesh topology.
However, the graph, metrics tabs, traffic tabs, and request-rate health will be
unavailable. Health badges for workloads and apps will degrade to show only
Kubernetes-level status (replica counts).&lt;/p&gt;
&lt;p&gt;The UI will display a subtle informational message reminding you that metrics
features are unavailable due to your configuration choice.&lt;/p&gt;
&lt;h3 id=&#34;when-prometheus-is-unreachable&#34;&gt;When Prometheus is Unreachable&lt;/h3&gt;
&lt;p&gt;When Prometheus is enabled (the default) but Kiali cannot reach it at startup,
Kiali will still start successfully with metrics features temporarily unavailable.&lt;/p&gt;
&lt;p&gt;The UI will display a warning notification explaining why metrics are
unavailable. The Prometheus component will still appear in the masthead status
and the mesh topology page, reported as unhealthy, so you have clear visibility
into the misconfiguration.&lt;/p&gt;
&lt;p&gt;To restore full metrics functionality after a startup failure, fix the Prometheus
connectivity issue (correct the URL, ensure the Prometheus server is running, etc.) and
restart Kiali.&lt;/p&gt;
&lt;h3 id=&#34;configuring-the-prometheus-url&#34;&gt;Configuring the Prometheus URL&lt;/h3&gt;
&lt;p&gt;By default, Kiali assumes that Prometheus is available at the URL of the form
&lt;code&gt;http://prometheus.&amp;lt;istio_namespace_name&amp;gt;:9090&lt;/code&gt;, which is the usual case if you
are using &lt;a href=&#34;https://istio.io/latest/docs/ops/integrations/prometheus/#option-1-quick-start&#34;&gt;the Prometheus Istio
add-on&lt;/a&gt;.
If your Prometheus instance has a different service name or is installed in a
different namespace, you must manually provide the endpoint where it is
available, like in the following example:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;spec&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;external_services&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;prometheus&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;# Prometheus service name is &amp;#34;metrics&amp;#34; and is in the &amp;#34;telemetry&amp;#34; namespace&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;url&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;http://metrics.telemetry:9090/&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;div class=&#34;alert alert-success&#34; role=&#34;alert&#34;&gt;


    Notice that you don&amp;rsquo;t need to expose Prometheus outside the cluster. It is
enough to provide the Kubernetes internal service URL.

&lt;/div&gt;

&lt;p&gt;Kiali maintains an internal cache of some Prometheus queries to improve
performance (mainly, the queries to calculate Health indicators). It
would be very rare to see data delays, but should you notice any delays you may
tune caching parameters to values that work better for your environment.&lt;/p&gt;
&lt;p&gt;See the &lt;a href=&#34;https://staging.kiali.io/docs/configuration/kialis.kiali.io/#example-cr&#34;&gt;Kiali CR reference page&lt;/a&gt; for the current default values.&lt;/p&gt;
&lt;h3 id=&#34;compatibility-with-prometheus-like-servers&#34;&gt;Compatibility with Prometheus-like servers&lt;/h3&gt;
&lt;p&gt;Although Kiali assumes a Prometheus server and is tested against it, there are
&lt;abbr title=&#34;Time series databases&#34;&gt;TSDBs&lt;/abbr&gt; that can be used as a Prometheus
replacement despite not implementing the full Prometheus API.&lt;/p&gt;
&lt;p&gt;Community users have faced two issues when using Prometheus-like TSDBs:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Kiali may report that the TSDB is unreachable, and/or&lt;/li&gt;
&lt;li&gt;Kiali may show empty metrics if the TSBD does not implement the &lt;code&gt;/api/v1/status/config&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To fix these issues, you may need to provide a custom health check endpoint for
the TSDB and/or manually provide the configurations that Kiali reads from the
&lt;code&gt;/api/v1/status/config&lt;/code&gt; API endpoint:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;spec&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;external_services&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;prometheus&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;# Fix the &amp;#34;Unreachable&amp;#34; metrics server warning.&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;health_check_url&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;http://custom-tsdb-health-check-url&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;# Fix for the empty metrics dashboards&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;thanos_proxy&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;        &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;enabled&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;true&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;        &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;retention_period&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;7d&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;        &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;scrape_interval&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;30s&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;prometheus-tuning&#34;&gt;Prometheus tuning&lt;/h3&gt;
&lt;p&gt;For production optimization — recording rules, federation, metric thinning, scrape intervals, and retention — see &lt;a href=&#34;https://staging.kiali.io/docs/configuration/external-services/metrics/tuning/&#34;&gt;Tuning&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id=&#34;prometheus-authentication-configuration&#34;&gt;Prometheus authentication configuration&lt;/h3&gt;
&lt;p&gt;The Kiali CR provides authentication configuration that will be used also for querying the version check to provide information in the Mesh graph.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;spec&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;external_services&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;prometheus&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;auth&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;        &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;insecure_skip_verify&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;false&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;        &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;password&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;pwd&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;        &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;token&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;        &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;type&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;basic&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;        &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;use_kiali_token&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;false&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;        &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;username&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;user&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;health_check_url&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;To configure a secret to be used as a password, see this &lt;a href=&#34;https://staging.kiali.io/docs/faq/installation/#how-can-i-use-a-secret-to-pass-external-service-credentials-to-the-kiali-server&#34;&gt;FAQ entry&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;To authenticate using OAuth2 &lt;code&gt;client_credentials&lt;/code&gt; flow (for example, Azure Monitor Managed Prometheus or any OAuth2-protected endpoint), set &lt;code&gt;type: &amp;quot;oauth2&amp;quot;&lt;/code&gt; and provide the &lt;code&gt;oauth2&lt;/code&gt; block:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;spec&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;external_services&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;prometheus&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;auth&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;        &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;type&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;oauth2&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;        &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;oauth2&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;          &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;client_id&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;my-client-id&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;          &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;client_secret&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;secret:my-oauth2-secret:client_secret&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;          &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;token_url&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;https://login.microsoftonline.com/&amp;lt;tenant&amp;gt;/oauth2/v2.0/token&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;          &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;scopes&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;          &lt;/span&gt;- &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;https://prometheus.monitor.azure.com/.default&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;          &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;audience&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;          &lt;/span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;# optional: some providers require this&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;          &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;auth_style&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;header&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;# &amp;#34;header&amp;#34; (default) or &amp;#34;params&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The &lt;code&gt;client_secret&lt;/code&gt; field supports the &lt;code&gt;secret:&amp;lt;secretName&amp;gt;:&amp;lt;secretKey&amp;gt;&lt;/code&gt; pattern for automatic secret mounting and rotation without pod restart. See the &lt;a href=&#34;https://staging.kiali.io/docs/faq/installation/#how-can-i-use-a-secret-to-pass-external-service-credentials-to-the-kiali-server&#34;&gt;FAQ entry&lt;/a&gt; for details.&lt;/p&gt;


&lt;div class=&#34;alert alert-warning&#34; role=&#34;alert&#34;&gt;


    &lt;code&gt;insecure_skip_verify&lt;/code&gt; applies only to the Prometheus connection, not to the OAuth2 token endpoint. The token endpoint always validates TLS certificates. To trust a private CA for the token endpoint, add the CA to the &lt;code&gt;kiali-cabundle&lt;/code&gt; ConfigMap as described in the &lt;a href=&#34;https://staging.kiali.io/docs/configuration/external-services/tls-configuration/&#34;&gt;TLS Configuration&lt;/a&gt; page.

&lt;/div&gt;

&lt;h3 id=&#34;tls-certificate-configuration&#34;&gt;TLS Certificate Configuration&lt;/h3&gt;
&lt;p&gt;If your Prometheus server uses HTTPS with a certificate issued by a private CA, see the &lt;a href=&#34;https://staging.kiali.io/docs/configuration/external-services/tls-configuration/&#34;&gt;TLS Configuration&lt;/a&gt; page to learn how to configure Kiali to trust your CA.&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Docs: Tuning</title>
      <link>https://staging.kiali.io/docs/configuration/external-services/metrics/tuning/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://staging.kiali.io/docs/configuration/external-services/metrics/tuning/</guid>
      <description>
        
        
        &lt;p&gt;Production environments should not be using the Istio Prometheus add-on, or carrying over its configuration settings.  That is useful only for small, or demo installations.  Instead, Prometheus should have been installed in a production-oriented way, following the &lt;a href=&#34;https://prometheus.io/docs/prometheus/latest/installation&#34;&gt;Prometheus documentation&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;This page is primarily for users where Prometheus is being used specifically for Kiali, and possible optimizations that can be made knowing that Kiali does not utilize all of the default Istio and Envoy telemetry.&lt;/p&gt;
&lt;p&gt;Istio and Envoy generate a large amount of telemetry for analysis and troubleshooting.  This can result in significant resources being required to ingest and store the telemetry, and to support queries into the data.  If you use the telemetry specifically to support Kiali, it is possible to drop unnecessary metrics and unnecessary labels on required metrics.  This &lt;a href=&#34;https://staging.kiali.io/docs/faq/general/#requiredmetrics&#34;&gt;FAQ Entry&lt;/a&gt; displays the metrics and attributes required for Kiali to operate.&lt;/p&gt;
&lt;h2 id=&#34;option-1-recording-rules-and-federation-recommended&#34;&gt;Option 1: Recording Rules and Federation (Recommended)&lt;/h2&gt;
&lt;p&gt;For production meshes at scale, &lt;a href=&#34;#option-2-metric-thinning&#34;&gt;metric thinning&lt;/a&gt; on a single Prometheus TSDB reduces storage somewhat but still retains per-proxy Istio series. A more efficient approach—aligned with &lt;a href=&#34;https://istio.io/latest/docs/ops/best-practices/observability/#federation-using-workload-level-aggregated-metrics&#34;&gt;Istio Observability Best Practices&lt;/a&gt;—is to:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Aggregate using a short-lived &amp;ldquo;edge&amp;rdquo; Prometheus. Scrape your raw metrics and then use recording rules that &amp;ldquo;sum away&amp;rdquo; per-proxy labels (&lt;code&gt;pod&lt;/code&gt;, &lt;code&gt;instance&lt;/code&gt;, etc.) into &lt;code&gt;workload:*&lt;/code&gt; series.
&lt;ul&gt;
&lt;li&gt;&amp;ldquo;Sum away&amp;rdquo; means that several time-series will be aggregated into one, by combining those with like values for specified fields. The resulting value is the sum of the individual time-series values.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Federate using a long-lived Federated Prometheus. Use Prometheus federation to pull the edge aggregates (plus required non-aggregated metrics) into Federated Prometheus.
&lt;ul&gt;
&lt;li&gt;Federating will relabel the &lt;code&gt;workload:*&lt;/code&gt; aggregates back to standard metric names (e.g. &lt;code&gt;workload:istio_requests_total&lt;/code&gt; back to &lt;code&gt;istio_requests_total&lt;/code&gt;) on Federated Prometheus so Kiali queries standard metric names.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Kiali already aggregates traffic at workload/service granularity in its PromQL; it does not use per-pod Istio labels. Pre-aggregated counters and histograms are therefore compatible with the traffic graph, health monitoring, and metrics tabs.&lt;/p&gt;
&lt;h3 id=&#34;architecture&#34;&gt;Architecture&lt;/h3&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;  Edge Prometheus                         Federated Prometheus
  (scrapes Istio/Envoy)                   (long retention; Kiali queries here)
        │                                           ▲
        │  recording rules                          │  /federate
        │  istio_*  →  workload:*                   │  + relabel workload: → istio_
        │  short retention                          │
        └───────────────────────────────────────────┘
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Edge Prometheus is whichever instance scrapes Istio mesh telemetry (often &lt;em&gt;not&lt;/em&gt; the same as your platform monitoring stack). It evaluates recording rules and keeps a short retention (for example 6 hours) on raw and aggregated series.&lt;/p&gt;
&lt;p&gt;Federated Prometheus is the long-retention TSDB Kiali should query. It federates selected series from the edge, relabels &lt;code&gt;workload:*&lt;/code&gt; back to &lt;code&gt;istio_*&lt;/code&gt;, and holds long retention. Both instances are production components; only Federated Prometheus is Kiali&amp;rsquo;s query target.&lt;/p&gt;
&lt;p&gt;Configure Kiali accordingly:&lt;/p&gt;


&lt;div class=&#34;alert alert-info&#34; role=&#34;alert&#34;&gt;


    The two Prometheus instances are often in different namespaces or clusters in real deployments. The Kiali repository includes a demo lab harness that co-locates both in &lt;code&gt;istio-system&lt;/code&gt; for learning and CI—it is not a production installer.

&lt;/div&gt;

&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;spec&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;external_services&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;prometheus&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;# Federated Prometheus URL — not the edge Istio scraper&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;url&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#34;http://prometheus-federated.monitoring:9090/&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;If you use Istio &lt;a href=&#34;https://staging.kiali.io/docs/configuration/external-services/dashboards/perses/&#34;&gt;Perses (or Grafana) dashboards&lt;/a&gt; with Kiali, configure them to point at the same Federated Prometheus URL.&lt;/p&gt;


&lt;div class=&#34;alert alert-warning&#34; role=&#34;alert&#34;&gt;


    &lt;p&gt;Query target: In this pattern, &lt;code&gt;external_services.prometheus.url&lt;/code&gt; always targets Federated Prometheus—the long-retention TSDB that holds federated mesh metrics. Edge Prometheus exists only to collect raw telemetry, evaluate recording rules, and federate upstream; it is not Kiali&amp;rsquo;s database.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;kiali_*&lt;/code&gt; self-monitoring metrics must also end up in that Federated Prometheus TSDB, but may reach it via edge aggregation and federation or via direct scrape—see &lt;a href=&#34;#kiali-self-monitoring-metrics&#34;&gt;Kiali self-monitoring metrics&lt;/a&gt;.&lt;/p&gt;


&lt;/div&gt;

&lt;h3 id=&#34;metric-tiers&#34;&gt;Metric tiers&lt;/h3&gt;
&lt;p&gt;Federation configuration is split into tiers (metric groupings) so that Federated Prometheus pulls only needed metrics:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Tier&lt;/th&gt;
&lt;th&gt;Purpose&lt;/th&gt;
&lt;th&gt;Required for&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Core&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href=&#34;https://staging.kiali.io/docs/faq/general/#requiredmetrics&#34;&gt;Kiali required metrics&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Traffic graph, health, lists, mesh overview&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Istio Dashboards&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Optional control-plane, perf, ztunnel, and WASM metrics&lt;/td&gt;
&lt;td&gt;&lt;a href=&#34;https://github.com/perses/community-mixins/tree/main/examples/dashboards/perses/istio&#34;&gt;Perses Istio dashboards&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Kiali self-monitoring&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Kiali operational metrics (&lt;code&gt;kiali_*&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;Kiali Internal Metrics dashboard, optional health-status alerting&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Some Perses dashboards work with the Core tier alone (Mesh, service, and workload dashboards). To ensure all of the Istio dashboards are supported, enable the Istio Dashboards tier. Enable Kiali self-monitoring when the built-in Kiali metrics dashboard or &lt;code&gt;kiali_health_status&lt;/code&gt; alerting is needed. Note that if you define your own Kiali Custom Dashboards, you will need to ensure any required metrics are also configured for the federated Prometheus.&lt;/p&gt;
&lt;h3 id=&#34;production-reference-files&#34;&gt;Production reference files&lt;/h3&gt;
&lt;p&gt;For production deployments, merge the YAML below from &lt;a href=&#34;https://github.com/kiali/kiali/tree/master/hack/prometheus/federation&#34;&gt;&lt;code&gt;hack/prometheus/federation/&lt;/code&gt;&lt;/a&gt; into your existing Prometheus configuration. These files are reference snippets—not a Kiali installer and not full deployments. Integrate them the same way you manage other Prometheus rules and scrape jobs (&lt;code&gt;rule_files&lt;/code&gt;, ConfigMap volume mounts, &lt;code&gt;PrometheusRule&lt;/code&gt; CRs, Helm values, etc.).&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;File&lt;/th&gt;
&lt;th&gt;Integrate into&lt;/th&gt;
&lt;th&gt;Purpose&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;core-recording-rules.yml&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Edge Prometheus (scrapes Istio/Envoy)&lt;/td&gt;
&lt;td&gt;Recording rules producing &lt;code&gt;workload:*&lt;/code&gt; series&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;core-federation-match.yml&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Federated Prometheus federation job&lt;/td&gt;
&lt;td&gt;Core-tier &lt;code&gt;match[]&lt;/code&gt; selectors&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;core-metrics.yml&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;(reference)&lt;/td&gt;
&lt;td&gt;Canonical core Istio metric list&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;istio-dashboard-federation-match.yml&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Production federation job (optional)&lt;/td&gt;
&lt;td&gt;Perses dashboard &lt;code&gt;match[]&lt;/code&gt; selectors&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;istio-dashboard-metrics.yml&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;(reference)&lt;/td&gt;
&lt;td&gt;Optional Istio dashboard metric list&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;kiali-metrics-recording-rules.yml&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Kiali edge Prometheus (optional)&lt;/td&gt;
&lt;td&gt;Recording rules for &lt;code&gt;kiali:*&lt;/code&gt; series&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;kiali-metrics-federation-match.yml&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Production federation job (optional)&lt;/td&gt;
&lt;td&gt;Federation selectors for &lt;code&gt;kiali:*&lt;/code&gt; series&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;kiali-metrics.yml&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;(reference)&lt;/td&gt;
&lt;td&gt;Canonical Kiali self-monitoring metric list&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;The &lt;a href=&#34;#recording-rules-edge-prometheus&#34;&gt;recording rules&lt;/a&gt;, &lt;a href=&#34;#federation-federated-prometheus&#34;&gt;federation&lt;/a&gt;, and &lt;a href=&#34;#integration-checklist&#34;&gt;production checklist&lt;/a&gt; sections below describe how to apply these files. Optional tiers (Istio dashboards, Kiali self-monitoring) are added only when those features are enabled.&lt;/p&gt;
&lt;h3 id=&#34;demo-lab-files-not-for-production&#34;&gt;Demo lab files (not for production)&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;demo/&lt;/code&gt; subdirectory under the same path contains scripts and sample Kubernetes deployments for learning and CI. They patch the Istio add-on Prometheus in &lt;code&gt;istio-system&lt;/code&gt; and deploy sample &lt;code&gt;prometheus-federated&lt;/code&gt; / &lt;code&gt;prometheus-kiali-edge&lt;/code&gt; instances. &lt;strong&gt;Do not use &lt;code&gt;demo/&lt;/code&gt; in production clusters&lt;/strong&gt;—use the reference files above with your own Prometheus instead.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;File&lt;/th&gt;
&lt;th&gt;Purpose&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;demo/install.sh&lt;/code&gt; / &lt;code&gt;demo/uninstall.sh&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Demo lab deploy and teardown&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;demo/prometheus-federated.yaml&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Sample Federated Prometheus deployment&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;demo/prometheus-kiali-edge.yaml&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Sample dedicated Kiali edge Prometheus&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;demo/render-*.py&lt;/code&gt;, &lt;code&gt;demo/merge-recording-rules.py&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Render demo manifests from the production reference YAML&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;See &lt;a href=&#34;#demo-walkthrough-lab-only&#34;&gt;Demo walkthrough&lt;/a&gt; below to try the pattern locally.&lt;/p&gt;
&lt;h3 id=&#34;recording-rules-edge-prometheus&#34;&gt;Recording rules (edge Prometheus)&lt;/h3&gt;
&lt;p&gt;Apply &lt;code&gt;core-recording-rules.yml&lt;/code&gt; on the Prometheus instance that scrapes Istio traffic (or merge the groups into your existing rule set). The rules drop scrape/infrastructure labels (&lt;code&gt;pod&lt;/code&gt;, &lt;code&gt;pod_template_hash&lt;/code&gt;, &lt;code&gt;instance&lt;/code&gt;, &lt;code&gt;job&lt;/code&gt;, &lt;code&gt;node&lt;/code&gt;) while preserving Istio semantic labels and the Prometheus scrape &lt;code&gt;namespace&lt;/code&gt; label. The same &lt;code&gt;without (...)&lt;/code&gt; shape is used in &lt;code&gt;kiali-metrics-recording-rules.yml&lt;/code&gt; for consistency.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;groups&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;&lt;/span&gt;- &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;name&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;istio.workload-aggregation&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;interval&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;30s&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;rules&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;  &lt;/span&gt;- &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;record&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;workload:istio_requests_total&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;expr&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;sum without (pod, pod_template_hash, instance, job, node) (istio_requests_total)&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;  &lt;/span&gt;- &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;record&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;workload:istio_request_duration_milliseconds_bucket&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;expr&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;sum without (pod, pod_template_hash, instance, job, node) (istio_request_duration_milliseconds_bucket)&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;# ... remaining traffic counters and histogram components — see core-recording-rules.yml&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;div class=&#34;alert alert-warning&#34; role=&#34;alert&#34;&gt;


    The recording rules do not apply &lt;code&gt;rate()&lt;/code&gt;. Kiali applies &lt;code&gt;rate()&lt;/code&gt; at query time with user-selected durations. Use &lt;code&gt;sum without (...)&lt;/code&gt; rather than &lt;code&gt;sum by (...)&lt;/code&gt; so required labels are not dropped accidentally.

&lt;/div&gt;

&lt;p&gt;How you install the rules depends on your platform—for example a &lt;code&gt;rule_files&lt;/code&gt; entry in &lt;code&gt;prometheus.yml&lt;/code&gt;, a ConfigMap volume mount, or a Prometheus Operator &lt;code&gt;PrometheusRule&lt;/code&gt; CR in the namespace where edge Prometheus runs.&lt;/p&gt;
&lt;p&gt;On OpenShift User Workload Monitoring, a cross-namespace aggregation rule needs a
dedicated namespace that is exempt from UWM label enforcement. For the ACM/MCOA
pattern used by the multicluster tutorials, use &lt;code&gt;mesh-observability&lt;/code&gt; and add it
to &lt;code&gt;namespacesWithoutLabelEnforcement&lt;/code&gt; in &lt;code&gt;user-workload-monitoring-config&lt;/code&gt; on
each managed cluster. This is what allows one propagated rule to aggregate
metrics scraped in the Istio and application namespaces; it does not remove the
need for &lt;code&gt;ServiceMonitor&lt;/code&gt; or &lt;code&gt;PodMonitor&lt;/code&gt; resources in those namespaces.&lt;/p&gt;
&lt;h3 id=&#34;federation-federated-prometheus&#34;&gt;Federation (federated Prometheus)&lt;/h3&gt;
&lt;p&gt;Add a federation scrape job to your existing long-retention federated Prometheus. Use &lt;code&gt;core-federation-match.yml&lt;/code&gt; for the complete core-tier &lt;code&gt;match[]&lt;/code&gt; list. Federate &lt;code&gt;workload:*&lt;/code&gt; traffic metrics from the edge and relabel names before storage:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;- &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;job_name&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;istio-mesh-federate&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;honor_labels&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;true&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;metrics_path&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;/federate&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;scrape_interval&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;30s&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;params&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;match[]&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;      &lt;/span&gt;- &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#39;{__name__=~&amp;#34;workload:istio_requests_total&amp;#34;}&amp;#39;&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;      &lt;/span&gt;- &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#39;{__name__=~&amp;#34;workload:istio_request_bytes_(bucket|count|sum)&amp;#34;}&amp;#39;&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;      &lt;/span&gt;- &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#39;{__name__=~&amp;#34;workload:istio_request_duration_milliseconds_(bucket|count|sum)&amp;#34;}&amp;#39;&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;# ... see core-federation-match.yml for the full core-tier list&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;metric_relabel_configs&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;  &lt;/span&gt;- &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;source_labels&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;[&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;__name__]&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;regex&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#39;workload:(.*)&amp;#39;&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;target_label&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;__name__&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;action&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;replace&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;static_configs&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;  &lt;/span&gt;- &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;targets&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;    &lt;/span&gt;- &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#39;&amp;lt;edge-prometheus-host&amp;gt;:9090&amp;#39;&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Set &lt;code&gt;honor_labels: true&lt;/code&gt; on every federation scrape job. Without it, Prometheus renames conflicting labels from the federated edge with an &lt;code&gt;exported_&lt;/code&gt; prefix (for example &lt;code&gt;destination_workload&lt;/code&gt; becomes &lt;code&gt;exported_destination_workload&lt;/code&gt;). Kiali queries assume standard Istio label names (&lt;code&gt;source_*&lt;/code&gt;, &lt;code&gt;destination_*&lt;/code&gt;, &lt;code&gt;reporter&lt;/code&gt;, and so on); omitting &lt;code&gt;honor_labels&lt;/code&gt; can break the traffic graph, health, and metrics tabs even when &lt;code&gt;match[]&lt;/code&gt; and relabel rules are correct.&lt;/p&gt;
&lt;p&gt;Also federate non-traffic metrics that Kiali needs but does not aggregate (for example &lt;code&gt;istio_build&lt;/code&gt;, &lt;code&gt;pilot_xds&lt;/code&gt;, &lt;code&gt;container_cpu_usage_seconds_total&lt;/code&gt;) directly by name—see &lt;code&gt;core-metrics.yml&lt;/code&gt; and &lt;code&gt;core-federation-match.yml&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;To include Istio dashboard metrics, append the selectors from &lt;code&gt;istio-dashboard-federation-match.yml&lt;/code&gt; to &lt;code&gt;match[]&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Configure network access, TLS, and authentication between Federated and Edge Prometheus according to your environment. Kiali authentication for the Federated Prometheus URL is configured separately (see &lt;a href=&#34;https://staging.kiali.io/docs/configuration/external-services/metrics/prometheus/#prometheus-authentication-configuration&#34;&gt;Prometheus authentication configuration&lt;/a&gt;).&lt;/p&gt;
&lt;h3 id=&#34;demo-walkthrough-lab-only&#34;&gt;Demo walkthrough (lab only)&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;demo/install.sh&lt;/code&gt; script is a learning and CI harness only. It does not replace the production integration above—it automates the same reference YAML against the Istio add-on Prometheus in &lt;code&gt;istio-system&lt;/code&gt; so you can validate the pattern locally:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;# From a clone of github.com/kiali/kiali, with Istio add-on Prometheus running:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;./hack/prometheus/federation/demo/install.sh
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;# Optional: also federate Perses dashboard metrics&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;./hack/prometheus/federation/demo/install.sh --with-dashboards
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;# Optional: federate Kiali self-monitoring (shared Istio edge Prometheus)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;./hack/prometheus/federation/demo/install.sh --with-kiali-metrics
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;# Optional: federate Kiali self-monitoring (dedicated Kiali edge Prometheus)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;./hack/prometheus/federation/demo/install.sh --with-kiali-metrics --kiali-edge dedicated
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;# Optional: point Kiali at the demo federated Prometheus&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;./hack/prometheus/federation/demo/install.sh --switch-kiali
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;# Combine flags as needed, for example:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;./hack/prometheus/federation/demo/install.sh --with-dashboards --with-kiali-metrics --switch-kiali
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;After install, port-forward and verify:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;# Istio edge Prometheus (recording rules)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;kubectl port-forward -n istio-system svc/prometheus 9091:9090
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;# Demo federated Prometheus (federated data; point Kiali here)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;kubectl port-forward -n istio-system svc/prometheus-federated 9092:9090
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;# Dedicated Kiali edge (only with --kiali-edge dedicated)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;kubectl port-forward -n istio-system svc/prometheus-kiali-edge 9093:9090
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;# Edge: workload:* aggregates&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;curl -s &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#39;http://localhost:9091/api/v1/query?query=count(workload:istio_requests_total)&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;# Production: istio_* and kiali_* (no workload: or kiali: prefix)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;curl -s &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#39;http://localhost:9092/api/v1/query?query=count(istio_requests_total)&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;curl -s &lt;span style=&#34;color:#4e9a06&#34;&gt;&amp;#39;http://localhost:9092/api/v1/query?query=count({__name__=~&amp;#34;kiali_.*&amp;#34;})&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The Kiali Internal Metrics dashboard only works when Kiali queries federated Prometheus (&lt;code&gt;--switch-kiali&lt;/code&gt; or &lt;code&gt;external_services.prometheus.url&lt;/code&gt; → &lt;code&gt;prometheus-federated&lt;/code&gt;).&lt;/p&gt;
&lt;p&gt;Run &lt;code&gt;demo/uninstall.sh&lt;/code&gt; for teardown.&lt;/p&gt;
&lt;h3 id=&#34;integration-checklist&#34;&gt;Integration checklist&lt;/h3&gt;
&lt;p&gt;Use this checklist when integrating the &lt;a href=&#34;#production-reference-files&#34;&gt;production reference files&lt;/a&gt; into your own Prometheus stack (not the &lt;code&gt;demo/&lt;/code&gt; installer):&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Identify edge Prometheus—the TSDB that scrapes Istio/Envoy (may be in a &lt;code&gt;monitoring&lt;/code&gt; namespace, a remote cluster, or a managed service—not necessarily &lt;code&gt;istio-system&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Merge &lt;code&gt;core-recording-rules.yml&lt;/code&gt; onto the edge; set short retention on raw mesh telemetry.&lt;/li&gt;
&lt;li&gt;Add a federation scrape job to federated Prometheus using &lt;code&gt;core-federation-match.yml&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Optionally extend &lt;code&gt;match[]&lt;/code&gt; with Istio dashboard-tier selectors if Istio dashboards are enabled.&lt;/li&gt;
&lt;li&gt;If Kiali self-monitoring is enabled, choose an option from &lt;a href=&#34;#kiali-self-monitoring-metrics&#34;&gt;Kiali self-monitoring metrics&lt;/a&gt;: apply &lt;code&gt;kiali-metrics-recording-rules.yml&lt;/code&gt; on the Kiali edge and federate &lt;code&gt;kiali-metrics-federation-match.yml&lt;/code&gt; to Federated Prometheus (Options 1–2), or scrape Kiali directly into Federated Prometheus (Option 3).&lt;/li&gt;
&lt;li&gt;Point &lt;code&gt;external_services.prometheus.url&lt;/code&gt; at federated Prometheus (and the same URL for Perses/Grafana, if using).&lt;/li&gt;
&lt;li&gt;Validate equivalence between edge aggregates and federated data (see below).&lt;/li&gt;
&lt;li&gt;Tune intervals using &lt;a href=&#34;#interval-tuning&#34;&gt;Interval tuning&lt;/a&gt; below.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;For multi-cluster deployments, apply the same edge → federated pattern per mesh cluster: each cluster&amp;rsquo;s Edge Prometheus scrapes local Istio/Envoy telemetry, evaluates recording rules, and federates into that cluster&amp;rsquo;s Federated Prometheus (or into a shared central Federated Prometheus, if your organization consolidates metrics that way). Kiali already supports per-cluster Prometheus URLs in &lt;a href=&#34;https://staging.kiali.io/docs/configuration/multi-cluster/&#34;&gt;multicluster configuration&lt;/a&gt;—set each cluster&amp;rsquo;s &lt;code&gt;external_services.prometheus.url&lt;/code&gt; to the Federated Prometheus instance that holds that cluster&amp;rsquo;s federated mesh metrics, not the local Edge scraper.&lt;/p&gt;
&lt;h3 id=&#34;interval-tuning&#34;&gt;Interval tuning&lt;/h3&gt;
&lt;p&gt;Several independent intervals affect freshness, CPU use, and the minimum time windows Kiali can use for &lt;code&gt;rate()&lt;/code&gt; queries. Set them together—not in isolation.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;What is configured&lt;/th&gt;
&lt;th&gt;Where configured&lt;/th&gt;
&lt;th&gt;Setting&lt;/th&gt;
&lt;th&gt;Role&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Metric Scrape interval&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Edge Prometheus&lt;/td&gt;
&lt;td&gt;&lt;code&gt;global.scrape_interval&lt;/code&gt; (or per-job override on Istio/Envoy targets)&lt;/td&gt;
&lt;td&gt;How often raw &lt;code&gt;istio_*&lt;/code&gt; metrics are scraped&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Recording rule interval&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Edge Prometheus&lt;/td&gt;
&lt;td&gt;&lt;code&gt;interval&lt;/code&gt; on the rule group in &lt;code&gt;core-recording-rules.yml&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;How often &lt;code&gt;workload:*&lt;/code&gt; aggregates are recomputed&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Federation interval&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Federated Prometheus&lt;/td&gt;
&lt;td&gt;&lt;code&gt;scrape_interval&lt;/code&gt; on the federated Prometheus federation job&lt;/td&gt;
&lt;td&gt;How often Prometheus pulls &lt;code&gt;workload:*&lt;/code&gt; (and other federated series) from the edge&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Metric retention&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Edge Prometheus&lt;/td&gt;
&lt;td&gt;&lt;code&gt;storage.tsdb.retention.time&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;How long raw and &lt;code&gt;workload:*&lt;/code&gt; series are kept before expiry (short, e.g. 6h)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Metric retention&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Federated Prometheus&lt;/td&gt;
&lt;td&gt;&lt;code&gt;storage.tsdb.retention.time&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Long-term history Kiali and dashboards query (as desired)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Rules of thumb:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Set all three intervals equal: edge scrape = recording rule = federation scrape.
&amp;ndash; The recommended default is 30s/30s/30s. This is straightforward, efficient, and correct for Kiali. Evaluating rules faster than the scrape interval wastes CPU (re-sums unchanged data). Evaluating slower means &lt;code&gt;workload:*&lt;/code&gt; updates lag behind available raw data. Federation at the same rate ensures each federation scrape captures a freshly evaluated aggregate.&lt;/li&gt;
&lt;li&gt;Set &lt;code&gt;scrape_timeout&lt;/code&gt; below &lt;code&gt;scrape_interval&lt;/code&gt; on the federation job.
&amp;ndash; (for example &lt;code&gt;25s&lt;/code&gt; timeout with &lt;code&gt;30s&lt;/code&gt; interval) so slow federation scrapes do not overlap.&lt;/li&gt;
&lt;li&gt;Kiali minimum duration depends on the federation scrape interval alone.
&amp;ndash; Each federation scrape produces one data point in the federated TSDB. Prometheus &lt;code&gt;rate()&lt;/code&gt; requires at least two data points in the range window, so the minimum useful Kiali duration is &lt;code&gt;2 × federation_scrape_interval&lt;/code&gt;. With 30s federation, that is 60s (1m) — matching Kiali&amp;rsquo;s smallest offered duration.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Recommended settings — 30s/30s/30s:&lt;/p&gt;
&lt;p&gt;This is a common production default (for example kube-prometheus-stack). The Kiali reference bundle uses these values:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Setting&lt;/th&gt;
&lt;th&gt;Recommended value&lt;/th&gt;
&lt;th&gt;Notes&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Edge &lt;code&gt;scrape_interval&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;30s&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Common production baseline&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Recording rule &lt;code&gt;interval&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;30s&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Matches scrape; one eval per scrape cycle&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Federation &lt;code&gt;scrape_interval&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;30s&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Determines Kiali&amp;rsquo;s sampling rate&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Federation &lt;code&gt;scrape_timeout&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;25s&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Slightly less than scrape interval&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Edge retention&lt;/td&gt;
&lt;td&gt;&lt;code&gt;6h&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Enough for troubleshooting; raw series expire after federation&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Minimum Kiali duration&lt;/td&gt;
&lt;td&gt;&lt;code&gt;1m&lt;/code&gt; (&lt;code&gt;60s&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;&lt;code&gt;2 × 30s&lt;/code&gt; federation; Kiali&amp;rsquo;s smallest dropdown value&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Example edge rule group header and federated Prometheus federation job:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;# Edge Prometheus — recording rules&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;groups&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;&lt;/span&gt;- &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;name&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;istio.workload-aggregation&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;interval&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;30s         &lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;# match 30s scrape_interval&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;rules&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;  &lt;/span&gt;- &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;record&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;workload:istio_requests_total&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;expr&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;sum without (pod, pod_template_hash, instance, job, node) (istio_requests_total)&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;# Federated Prometheus — federation job&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;&lt;/span&gt;- &lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;job_name&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;istio-mesh-federate&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;scrape_interval&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;30s&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;scrape_timeout&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;25s&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;metrics_path&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;/federate&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;# ... match[] and relabel configs&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Expected freshness: with 30s/30s/30s, the three intervals run on independent, unsynchronized clocks. Worst-case staleness of the most recent data point is ~90s (three consecutive 30s waits); average staleness is ~45s. This staleness applies to each counter snapshot. Rate accuracy between consecutive federation data points is unaffected — &lt;code&gt;rate()&lt;/code&gt; computes the slope between correctly ordered samples regardless of their absolute delay from live traffic.&lt;/p&gt;
&lt;p&gt;When to use different intervals:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Edge scrape&lt;/th&gt;
&lt;th&gt;Recording rules&lt;/th&gt;
&lt;th&gt;Federation&lt;/th&gt;
&lt;th&gt;Min Kiali duration&lt;/th&gt;
&lt;th&gt;When to use&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;15s&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;15s&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;30s&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;60s&lt;/code&gt; (1m)&lt;/td&gt;
&lt;td&gt;Edge also serves alerting or direct queries needing fine granularity. Doubles scrape load vs 30s; no Kiali benefit via federation.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;30s&lt;/code&gt; (recommended)&lt;/td&gt;
&lt;td&gt;&lt;code&gt;30s&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;30s&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;60s&lt;/code&gt; (1m)&lt;/td&gt;
&lt;td&gt;Default. Efficient, straightforward.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;1m&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;1m&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;1m&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;2m&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Very large clusters where reducing scrape load outweighs freshness.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Istio&amp;rsquo;s own examples use &lt;code&gt;interval: 5s&lt;/code&gt; for recording rules with a 15s scrape. That configuration was designed for their quick-start addon where the same Prometheus serves direct queries; faster rule eval keeps &lt;code&gt;workload:*&lt;/code&gt; fresh for local consumers. In a federation architecture where no one queries the edge directly, this benefit disappears and the extra CPU is wasted.&lt;/p&gt;
&lt;p&gt;Kiali duration dropdown:&lt;/p&gt;
&lt;p&gt;Kiali reads &lt;code&gt;globalScrapeInterval&lt;/code&gt; from the Prometheus at &lt;code&gt;external_services.prometheus.url&lt;/code&gt; and filters durations to &lt;code&gt;&amp;gt;= 2 x globalScrapeInterval&lt;/code&gt;. With federation, Kiali queries the federated Prometheus. If the federated Prometheus &lt;code&gt;global.scrape_interval&lt;/code&gt; is set to &lt;code&gt;30s&lt;/code&gt; (matching the federation job interval), Kiali auto-detects the correct minimum duration of 60s (1m) and no additional configuration is needed.&lt;/p&gt;
&lt;p&gt;If the federated Prometheus &lt;code&gt;global.scrape_interval&lt;/code&gt; differs from the federation job interval (for example &lt;code&gt;global.scrape_interval: 15s&lt;/code&gt; but the federation job runs every &lt;code&gt;30s&lt;/code&gt;), Kiali may offer durations shorter than the federation sampling supports. Ensure the federated Prometheus &lt;code&gt;global.scrape_interval&lt;/code&gt; matches or exceeds the federation job&amp;rsquo;s &lt;code&gt;scrape_interval&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id=&#34;kiali-self-monitoring-metrics&#34;&gt;Kiali self-monitoring metrics&lt;/h3&gt;
&lt;p&gt;Kiali can export its own Prometheus metrics (&lt;code&gt;kiali_*&lt;/code&gt;) for performance and optional health-status monitoring. These are not Istio mesh metrics—they are not produced on the edge by Envoy, not listed in &lt;code&gt;core-metrics.yml&lt;/code&gt;, and not part of the Istio federation tiers.&lt;/p&gt;
&lt;p&gt;Because Kiali queries federated Prometheus, &lt;code&gt;kiali_*&lt;/code&gt; series must ultimately be available in that same TSDB. The &lt;a href=&#34;https://github.com/kiali/kiali/blob/master/design/KEPS/metric-rules/proposal.md#kiali-self-monitoring-metrics&#34;&gt;metric rules KEP&lt;/a&gt; describes three deployment options:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Option&lt;/th&gt;
&lt;th&gt;Kiali metrics scraped by&lt;/th&gt;
&lt;th&gt;Before production&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;1. Shared Istio edge&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Same edge Prom as Istio/Envoy&lt;/td&gt;
&lt;td&gt;Recording rules + federation (parallel to &lt;code&gt;workload:*&lt;/code&gt;)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;2. Dedicated Kiali edge&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Separate edge Prom for Kiali only&lt;/td&gt;
&lt;td&gt;Recording rules + federation to prod&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;3. Direct to Federated&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Federated Prom directly&lt;/td&gt;
&lt;td&gt;Raw scrape; dedup required in queries for HA&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Config&lt;/th&gt;
&lt;th&gt;Default&lt;/th&gt;
&lt;th&gt;Purpose&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;server.observability.metrics.enabled&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Operational metrics (API, graph, cache, validation, etc.)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;server.observability.metrics.health_status.enabled&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;kiali_health_status&lt;/code&gt; gauge per entity (opt-in; higher cardinality)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;The metrics HTTP listener (port &lt;code&gt;server.observability.metrics.port&lt;/code&gt;, default &lt;code&gt;9090&lt;/code&gt;) starts when either flag is true.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;kiali_health_status&lt;/code&gt; and HA: Multiple Kiali replicas export the same gauge values for the same entities (duplicate series, not partition-of-work). With Options 1 or 2, use &lt;code&gt;max without (pod, instance, …)&lt;/code&gt; in recording rules to deduplicate—not &lt;code&gt;sum&lt;/code&gt;. With Option 3, apply the same dedup in alert/dashboard queries (for example &lt;code&gt;max by (cluster, namespace, health_type, name) (kiali_health_status)&lt;/code&gt;), because raw scrape retains per-replica copies.&lt;/p&gt;
&lt;p&gt;The built-in Kiali Internal Metrics custom dashboard queries &lt;code&gt;external_services.prometheus.url&lt;/code&gt; and filters metrics with the Prometheus scrape &lt;code&gt;namespace&lt;/code&gt; label (for example &lt;code&gt;{namespace=&amp;quot;istio-system&amp;quot;, app=&amp;quot;kiali&amp;quot;, ...}&lt;/code&gt;). It only works when federated Prometheus holds the &lt;code&gt;kiali_*&lt;/code&gt; series (via federation or direct scrape) &lt;strong&gt;with the &lt;code&gt;namespace&lt;/code&gt; label retained&lt;/strong&gt; after edge recording rules—see &lt;code&gt;kiali-metrics-recording-rules.yml&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Reference files for Options 1–2: &lt;code&gt;kiali-metrics-recording-rules.yml&lt;/code&gt;, &lt;code&gt;kiali-metrics-federation-match.yml&lt;/code&gt;, and (for Option 2) &lt;code&gt;demo/prometheus-kiali-edge.yaml&lt;/code&gt;. Try them in the &lt;a href=&#34;#demo-walkthrough-lab-only&#34;&gt;demo walkthrough&lt;/a&gt; with &lt;code&gt;--with-kiali-metrics&lt;/code&gt; and optionally &lt;code&gt;--kiali-edge dedicated&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;For &lt;code&gt;kiali_health_status&lt;/code&gt; alerting on OpenShift, see the &lt;a href=&#34;https://staging.kiali.io/docs/tutorials/ossm-multicluster/ossm-health-status-alerts/&#34;&gt;OSSM health status alerts tutorial&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id=&#34;validation&#34;&gt;Validation&lt;/h3&gt;
&lt;p&gt;Confirm that federated series match edge aggregates (on federated Prometheus, after relabel):&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-promql&#34; data-lang=&#34;promql&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;# Edge Prometheus&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;sum&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;(&lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;rate&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;(&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;workload&lt;/span&gt;&lt;span style=&#34;color:#a40000&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;istio_requests_total&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;&lt;span style=&#34;color:#f57900&#34;&gt;destination_workload_namespace&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;bookinfo&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;#34;}[&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;5m&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;]&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;))&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#8f5902;font-style:italic&#34;&gt;# Federated Prometheus&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;sum&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;(&lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;rate&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;(&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;istio_requests_total&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;&lt;span style=&#34;color:#f57900&#34;&gt;destination_workload_namespace&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;bookinfo&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;#34;}[&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;5m&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;]&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;))&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Compare series counts on the edge before federation:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-promql&#34; data-lang=&#34;promql&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;count&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;(&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;&lt;span style=&#34;color:#f57900&#34;&gt;__name__&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;istio_requests_total&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;#34;}&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;)&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#204a87;font-weight:bold&#34;&gt;count&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;(&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;{&lt;/span&gt;&lt;span style=&#34;color:#f57900&#34;&gt;__name__&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#4e9a06&#34;&gt;workload:istio_requests_total&lt;/span&gt;&lt;span style=&#34;color:#000;font-weight:bold&#34;&gt;&amp;#34;}&lt;/span&gt;&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;)&lt;/span&gt;&lt;span style=&#34;color:#f8f8f8;text-decoration:underline&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The &lt;code&gt;workload:*&lt;/code&gt; count should be substantially lower when workloads have been associated with multiple pods (replicas or restarts).&lt;/p&gt;
&lt;h2 id=&#34;option-2-metric-thinning&#34;&gt;Option 2: Metric Thinning&lt;/h2&gt;
&lt;p&gt;If the Federation option is not possible and you are limited to a single TSDB instance, this may be helpful.&lt;/p&gt;
&lt;p&gt;To reduce the default telemetry to only what is needed by Kiali&lt;sup id=&#34;fnref:1&#34;&gt;&lt;a href=&#34;#fn:1&#34; class=&#34;footnote-ref&#34; role=&#34;doc-noteref&#34;&gt;1&lt;/a&gt;&lt;/sup&gt; users can add the following snippet to their Prometheus configuration. Because things can change with different versions, it is recommended to ensure you use the correct version of this documentation based on your Kiali/Istio version.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;metric_relabel_configs:&lt;/code&gt; attribute should be added under each job name defined to scrape Istio or Envoy metrics. Below we show it under the &lt;code&gt;kubernetes-pods&lt;/code&gt; job, but you should adapt as needed. Be careful of indentation.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;    - job_name: kubernetes-pods
      metric_relabel_configs:
      - action: drop
        source_labels: [__name__]
        regex: istio_agent_.*|istiod_.*|istio_build|citadel_.*|galley_.*|pilot_[^psx].*|envoy_cluster_[^u].*|envoy_cluster_update.*|envoy_listener_[^dh].*|envoy_server_[^mu].*|envoy_wasm_.*
      - action: labeldrop
        regex: chart|destination_app|destination_version|heritage|.*operator.*|istio.*|release|security_istio_io_.*|service_istio_io_.*|sidecar_istio_io_inject|source_app|source_version
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Applying this configuration should reduce the number of stored metrics by about 20%, as well as reducing the number of attributes stored on many remaining metrics.&lt;/p&gt;
&lt;h2 id=&#34;metric-thinning-with-disabled-features&#34;&gt;Metric Thinning with Disabled Features&lt;/h2&gt;
&lt;p&gt;The section above drops metrics unused by Kiali. As such, making those configuration changes should not negatively impact Kiali behavior in any way. But some very heavy metrics remain. These metrics can also be dropped, but their removal will impact the behavior of Kiali.  This may be OK if you don&amp;rsquo;t use the affected features of Kiali, or if you are willing to sacrifice the feature for the associated metric savings. In particular, these are &amp;ldquo;Histogram&amp;rdquo; metrics.  Istio is planning to make some improvements to help users better configure these metrics, but as of this writing they are still defined with fairly inefficient default &amp;ldquo;buckets&amp;rdquo;, making the number of associated time-series quite large, and the overhead of maintaining and querying the metrics, intensive.  Each histogram actually is comprised of 3 stored metrics.  For example, a histogram named &lt;code&gt;xxx&lt;/code&gt; would result in the following metrics stored into Prometheus:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;xxx_bucket&lt;/code&gt;
&lt;ul&gt;
&lt;li&gt;The most intensive metric, and is required to calculate percentile values.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;code&gt;xxx_count&lt;/code&gt;
&lt;ul&gt;
&lt;li&gt;Required to calculate &amp;lsquo;avg&amp;rsquo; values.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;code&gt;xxx_sum&lt;/code&gt;
&lt;ul&gt;
&lt;li&gt;Required to calculate rates over time, and for &amp;lsquo;avg&amp;rsquo; values.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When considering whether to thin the Histogram metrics, one of the following three approaches is recommended:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;If the relevant Kiali reporting is needed, keep the histogram as-is.&lt;/li&gt;
&lt;li&gt;If the relevant Kiali reporting is not needed, or not worth the additional metric overhead, drop the entire histogram.&lt;/li&gt;
&lt;li&gt;If the metric chart percentiles are not required, drop only the xxx_bucket metric.  This removes the majority of the histogram overhead while keeping rate and average (non-percentile) values in Kiali.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;These are the relevant Histogram metrics:&lt;/p&gt;
&lt;h3 id=&#34;istio_request_bytes&#34;&gt;istio_request_bytes&lt;/h3&gt;
&lt;p&gt;This metric is used to produce the &lt;code&gt;Request Size&lt;/code&gt; chart on the metric tabs.  It also supports &lt;code&gt;Request Throughput&lt;/code&gt; edge labels on the graph.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Appending &lt;code&gt;|istio_request_bytes_.*&lt;/code&gt; to the &lt;code&gt;drop&lt;/code&gt; regex above would drop all associated metrics and would prevent any request size/throughput reporting in Kiali.&lt;/li&gt;
&lt;li&gt;Appending &lt;code&gt;|istio_request_bytes_bucket&lt;/code&gt; to the &lt;code&gt;drop&lt;/code&gt; regex above, would prevent any request size percentile reporting in the Kiali metric charts.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;istio_response_bytes&#34;&gt;istio_response_bytes&lt;/h3&gt;
&lt;p&gt;This metric is used to produce the &lt;code&gt;Response Size&lt;/code&gt; chart on the metric tabs.  And also supports &lt;code&gt;Response Throughput&lt;/code&gt; edge labels on the graph&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Appending &lt;code&gt;|istio_response_bytes_.*&lt;/code&gt; to the &lt;code&gt;drop&lt;/code&gt; regex above would drop all associated metrics and would prevent any response size/throughput reporting in Kiali.&lt;/li&gt;
&lt;li&gt;Appending &lt;code&gt;|istio_response_bytes_bucket&lt;/code&gt; to the &lt;code&gt;drop&lt;/code&gt; regex above would prevent any response size percentile reporting in the Kiali metric charts.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;istio_request_duration_milliseconds&#34;&gt;istio_request_duration_milliseconds&lt;/h3&gt;
&lt;p&gt;This metric is used to produce the &lt;code&gt;Request Duration&lt;/code&gt; chart on the metric tabs.  It also supports &lt;code&gt;Response Time&lt;/code&gt; edge labels on the graph.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Appending &lt;code&gt;|istio_request_duration_milliseconds_.*&lt;/code&gt; to the &lt;code&gt;drop&lt;/code&gt; regex above would drop all associated metrics and would prevent any request duration/response time reporting in Kiali.&lt;/li&gt;
&lt;li&gt;Appending &lt;code&gt;|istio_request_duration_milliseconds_bucket&lt;/code&gt; to the &lt;code&gt;drop&lt;/code&gt; regex above would prevent any request duration/response time percentile reporting in the Kiali metric charts or graph edge labels.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;scrape-interval&#34;&gt;Scrape Interval&lt;/h2&gt;
&lt;p&gt;The Prometheus &lt;code&gt;globalScrapeInterval&lt;/code&gt; is an important configuration option&lt;sup id=&#34;fnref:2&#34;&gt;&lt;a href=&#34;#fn:2&#34; class=&#34;footnote-ref&#34; role=&#34;doc-noteref&#34;&gt;2&lt;/a&gt;&lt;/sup&gt;. The scrape interval can have a significant effect on metrics collection overhead as it takes effort to pull all of those configured metrics and update the relevant time-series. And although it doesn&amp;rsquo;t affect time-series cardinality, it does affect storage for the data-points, as well as having impact when computing query results (the more data-points, the more processing and aggregation).&lt;/p&gt;
&lt;p&gt;Users should think carefully about their configured scrape interval. Note that the Istio addon for prometheus configures it to 15s. This is great for demos but may be too frequent for production scenarios. The prometheus helm charts set a default of 1m, which is more reasonable for most installations, but may not be the desired frequency for any particular setup.&lt;/p&gt;
&lt;p&gt;The recommendation for Kiali is to set the longest interval possible, while still providing a useful granularity. The longer the interval the less data points scraped, thus reducing processing, storage, and computational overhead. But the impact on Kiali should be understood. It is important to realize that request rates (or byte rates, message rates, etc) require a minumum of two data points:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;rate = (dp2 - dp1) / timePeriod&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;That means for Kiali to show anything useful in the graph, or anywhere rates are used (many places), the minimum duration must be &lt;code&gt;&amp;gt;= 2 x globalScrapeInterval&lt;/code&gt;. Kiali will &lt;a href=&#34;https://staging.kiali.io/docs/faq/graph/#scrapeduration&#34;&gt;eliminate invalid Duration options&lt;/a&gt; given the globalScrapeInterval.&lt;/p&gt;
&lt;p&gt;Kiali does a lot of aggregation and querying over time periods. As such, the number of data points will affect query performance, especially for larger time periods.&lt;/p&gt;
&lt;p&gt;For more information, see the &lt;a href=&#34;https://prometheus.io/docs/prometheus/latest/configuration/configuration/#configuration&#34;&gt;Prometheus documentation&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;tsdb-retention-time&#34;&gt;TSDB retention time&lt;/h2&gt;
&lt;p&gt;The Prometheus &lt;code&gt;tsdbRetentionTime&lt;/code&gt; is an important configuration option. It has a significant effect on metrics storage, as Prometheus will keep each reported data-point for that period of time, performing compaction as needed. The larger the retention time, the larger the required storage.  Note also that Kiali queries against large time periods, and very large data-sets, may result in poor performance or timeouts.&lt;/p&gt;
&lt;p&gt;The recommendation for Kiali is to set the shortest retention time that meets your needs and/or operational limits.  In some cases users may want to offload older data to a secondary store.  Kiali will &lt;a href=&#34;https://staging.kiali.io/docs/faq/graph/#scrapeduration&#34;&gt;eliminate invalid Duration options&lt;/a&gt; given the tsdbRetentionTime.&lt;/p&gt;
&lt;p&gt;For more information, see the &lt;a href=&#34;https://prometheus.io/docs/prometheus/latest/storage/#operational-aspects&#34;&gt;Prometheus documentation&lt;/a&gt;.&lt;/p&gt;
&lt;div class=&#34;footnotes&#34; role=&#34;doc-endnotes&#34;&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id=&#34;fn:1&#34;&gt;
&lt;p&gt;Some non-essential telemetry remains in order to not over-complicate the configuration change.  The remaining telemetry is typically negligible.&amp;#160;&lt;a href=&#34;#fnref:1&#34; class=&#34;footnote-backref&#34; role=&#34;doc-backlink&#34;&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id=&#34;fn:2&#34;&gt;
&lt;p&gt;Note that Prometheus can be configured such that individual scrape points can override the global setting, but Kiali is not currently concerned with this corner case.&amp;#160;&lt;a href=&#34;#fnref:2&#34; class=&#34;footnote-backref&#34; role=&#34;doc-backlink&#34;&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;

      </description>
    </item>
    
  </channel>
</rss>
