systemd-state

command module
v1.3.184 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 15, 2024 License: MIT Imports: 12 Imported by: 0

README

systemd state http server

Docker image size CLA assistant

A small HTTP server exposing the overall state of systemd.

Equivalent to systemctl is-system-running.

The server will answer with the following HTTP status codes:

  • 200 OK: The system is fully operational.
  • 503 Internal Server error: If the system is in any other state
  • 500 Service Unavailable: If we could not determine the systemd state

What is the purpose of this

This is a "poor mans" monitoring solution.

It has been created to expose the overall system state to monitoring solutions such as Pingdom or StatusCake.

Docker image

There is a Docker image at Docker Hub.

The status is not protected by HTTPS or authentication

You are right. It is exposed on HTTP without any authentication. I have chosen the same stance as Prometheus on this. See Prometheus' FAQ.

Personally I have placed systemd-state behind Træfik with basic authentication.

Example docker-compose configuration with traefik

Exposing the status on https://example.com/_systemd:

version: "2"

services:
  systemd:
    image: arnested/systemd-state
    volumes:
      - '/run/systemd/:/run/systemd/:ro'
    restart: always
    labels:
      - 'traefik.frontend.auth.basic=foo:$$apr1$$WCYo2XY2$$7PDdo922necZuGkMAeTI70'
      - "traefik.port=80"
      - "traefik.enable=true"
      - "traefik.frontend.rule=Host:example.com;Path:/_systemd"
    networks:
      - web

networks:
  web:
    external:
      name: traefik_webgateway

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL