Skip to content

Releases: Lifailon/logporter

1.5.0

Choose a tag to compare

@Lifailon Lifailon released this 12 Oct 15:36
  • Added the ability to view container logs on the Dashboard, featuring filtering (exact match, AND, OR, regex modes), context display (showing +/- 1 line around the match), keyword highlighting, and a timeline view.
  • Updated CPU, NET, and IO cards to display values ​​as percentages, added per-container values ​​to the table and aggregate metrics (accounting for the number of CPU cores) to the Dashboard cards.
  • Added optional authentication for the Dashboard. Credentials are configured via environment variables (DASHBOARD_USERNAME and DASHBOARD_PASSWORD), and session duration before re-authentication is controlled by DASHBOARD_AUTH_TTL (in seconds).
  • Added gzip compression for all requests, provided the client supports it.
  • Added unit tests with 98% coverage using OpenCode AI.
  • Added DOCKER_METRICS_HOST to configure listen host/ip by @runalsh in #26
  • Bump github.com/google/go-containerregistry from 0.22.0 to 0.22.1 in the go-dependencies group by @dependabot[bot] in #27

1.4.0

Choose a tag to compare

@Lifailon Lifailon released this 09 Sep 10:42
0e3679f

1.4.0

  • #23 Added a built-in Dashboard - interface based on go-template that does not impact exporter performance, as it renders cached data
  • #22 Fixed a panic during image tag parsing
  • #21 Updated dependencies via Dependabot

Fixes in patch versions

1.3.1

  • Updated image parsing to use the ParseReference method from the go-containerregistry package
  • Updated the default registry address to the value defined in the Docker socket settings

1.3.2

  • Added createdTime and remoteTime labels to image metrics
  • Added a /health endpoint to check the Docker daemon, and integrated a healthcheck mode into the binary for self-checking the scratch image
  • Added context with a timeout to all Docker API calls to handle request hangs
  • Fixed the return of semantic tags in their original format

1.3.0

Choose a tag to compare

@Lifailon Lifailon released this 03 Sep 17:38

Added a search for new versions of downloaded images from remote registries using two methods:

  • Semantic tag analysis (default for all images) using the SemVer library and go-containerregistry to retrieve a list of tags from a remote repository.
  • #20 Digest-based (sha sum verification) if the tag is not semantic.

#18 Added custom labels for all container metrics via the DOCKER_METRICS_CUSTOM_LABELS environment variable (e.g. org.opencontainers.image.version), and added image usage labels (imageUsage and imageContainers) and volume usage labels (volumeUsage and volumeContainers) for track usage to container.

#19 New metrics added:

  • docker_image_update - Image update status based on digests: update required (1) or latest version (0)
  • docker_image_count - Number of images
  • docker_container_running_count - Number of running containers
  • docker_container_stopped_count - Number of stopped containers
  • docker_container_healthy - Health check status
  • docker_exit_code - Container exit code
  • docker_oom_killed - Memory limit exceeded
  • docker_size_rw - Size of the container writable layer in bytes
  • docker_size_root_fs - Total size of the container filesystem in bytes (shared image layers and writable layer)
  • docker_bind_mounts - Number of volumes mounted on host file system
  • docker_volume_mounts - Number of local volumes mounted
  • docker_cpu_total_number - Total available vCPUs
  • docker_memory_total - Total memory size in bytes
  • docker_memory_current_limit - Current memory limit size in bytes (if no value is specified, the total amount of available memory is displayed)
  • docker_memory_inspect_limit - Memory limit size in bytes specified in the launch options (if the value is 0, then no limit is set)

1.2.0

Choose a tag to compare

@Lifailon Lifailon released this 12 Aug 19:50
  • #17 Added log collector and sending to Loki
  • Tuned final Docker image by switching to scratch (image size reduced from 10 MB to 6 MB)
  • All exporter code (retrieving metrics from the Docker API) moved to internal packages
  • Updated Prometheus alert rules template
  • Optimized Grafana Dashboard - added a list of alerts and eliminated duplicate containers when restarting them

1.1.0

Choose a tag to compare

@Lifailon Lifailon released this 31 Jul 22:45

70K downloads on Docker Hub and user feedback motivated me to release this version, thanks to all the contributors ❤️

What's Changed

  • #1 @tobiashering added example of using Docker Socket Proxy in PR #5
  • #2 @jpsutton fixed in PR #3
  • #6 Fixed a bug that caused the container to stop with a panic when receiving an empty value
  • #7 @DragonCat1 fixed in PR #11
  • #8 Added compose labels with a check for their presence (e.g. docker_cpu_usage_total{containerId="fa36c50bc0bc6eddc930062c90770b592681ea4ad574b14f6acbedf1a303cb22",containerName="prometheus",composeProject="logporter",composeService="prometheus",composeWorkDir="/home/runner/work/logporter/logporter",hostname="runnervm3jd5f"} 0.085677)
  • #9 Added a new docker_container_status metric for each container, showing its status: running (1) or stopped (0), and removed the docker_containers_up_count and docker_containers_down_count metrics
  • #10 Improved overall performance by caching all collected metrics when polling at intervals longer than 15 seconds by default (caching time can be changed using the DOCKER_METRICS_CACHE variable and the recommended scrape time)
  • #10 Changed the method for retrieving the number of log entries since the last poll (using the since parameter), which reduced the log retrieval time by half. The first poll at startup collects all logs since the start, after which the counter accumulates
  • #10 Added a worker for collecting metrics in the background with its own cache (the caching time can be changed using the DOCKER_METRICS_LOG_CACHE variable; the default is 15 seconds), allowing for the collection of custom metrics without delay
  • #10 Improved memory consumption performance when calculating the number of logs metric
  • #12 Added a new metric with a list of all images and their size in the value
  • #12 Added a new metric containing a list of all volumes and their size in the value retrieved by background workers (by default, the metric cache is 15 minutes, which can be changed using the DOCKER_METRICS_VOLUME_CACHE variable)
  • Hostname and port have been moved to environment variables
  • Expanded logging (added duration for background workers) and updated logger to slog
  • Added Action Workflows for CI (build image, check metrics and publish on Docker Hub)
  • #14 Added opencode to AI Workflow for code review
  • Added documentation for quickly starting a monitoring stack with automatic configuration of Prometheus and Grafana with a single command
  • #15 Updated the list of metrics for documentation using AI from Actions
  • #16 DOCKER_METRICS_LOG mode is disabled by default due to increased resource consumption