8000 GitHub - Lifailon/logporter: A simple and lightweight alternative to cAdvisor for getting basic Docker container metrics as well as custom metrics (e.g. container uptime and number of logged messages).
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

A simple and lightweight alternative to cAdvisor for getting basic Docker container metrics as well as custom metrics (e.g. container uptime and number of logged messages).

License

Notifications You must be signed in to change notification settings

Lifailon/logporter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

logporter

A simple and lightweight alternative to cAdvisor for getting basic Docker container metrics as well as custom metrics (e.g. container uptime and number of logged messages).

Why collect log counts?

  • Compare the increased load with the number of logged messages.
  • If the application is not resource-intensive, the number of logged messages will show the increased load.
  • Speed ​​up log analysis by displaying at what point in time the most messages were received from the standard and error stream.

Roadmap

  • Functions for extracting basic and custom metrics
  • Converting metrics to Prometheus format
  • HTTP server and logging
  • Error handling (check for missing data)
  • Getting data in a goroutine
  • Grafana Dashboard
  • Docker image
  • Testing

Build

Build the Docker image yourself (optional):

git clone https://github.com/Lifailon/logporter
cd logporter
docker build -t lifailon/logporter .
# or build for different architectures
docker buildx build --platform linux/amd64,linux/arm64 .

Install

  • Run the exporter in a container using an image from Docker Hub:
docker run -d --name logporter \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -p 9333:9333 \
  --restart=unless-stopped \
  lifailon/logporter:latest
  • Connect the new target in the prometheus.yml configuration:
scrape_configs:
  - job_name: logporter
    scrape_interval: 5s
    scrape_timeout: 5s
    static_configs:
      - targets:
        - localhost:9333

Important

If you notice a bug in PromQL queries or want to improve the Grafana dashboard, create a new issue or make the changes yourself using a Pull Request.

About

A simple and lightweight alternative to cAdvisor for getting basic Docker container metrics as well as custom metrics (e.g. container uptime and number of logged messages).

Topics

Resources

License

Stars

Watchers

Forks

Languages

0