<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
	<id>https://wiki.cless.pro/index.php?action=history&amp;feed=atom&amp;title=Prometheus._Proxmox_via_Prometheus_monitoring</id>
	<title>Prometheus. Proxmox via Prometheus monitoring - История изменений</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.cless.pro/index.php?action=history&amp;feed=atom&amp;title=Prometheus._Proxmox_via_Prometheus_monitoring"/>
	<link rel="alternate" type="text/html" href="https://wiki.cless.pro/index.php?title=Prometheus._Proxmox_via_Prometheus_monitoring&amp;action=history"/>
	<updated>2026-10-22T22:44:31Z</updated>
	<subtitle>История изменений этой страницы в вики</subtitle>
	<generator>MediaWiki 1.36.2</generator>
	<entry>
		<id>https://wiki.cless.pro/index.php?title=Prometheus._Proxmox_via_Prometheus_monitoring&amp;diff=1550&amp;oldid=prev</id>
		<title>Cless: Новая страница: «= Links = https://community.hetzner.com/tutorials/proxmox-prometheus-metrics  = PVE Server =  === Create users === We will create a dedicated Proxmox VE user beca...»</title>
		<link rel="alternate" type="text/html" href="https://wiki.cless.pro/index.php?title=Prometheus._Proxmox_via_Prometheus_monitoring&amp;diff=1550&amp;oldid=prev"/>
		<updated>2023-05-29T16:54:02Z</updated>

		<summary type="html">&lt;p&gt;Новая страница: «= Links = https://community.hetzner.com/tutorials/proxmox-prometheus-metrics  = PVE Server =  === Create users === We will create a dedicated Proxmox VE user beca...»&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Links =&lt;br /&gt;
https://community.hetzner.com/tutorials/proxmox-prometheus-metrics&lt;br /&gt;
&lt;br /&gt;
= PVE Server =&lt;br /&gt;
&lt;br /&gt;
=== Create users ===&lt;br /&gt;
We will create a dedicated Proxmox VE user because anonymous data collection is not permitted. This user will have read-only permissions.&amp;lt;blockquote&amp;gt;  '''pve-exporter@pve''' — a username of a new Proxmox VE user.&lt;br /&gt;
&lt;br /&gt;
  '''-password &amp;lt;password&amp;gt;''' — set a password for that user. Replace &amp;lt;password&amp;gt; with the actual password.&amp;lt;/blockquote&amp;gt;&amp;lt;code&amp;gt;pveum user add pve-exporter@pve -password &amp;lt;password&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the role PVEAuditor for the newly created user:&amp;lt;blockquote&amp;gt;  '''/''' — first argument is an access control path, everything in this case.&lt;br /&gt;
&lt;br /&gt;
  '''-user pve-exporter@pve''' — specify the user.&lt;br /&gt;
&lt;br /&gt;
  '''-role PVEAuditor''' — specify role for that user.&amp;lt;/blockquote&amp;gt;&amp;lt;code&amp;gt;pveum acl modify / -user pve-exporter@pve -role PVEAuditor&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create Linux User&amp;lt;blockquote&amp;gt;  '''-s /bin/false''' — set login shell to /bin/false in order to disable interactive login.&lt;br /&gt;
&lt;br /&gt;
  '''pve-exporter''' — user's login name.&amp;lt;/blockquote&amp;gt;&amp;lt;code&amp;gt;useradd -s /bin/false pve-exporter&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create Virtual Environment ===&lt;br /&gt;
The Prometheus Proxmox VE Exporter is written in Python, and we will install it within a so called venv (virtual environment). The use of such a virtual environment makes Python dependency handling much easier compared to a regular installation with pip.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;apt update&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;apt install -y python3-venv&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And create a new virtual environment&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;python3 -m venv /opt/prometheus-pve-exporter&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Prometheus Proxmox VE Exporter ===&lt;br /&gt;
Activate the virtual environment&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;source /opt/prometheus-pve-exporter/bin/activate&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check if (prometheus-pve-exporter) is present in front of your command line prompt before executing the next command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Install prometheus-pve-exporter&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;pip install prometheus-pve-exporter&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On Debian 10, the error message Failed building wheel for MarkupSafe may be displayed. This is not an issue, simply verify that everything has been installed by executing the command again. It should finish in very short time and all lines should begin with Requirement already satisfied.&lt;br /&gt;
&lt;br /&gt;
Finally, leave the virtual environment by executing deactivate&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;deactivate&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configure Prometheus Proxmox VE Exporter ===&lt;br /&gt;
nano /etc/prometheus/pve.yml&lt;br /&gt;
 default:&lt;br /&gt;
     user: pve-exporter@pve&lt;br /&gt;
     password: &amp;lt;password&amp;gt;&lt;br /&gt;
     verify_ssl: false&lt;br /&gt;
&amp;lt;code&amp;gt;chown -v root.pve-exporter /etc/prometheus/pve.yml&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;chmod -v 640 /etc/prometheus/pve.yml&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create Systemd Service ===&lt;br /&gt;
&amp;lt;code&amp;gt;nano /etc/systemd/system/prometheus-pve-exporter.service&amp;lt;/code&amp;gt;&lt;br /&gt;
 [Unit]&lt;br /&gt;
 Description=Prometheus Proxmox VE Exporter&lt;br /&gt;
 Documentation=&amp;lt;nowiki&amp;gt;https://github.com/prometheus-pve/prometheus-pve-exporter&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 [Service]&lt;br /&gt;
 Restart=always&lt;br /&gt;
 User=pve-exporter&lt;br /&gt;
 ExecStart=/opt/prometheus-pve-exporter/bin/pve_exporter /etc/prometheus/pve.yml&lt;br /&gt;
 &lt;br /&gt;
 [Install]&lt;br /&gt;
 WantedBy=multi-user.target&lt;br /&gt;
&amp;lt;code&amp;gt;systemctl daemon-reload&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;systemctl enable prometheus-pve-exporter.service&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;systemctl restart prometheus-pve-exporter.service&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Verify that pve_explorer is listening to TCP port 9221&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;netstat -luptn&amp;lt;/code&amp;gt;&lt;br /&gt;
     ...&lt;br /&gt;
     LISTEN 0      128          0.0.0.0:9221&lt;br /&gt;
     ...&lt;br /&gt;
&lt;br /&gt;
= Prometheus server =&lt;br /&gt;
&amp;lt;code&amp;gt;curl --silent http://&amp;lt;pve_IP&amp;gt;:9221/pve | grep pve_version_info&amp;lt;/code&amp;gt;&lt;br /&gt;
     ...&lt;br /&gt;
     # HELP pve_version_info Proxmox VE version info&lt;br /&gt;
     # TYPE pve_version_info gauge&lt;br /&gt;
     pve_version_info{release=&amp;quot;7.2&amp;quot;,repoid=&amp;quot;963997e8&amp;quot;,version=&amp;quot;7.2-15&amp;quot;} 1.0&lt;br /&gt;
     ...&lt;br /&gt;
Extend the scrape_config section in your existing Prometheus configuration with the following lines:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;nano /etc/prometheus/prometheus.yml&amp;lt;/code&amp;gt;&lt;br /&gt;
 ...&lt;br /&gt;
   - job_name: 'pve-exporter'&lt;br /&gt;
     static_configs:&lt;br /&gt;
       - targets:&lt;br /&gt;
         - 127.0.0.1:9221&lt;br /&gt;
     metrics_path: /pve&lt;br /&gt;
     params:&lt;br /&gt;
       module: [default]&lt;br /&gt;
&amp;lt;code&amp;gt;systemctl restart prometheus&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Import Grafana Dashboard =&lt;br /&gt;
Log in to your Grafana instance, add new Dashboards, press the import button, insert the '''ID 10347''' and click load (You can find the dashboard here: '''&amp;lt;nowiki&amp;gt;https://grafana.com/grafana/dashboards/10347&amp;lt;/nowiki&amp;gt;''')&lt;br /&gt;
&lt;br /&gt;
   -OR-&lt;br /&gt;
&lt;br /&gt;
Download '''proxmox-via-prometheus_rev5.json''' from https://grafana.com/grafana/dashboards/10347 and import it.&lt;br /&gt;
[[Категория:Prometheus]]&lt;br /&gt;
[[Категория:Proxmox]]&lt;br /&gt;
[[Категория:Grafana]]&lt;/div&gt;</summary>
		<author><name>Cless</name></author>
	</entry>
</feed>