HackerTrans
トップ新着トレンドコメント過去質問紹介求人

twinpeak

no profile record

コメント

twinpeak
·2 年前·議論


  Location: New Zealand
  Remote: Yes (flexible with time zones)
  Willing to relocate: No
  Technologies: PHP, Go, CFML, Vue, Tailwind, Postgres, MySQL, AWS (EC2, ECS Fargate, RDS, Lambda, Route53, CloudFront, S3, OpenSearch), ElasticSearch, Kibana, Grafana, Terraform, Puppet, Redis, Kafka
  Résumé/CV: https://linkedin.com/in/indygriffiths
  Email: hi+hn [at] indy.nz
---

Tech lead + site reliability engineer who enjoys working with high-traffic and high-availability systems with a particular passion for anything observability related. Based out of New Zealand (GMT+13) with previous remote working experience across different time zones.
twinpeak
·2 年前·議論
Recently discovered while making a monitoring script that systemd exposes a few properties that can be used to alert on a service that is continuously failing to start if it's set to restart indefinitely.

    # Get the number of restarts for a service to see if it exceeds an arbitrary threshold.
    systemctl show -p NRestarts "${SYSTEMD_UNIT}" | cut -d= -f2

    # Get when the service started, to work out how long it's been running, as the restart counter isn't reset once the service does start successfully.
    systemctl show -p ActiveEnterTimestamp "${SYSTEMD_UNIT}" | cut -d= -f2

    # Clear the restart counter if the service has been running for long enough based on the timestamp above
    systemctl reset-failed "${SYSTEMD_UNIT}"