Prometheus giving error when trying to enable service #313

Closed
opened 2026-02-04 17:55:40 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @ItzFLKN on GitHub (Jan 11, 2025).

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). ### ✅ 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_
OVERLORD added the bug label 2026-02-04 17:55:40 +03:00
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
@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.

@michelroegl-brunner commented on GitHub (Jan 11, 2025): Fix is merged, try again in 10-15 minutes.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ProxmoxVE#313