[GH-ISSUE #1412] Prometheus giving error when trying to enable service #314

Closed
opened 2026-02-26 12:45:05 +03:00 by kerem · 2 comments
Owner

Originally created by @ItzFLKN on GitHub (Jan 11, 2025).
Original GitHub issue: https://github.com/community-scripts/ProxmoxVE/issues/1412

Have you read and understood the above guidelines?

yes

📜 What is the name of the script you are using?

Prometheus

📂 What was the exact command used to execute the script?

bash -c "$(wget -qLO - https://github.com/community-scripts/ProxmoxVE/raw/main/ct/prometheus-alertmanager.sh)"

📝 Provide a clear and concise description of the issue.

When running the script I am using the same advanced settings as other LXCs I've created but this one isn't working for some reason. It is giving this:

Failed to enable unit: Unit file prometheus.service does not exist.

[ERROR] in line 54: exit code 0: while executing command systemctl enable -q --now prometheus

⚙️ What settings are you using?

  • Default Settings
  • Advanced Settings

🖥️ Which Linux distribution are you using?

Debian 12

🔄 Steps to reproduce the issue.

Step 1: Put the script in the console

Step 2: hit enter and configure the advanced settings to your network

step 3: watch it error out.

Paste the full error output (if available).

Failed to enable unit: Unit file prometheus.service does not exist.

[ERROR] in line 54: exit code 0: while executing command systemctl enable -q --now prometheus

🖼️ Additional context (optional).

No response

Originally created by @ItzFLKN on GitHub (Jan 11, 2025). Original GitHub issue: https://github.com/community-scripts/ProxmoxVE/issues/1412 ### ✅ Have you read and understood the above guidelines? yes ### 📜 What is the name of the script you are using? Prometheus ### 📂 What was the exact command used to execute the script? bash -c "$(wget -qLO - https://github.com/community-scripts/ProxmoxVE/raw/main/ct/prometheus-alertmanager.sh)" ### 📝 Provide a clear and concise description of the issue. When running the script I am using the same advanced settings as other LXCs I've created but this one isn't working for some reason. It is giving this: Failed to enable unit: Unit file prometheus.service does not exist. [ERROR] in line 54: exit code 0: while executing command systemctl enable -q --now prometheus ### ⚙️ What settings are you using? - [ ] Default Settings - [X] Advanced Settings ### 🖥️ Which Linux distribution are you using? Debian 12 ### 🔄 Steps to reproduce the issue. Step 1: Put the script in the console Step 2: hit enter and configure the advanced settings to your network step 3: watch it error out. ### ❌ Paste the full error output (if available). Failed to enable unit: Unit file prometheus.service does not exist. [ERROR] in line 54: exit code 0: while executing command systemctl enable -q --now prometheus ### 🖼️ Additional context (optional). _No response_
kerem 2026-02-26 12:45:05 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@dolomiti70 commented on GitHub (Jan 11, 2025):

Same here. Whether with standard settings or with advanced settings.

I would expect the service to be created after the message “"Installed Prometheus” according to the script https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/install/prometheus-install.sh
, but this message does not appear.
For me it looks like that the following code ist not executed

msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/prometheus.service"
echo "[Unit]
Description=Prometheus
Wants=network-online.target
After=network-online.target

[Service]
User=root
Restart=always
Type=simple
ExecStart=/usr/local/bin/prometheus \
    --config.file=/etc/prometheus/prometheus.yml \
    --storage.tsdb.path=/var/lib/prometheus/ \
    --web.listen-address=0.0.0.0:9090
ExecReload=/bin/kill -HUP \$MAINPID

[Install]
WantedBy=multi-user.target"
EOF
<!-- gh-comment-id:2584967164 --> @dolomiti70 commented on GitHub (Jan 11, 2025): Same here. Whether with standard settings or with advanced settings. I would expect the service to be created after the message “"Installed Prometheus” according to the script `https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/install/prometheus-install.sh` , but this message does not appear. For me it looks like that the following code ist not executed ``` msg_info "Creating Service" cat <<EOF >/etc/systemd/system/prometheus.service" echo "[Unit] Description=Prometheus Wants=network-online.target After=network-online.target [Service] User=root Restart=always Type=simple ExecStart=/usr/local/bin/prometheus \ --config.file=/etc/prometheus/prometheus.yml \ --storage.tsdb.path=/var/lib/prometheus/ \ --web.listen-address=0.0.0.0:9090 ExecReload=/bin/kill -HUP \$MAINPID [Install] WantedBy=multi-user.target" EOF ```
Author
Owner

@michelroegl-brunner commented on GitHub (Jan 11, 2025):

Fix is merged, try again in 10-15 minutes.

<!-- gh-comment-id:2585151339 --> @michelroegl-brunner commented on GitHub (Jan 11, 2025): Fix is merged, try again in 10-15 minutes.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ProxmoxVE#314
No description provided.