<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Gather CPU utilization of host as variable for prometheus exporter]]></title><description><![CDATA[<p dir="auto">Hello,</p>
<p dir="auto">xsconsole and xen orchestra can display host CPU usage, is it possible to get these metrics somehow in shell into a variable? I would like to create some exporter for prometheus so that I can collect utilization metrics of host, not just dom0.</p>
<p dir="auto">Or perhaps someone already created prometheus exporter for Xen?</p>
]]></description><link>https://xcp-ng.org/forum/topic/5338/gather-cpu-utilization-of-host-as-variable-for-prometheus-exporter</link><generator>RSS for Node</generator><lastBuildDate>Tue, 13 Oct 2026 09:53:42 GMT</lastBuildDate><atom:link href="https://xcp-ng.org/forum/topic/5338.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 15 Dec 2021 11:52:25 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Gather CPU utilization of host as variable for prometheus exporter on Fri, 19 Dec 2025 19:48:16 GMT]]></title><description><![CDATA[<p dir="auto">Yay! Santa came early this year!!</p>
]]></description><link>https://xcp-ng.org/forum/post/100920</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/100920</guid><dc:creator><![CDATA[ScarfAntennae]]></dc:creator><pubDate>Fri, 19 Dec 2025 19:48:16 GMT</pubDate></item><item><title><![CDATA[Reply to Gather CPU utilization of host as variable for prometheus exporter on Fri, 19 Dec 2025 08:47:19 GMT]]></title><description><![CDATA[<p dir="auto">Question for <a class="plugin-mentions-group plugin-mentions-a" href="/forum/groups/team-xo-backend" aria-label="Profile: team-xo-backend">@<bdi>team-xo-backend</bdi></a> <img src="https://xcp-ng.org/forum/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=1d3f495298e" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" style="height:1.4em;width:auto;vertical-align:middle" title=":)" alt="🙂" /></p>
]]></description><link>https://xcp-ng.org/forum/post/100886</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/100886</guid><dc:creator><![CDATA[olivierlambert]]></dc:creator><pubDate>Fri, 19 Dec 2025 08:47:19 GMT</pubDate></item><item><title><![CDATA[Reply to Gather CPU utilization of host as variable for prometheus exporter on Fri, 19 Dec 2025 02:38:23 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/scarfantennae" aria-label="Profile: ScarfAntennae">@<bdi>ScarfAntennae</bdi></a> said in <a href="/forum/post/99142">Gather CPU utilization of host as variable for prometheus exporter</a>:</p>
<blockquote>
<p dir="auto">I was about to link Mike's work here, but wanted to say how we desperately need a metrics system that would be exposed from a centralized location. There's no way in hell I'm giving a docker host credential access to the hypervisor it resides on (and all the other hypervisors) - on the other hand, if the metrics were exposed only via XO and limited in terms of where these metrics could be accessed from, now that would be a sold implementation.</p>
</blockquote>
<p dir="auto">Looks like this wish has been granted with the latest Xen-Orchestra release.</p>
<p dir="auto">I was able to successfully scrape the metrics from XO using Prometheus. I was wondering if there was any links or json file examples of a good Grafana dashboard to show these metrics? I saw example screenshots in the blog post <a href="https://xen-orchestra.com/blog/xen-orchestra-6-0/" target="_blank" rel="noopener noreferrer nofollow ugc">here</a> but nothing on <a href="http://grafana.com" target="_blank" rel="noopener noreferrer nofollow ugc">grafana.com</a>, here in the forums, or on Github had the config. I saw PR <a href="https://github.com/vatesfr/xen-orchestra/pull/9333" target="_blank" rel="noopener noreferrer nofollow ugc">#9333</a> with documentation about the feature, and great rules for alerting, but also no dashboard configs. It has some beginning parts for variables and 2 visualisations, but a copy of the example in the blog would be wonderful as a starting point.</p>
]]></description><link>https://xcp-ng.org/forum/post/100880</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/100880</guid><dc:creator><![CDATA[tsrats]]></dc:creator><pubDate>Fri, 19 Dec 2025 02:38:23 GMT</pubDate></item><item><title><![CDATA[Reply to Gather CPU utilization of host as variable for prometheus exporter on Sun, 02 Nov 2025 12:45:07 GMT]]></title><description><![CDATA[<p dir="auto">Related: <a href="https://xcp-ng.org/forum/topic/9160/xen-orchestra-prometheus-backup-metrics/10">https://xcp-ng.org/forum/topic/9160/xen-orchestra-prometheus-backup-metrics/10</a></p>
]]></description><link>https://xcp-ng.org/forum/post/99143</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/99143</guid><dc:creator><![CDATA[ScarfAntennae]]></dc:creator><pubDate>Sun, 02 Nov 2025 12:45:07 GMT</pubDate></item><item><title><![CDATA[Reply to Gather CPU utilization of host as variable for prometheus exporter on Sun, 02 Nov 2025 12:43:34 GMT]]></title><description><![CDATA[<p dir="auto">I was about to link Mike's work here, but wanted to say how we desperately need a metrics system that would be exposed from a centralized location. There's no way in hell I'm giving a docker host credential access to the hypervisor it resides on (and all the other hypervisors) - on the other hand, if the metrics were exposed only via XO and limited in terms of where these metrics could be accessed from, now that would be a sold implementation.</p>
]]></description><link>https://xcp-ng.org/forum/post/99142</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/99142</guid><dc:creator><![CDATA[ScarfAntennae]]></dc:creator><pubDate>Sun, 02 Nov 2025 12:43:34 GMT</pubDate></item><item><title><![CDATA[Reply to Gather CPU utilization of host as variable for prometheus exporter on Fri, 22 Jul 2022 06:46:58 GMT]]></title><description><![CDATA[<p dir="auto">Ah nice!</p>
<p dir="auto">Ideally, we'd like to avoid to use the complicated XAPI RRD + XML system. See <a href="https://xcp-ng.org/blog/2022/05/25/fetching-metrics-in-xen-why-the-method-matters/" target="_blank" rel="noopener noreferrer nofollow ugc">https://xcp-ng.org/blog/2022/05/25/fetching-metrics-in-xen-why-the-method-matters/</a></p>
<p dir="auto">Thanks a lot to bring this, I'll promote it!</p>
]]></description><link>https://xcp-ng.org/forum/post/51344</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/51344</guid><dc:creator><![CDATA[olivierlambert]]></dc:creator><pubDate>Fri, 22 Jul 2022 06:46:58 GMT</pubDate></item><item><title><![CDATA[Reply to Gather CPU utilization of host as variable for prometheus exporter on Thu, 21 Jul 2022 19:23:17 GMT]]></title><description><![CDATA[<p dir="auto">I just installed XCP-ng on a new server and wanted Prometheus metrics too, so I wrote this: <a href="https://github.com/MikeDombo/xen-exporter" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/MikeDombo/xen-exporter</a>.</p>
<p dir="auto">It is a simple Python script (which can run in Docker) that collects the metrics from XCP-ng's RRD API. These are the same metrics that you'd see in Xen Orchestra or in the XenServer Console application. In addition to the exporter, I've also created a Grafana dashboard to visualize these metrics too.</p>
<p dir="auto"><img src="https://camo.githubusercontent.com/13676d3cead82a02c7c887ffae48c0f3d6ec71193a555ccfd145df89586bb60b/68747470733a2f2f67726166616e612e636f6d2f6170692f64617368626f617264732f31363538382f696d616765732f31323437392f696d616765" alt="Example dashboard" class="img-markdown  img-fluid" /></p>
]]></description><link>https://xcp-ng.org/forum/post/51338</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/51338</guid><dc:creator><![CDATA[MikeDombo]]></dc:creator><pubDate>Thu, 21 Jul 2022 19:23:17 GMT</pubDate></item><item><title><![CDATA[Reply to Gather CPU utilization of host as variable for prometheus exporter on Thu, 16 Dec 2021 12:37:59 GMT]]></title><description><![CDATA[<p dir="auto">That's the plan, yes, there's some Xen stats backend, but it requires some work to modify Xen for a better system.</p>
]]></description><link>https://xcp-ng.org/forum/post/45051</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/45051</guid><dc:creator><![CDATA[olivierlambert]]></dc:creator><pubDate>Thu, 16 Dec 2021 12:37:59 GMT</pubDate></item><item><title><![CDATA[Reply to Gather CPU utilization of host as variable for prometheus exporter on Thu, 16 Dec 2021 11:05:44 GMT]]></title><description><![CDATA[<p dir="auto">there must be some low level way to do that from dom0</p>
]]></description><link>https://xcp-ng.org/forum/post/45050</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/45050</guid><dc:creator><![CDATA[petr.bena]]></dc:creator><pubDate>Thu, 16 Dec 2021 11:05:44 GMT</pubDate></item><item><title><![CDATA[Reply to Gather CPU utilization of host as variable for prometheus exporter on Thu, 16 Dec 2021 11:05:15 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/olivierlambert" aria-label="Profile: olivierlambert">@<bdi>olivierlambert</bdi></a> yes</p>
]]></description><link>https://xcp-ng.org/forum/post/45049</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/45049</guid><dc:creator><![CDATA[petr.bena]]></dc:creator><pubDate>Thu, 16 Dec 2021 11:05:15 GMT</pubDate></item><item><title><![CDATA[Reply to Gather CPU utilization of host as variable for prometheus exporter on Thu, 16 Dec 2021 10:07:21 GMT]]></title><description><![CDATA[<p dir="auto">You mean how XAPI is fetching these metrics?</p>
]]></description><link>https://xcp-ng.org/forum/post/45047</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/45047</guid><dc:creator><![CDATA[olivierlambert]]></dc:creator><pubDate>Thu, 16 Dec 2021 10:07:21 GMT</pubDate></item><item><title><![CDATA[Reply to Gather CPU utilization of host as variable for prometheus exporter on Thu, 16 Dec 2021 10:03:51 GMT]]></title><description><![CDATA[<p dir="auto">how does API get these metrics?</p>
]]></description><link>https://xcp-ng.org/forum/post/45046</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/45046</guid><dc:creator><![CDATA[petr.bena]]></dc:creator><pubDate>Thu, 16 Dec 2021 10:03:51 GMT</pubDate></item><item><title><![CDATA[Reply to Gather CPU utilization of host as variable for prometheus exporter on Thu, 16 Dec 2021 09:57:20 GMT]]></title><description><![CDATA[<p dir="auto">Everything is already exported via RRDs (see <a href="https://wiki.xenproject.org/wiki/XAPI_RRDs" target="_blank" rel="noopener noreferrer nofollow ugc">https://wiki.xenproject.org/wiki/XAPI_RRDs</a>). That's what we use in XO.</p>
<p dir="auto">But this is far from being nice because:</p>
<ul>
<li>Those RRDs are encapsulated in XML, which is costly to parse</li>
<li>XAPI itself is hammering Xen with requests every 5 secs</li>
</ul>
<p dir="auto">So ideally, doing a metrics redesign from Xen to XAPI first, will be better.</p>
]]></description><link>https://xcp-ng.org/forum/post/45045</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/45045</guid><dc:creator><![CDATA[olivierlambert]]></dc:creator><pubDate>Thu, 16 Dec 2021 09:57:20 GMT</pubDate></item><item><title><![CDATA[Reply to Gather CPU utilization of host as variable for prometheus exporter on Thu, 16 Dec 2021 09:18:02 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/olivierlambert" aria-label="Profile: olivierlambert">@<bdi>olivierlambert</bdi></a> but does that really export CPU utilization? From what I saw it only shows memory utilization. Also how does orchestra get these metrics? There must be some low level way to accomplish this, or is xsconsole also using the API for that?</p>
]]></description><link>https://xcp-ng.org/forum/post/45044</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/45044</guid><dc:creator><![CDATA[petr.bena]]></dc:creator><pubDate>Thu, 16 Dec 2021 09:18:02 GMT</pubDate></item><item><title><![CDATA[Reply to Gather CPU utilization of host as variable for prometheus exporter on Wed, 15 Dec 2021 12:43:53 GMT]]></title><description><![CDATA[<p dir="auto"><a href="https://github.com/johnprather/xapi_exporter" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/johnprather/xapi_exporter</a></p>
<p dir="auto">But ideally, I'd prefer to:</p>
<ul>
<li>short term: do that via XO API/plugin</li>
<li>long term: replace the current XAPI RRDs mess with directly available Prometheus metrics</li>
</ul>
]]></description><link>https://xcp-ng.org/forum/post/44988</link><guid isPermaLink="true">https://xcp-ng.org/forum/post/44988</guid><dc:creator><![CDATA[olivierlambert]]></dc:creator><pubDate>Wed, 15 Dec 2021 12:43:53 GMT</pubDate></item></channel></rss>