About

pulse is a client-server host-monitoring project. A containerized client collects host metrics and reports them to a containerized server. Both follow POSIX, the Portable Operating System Interface standard, and are shell scripts built on the shellbase framework.

Description

Both the client and the server run on the alpine base image. Every five seconds the client sends the following data to the server:

  • Host uptime

  • Host network interface names and IPv4 addresses

The server stores the received data in a database. After every fifth update, the server sends the client a die message. The client then terminates, and the container runtime restarts it.

Usage

Build and start the containers with Podman Compose:

# Starts the Podman VM.
podman machine start

# Builds both images and starts the containers.
podman-compose up --build

# Stops and removes the containers.
podman-compose down

# Stops the Podman VM.
podman machine stop

Test

The project uses Daniel J. Bernstein’s build system, redo. You can install Sergey Matveev’s goredo implementation. redo test builds both images and runs a round-trip check with Podman Compose. redo lint applies the following linters to the source files: actionlint, hadolint, reuse, shellcheck, shfmt, typos, yamllint, zizmor. It also parses each script with dash and mksh to reject syntax the project’s target shells do not accept.

License

pulse belongs to David Rabkin and is licensed under the Zero-Clause BSD license.