diff --git a/Dockerfile b/Dockerfile index 38dfd23..066dad8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ ARG TARGETPLATFORM ARG BUILDPLATFORM LABEL authors="tebarius" -LABEL version="0.2.0" +LABEL version="0.2.1" LABEL description="netdata-DocRudi" WORKDIR /app diff --git a/README.md b/README.md index 1d9d604..4ec82e1 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,8 @@ DocRudi is a flask-app that uses plotly (https://plotly.com/) to display graphs of CPU-Utilization and Memory-Use of Docker-Containers by getting this metrics from netdata (https://www.netdata.cloud). +![Screenshot.png](Screenshot.png) + ## build to build container from source: 1. clone repository diff --git a/Screenshot.png b/Screenshot.png new file mode 100644 index 0000000..c8f25c6 Binary files /dev/null and b/Screenshot.png differ diff --git a/app/netdata_DocRudi.py b/app/netdata_DocRudi.py index fe2ffb8..c883b00 100755 --- a/app/netdata_DocRudi.py +++ b/app/netdata_DocRudi.py @@ -44,8 +44,10 @@ def get_docker_data(q_context, q_dimension): def process_label(label): parts = label.split('@')[0].split('.') if parts and parts[0].startswith('cgroup_'): - if parts[1] =='mem_usage': + if parts[1].startswith('mem_usage'): return f'mem_{parts[0][7:]}' + elif parts[1].startswith('cpu'): + return f'cpu_{parts[0][7:]}' else: return f'{parts[1]}_{parts[0][7:]}' return label diff --git a/app/templates/index.html b/app/templates/index.html index eade7af..9566172 100644 --- a/app/templates/index.html +++ b/app/templates/index.html @@ -6,10 +6,10 @@ {% if site_refresh > 0 %} {% endif %} - Docker Container CPU-Nutzung + DocRudi -

Docker Container CPU/MEM from netdata: {{ netdata_host }}

+

DocRudi: CPU/MEM from netdata: {{ netdata_host }}

{{ plot | safe }};