0

I tried to install grafana-agent by this command that I get grafana.net dashboard:

ARCH="amd64" GCLOUD_HOSTED_METRICS_URL="https://prometheus-prod-24-prod-eu-west-2.grafana.net/api/prom/push" GCLOUD_HOSTED_METRICS_ID="1033967" GCLOUD_SCRAPE_INTERVAL="60s" GCLOUD_HOSTED_LOGS_URL="https://logs-prod-012.grafana.net/loki/api/v1/push" GCLOUD_HOSTED_LOGS_ID="618877" GCLOUD_RW_API_KEY="glc_eyJvIjoiODc2MDkxIiwibiI6ImNvbnRhYm8tc3Vlbm90LTEiLCJrIjoiMHdHMmJYYzVaRmdzOTcyNXdxM0ZGNThpIiwibSI6eyJyIjoicHJvZC1ldS13ZXN0LTIifX0=" /bin/sh -c "$(curl -fsSL https://storage.googleapis.com/cloud-onboarding/agent/scripts/grafanacloud-install.sh)"

But service didn't start correctly.

sudo systemctl status grafana-agent.service 
● grafana-agent.service - Monitoring system and forwarder
   Loaded: loaded (/usr/lib/systemd/system/grafana-agent.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Mon 2023-06-12 11:19:00 CEST; 1min 5s ago
     Docs: https://grafana.com/docs/agent/latest/
  Process: 907 ExecStart=/usr/bin/grafana-agent --config.file $CONFIG_FILE $CUSTOM_ARGS (code=exited, status=1/FAILURE)
 Main PID: 907 (code=exited, status=1/FAILURE)

Jun 12 11:19:00 vmi865508.contaboserver.net systemd[1]: grafana-agent.service: Service hold-off time over, scheduling restart.
Jun 12 11:19:00 vmi865508.contaboserver.net systemd[1]: grafana-agent.service: Scheduled restart job, restart counter is at 5.
Jun 12 11:19:00 vmi865508.contaboserver.net systemd[1]: Stopped Monitoring system and forwarder.
Jun 12 11:19:00 vmi865508.contaboserver.net systemd[1]: grafana-agent.service: Start request repeated too quickly.
Jun 12 11:19:00 vmi865508.contaboserver.net systemd[1]: grafana-agent.service: Failed with result 'exit-code'.
Jun 12 11:19:00 vmi865508.contaboserver.net systemd[1]: Failed to start Monitoring system and forwarder.

I tried systemctl reset-failed grafana-agent.service. It didn't help.

Environment:

Ubuntu 18.04.6 LTS
root user

1 Answers1

0

Maybe the problem is here: grafana-agent.service: Start request repeated too quickly.

To solve this, edit the /etc/systemd/system.conf file. You can set it with:

StartLimitIntervalSec=30s
StartLimitBurst=10
RestartSec=500ms

After this, reload the systemctl daemon with systemctl daemon-reload

You can find more details on this answer.

Arrow Root
  • 102
  • 11