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

Prometheus giving error when trying to enable service #1412

Closed
1 of 2 tasks
ItzFLKN opened this issue Jan 11, 2025 · 2 comments
Closed
1 of 2 tasks

Prometheus giving error when trying to enable service #1412

ItzFLKN opened this issue Jan 11, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@ItzFLKN
Copy link

ItzFLKN commented 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

@dolomiti70
Copy link

dolomiti70 commented 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

@michelroegl-brunner
Copy link
Member

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

@michelroegl-brunner michelroegl-brunner added the bug Something isn't working label Jan 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants