Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to run pve-exporter #324

Open
Teacup42 opened this issue Mar 4, 2025 · 2 comments
Open

Unable to run pve-exporter #324

Teacup42 opened this issue Mar 4, 2025 · 2 comments

Comments

@Teacup42
Copy link

Teacup42 commented Mar 4, 2025

When trying to run the image with a mounted configuration file and published port in docker I get an error:

The command I'm using:

sudo docker run --init --name prometheus-pve-exporter -d -p 0.0.0.0:9221:9221 -v /etc/pve/pve.yml:/etc/prometheus/pve.yml prompve/prometheus-pve-exporter

The error I get:

Traceback (most recent call last):
File "/opt/prometheus-pve-exporter/bin/pve_exporter", line 8, in
sys.exit(main())
^^^^^^
File "/opt/prometheus-pve-exporter/lib/python3.12/site-packages/pve_exporter/cli.py", line 84, in main
with open(params.config_file, encoding='utf-8') as handle:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
IsADirectoryError: [Errno 21] Is a directory: '/etc/prometheus/pve.yml'

What could be the issue?

@resmo
Copy link
Contributor

resmo commented Mar 4, 2025

Have you verified your local /etc/pve/pve.yml is not a directory?

@Teacup42
Copy link
Author

Teacup42 commented Mar 4, 2025

Command: file /etc/pve/pve.yml
Output: /etc/pve/pve.yml: ASCII text

Command: stat /etc/pve/pve.yml
Output:
File: /etc/pve/pve.yml
Size: 129 Blocks: 8 IO Block: 4096 regular file
Device: 252,0 Inode: 576839 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2025-03-04 11:56:19.725048549 +0000
Modify: 2025-03-03 13:30:31.435881442 +0000
Change: 2025-03-03 13:30:31.435881442 +0000
Birth: 2025-03-03 13:30:31.435881442 +0000

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants