{"id":34041616,"url":"https://github.com/hrchlhck/kubemon","last_synced_at":"2026-04-01T23:38:01.830Z","repository":{"id":43255357,"uuid":"292637893","full_name":"hrchlhck/kubemon","owner":"hrchlhck","description":"A tool for distributed container monitoring over Kubernetes.","archived":false,"fork":false,"pushed_at":"2024-08-16T23:06:24.000Z","size":2488,"stargazers_count":5,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-15T14:23:14.022Z","etag":null,"topics":["docker","kubemon","kubernetes","monitoring-tool","security"],"latest_commit_sha":null,"homepage":"https://hrchlhck.github.io/kubemon/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hrchlhck.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-03T17:35:45.000Z","updated_at":"2024-09-22T20:11:31.000Z","dependencies_parsed_at":"2024-08-17T00:21:28.310Z","dependency_job_id":null,"html_url":"https://github.com/hrchlhck/kubemon","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/hrchlhck/kubemon","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hrchlhck%2Fkubemon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hrchlhck%2Fkubemon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hrchlhck%2Fkubemon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hrchlhck%2Fkubemon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hrchlhck","download_url":"https://codeload.github.com/hrchlhck/kubemon/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hrchlhck%2Fkubemon/sbom","scorecard":{"id":470393,"data":{"date":"2025-08-11","repo":{"name":"github.com/hrchlhck/kubemon","commit":"55237eb12eddc54a813bc19876268a109d11e7fd"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.8,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/27 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/docker-image.yml:1","Warn: no topLevel permission defined: .github/workflows/python-publish.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/docker-image.yml:9"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/docker-image.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/hrchlhck/kubemon/docker-image.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/docker-image.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/hrchlhck/kubemon/docker-image.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/docker-image.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/hrchlhck/kubemon/docker-image.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/docker-image.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/hrchlhck/kubemon/docker-image.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/docker-image.yml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/hrchlhck/kubemon/docker-image.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-publish.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/hrchlhck/kubemon/python-publish.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-publish.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/hrchlhck/kubemon/python-publish.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/python-publish.yml:33: update your workflow using https://app.stepsecurity.io/secureworkflow/hrchlhck/kubemon/python-publish.yml/main?enable=pin","Warn: containerImage not pinned by hash: Dockerfile:1: pin your Docker image by updating python:3.8-slim to python:3.8-slim@sha256:1d52838af602b4b5a831beb13a0e4d073280665ea7be7f69ce2382f29c5a613f","Warn: pipCommand not pinned by hash: Dockerfile:28","Warn: pipCommand not pinned by hash: .github/workflows/python-publish.yml:28","Warn: pipCommand not pinned by hash: .github/workflows/python-publish.yml:29","Info:   0 out of   3 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   5 third-party GitHubAction dependencies pinned","Info:   0 out of   3 pipCommand dependencies pinned","Info:   0 out of   1 containerImage dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 4 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-19T13:45:36.097Z","repository_id":43255357,"created_at":"2025-08-19T13:45:36.097Z","updated_at":"2025-08-19T13:45:36.097Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31292988,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T21:15:39.731Z","status":"ssl_error","status_checked_at":"2026-04-01T21:15:34.046Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","kubemon","kubernetes","monitoring-tool","security"],"created_at":"2025-12-13T22:04:26.442Z","updated_at":"2026-04-01T23:38:01.822Z","avatar_url":"https://github.com/hrchlhck.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# kubemon\r\nA tool for distributed container monitoring over Kubernetes.\r\n\r\n## Translations\r\n- [Português](./assets/README-pt-br.md)\r\n\r\n## Table of contents\r\n- [Citation](#citation)\r\n- [Environment Requirements](#environment-requirements)\r\n- [Application Requirements](#application-requirements)\r\n- [Illustrations](#illustrations)\r\n- [Main Functionalities](#main-functionalities)\r\n    - [Collected Metrics](#collected-metrics)\r\n- [Installation](#installation)\r\n- [Configuration](#configuration)\r\n- [Running](#running)\r\n    - [Starting](#starting)\r\n    - [Stopping](#stopping)\r\n    - [Commands](#all-the-cli-commands)\r\n- [References](#references)\r\n\r\n## Citation\r\n```bibtex\r\n@inproceedings{Horchulhack2023,\r\n  series = {SBSeg Estendido 2023},\r\n  title = {Kubemon: extrator de métricas de desempenho de sistema operacional e aplica\\c{c}ões conteinerizadas em ambientes de nuvem no domínio do provedor},\r\n  url = {http://dx.doi.org/10.5753/sbseg_estendido.2023.233247},\r\n  DOI = {10.5753/sbseg_estendido.2023.233247},\r\n  booktitle = {Anais Estendidos do XXIII Simpósio Brasileiro de Seguran\\c{c}a da Informa\\c{c}ão e de Sistemas Computacionais (SBSeg Estendido 2023)},\r\n  publisher = {Sociedade Brasileira de Computa\\c{c}ão - SBC},\r\n  author = {Horchulhack,  Pedro and Viegas,  Eduardo K. and Santin,  Altair O. and Ramos,  Felipe V.},\r\n  year = {2023},\r\n  month = sep,\r\n  collection = {SBSeg Estendido 2023}\r\n}\r\n```\r\n\r\n## Environment requirements\r\n- Ubuntu 18.04\r\n- Kubernetes v1.19\r\n- Docker v19.03.13\r\n- Python 3.8\r\n- GNU Make 4.2.1\r\n\r\n## Application requirements\r\n- [psutil](https://github.com/giampaolo/psutil)\r\n- [requests](https://github.com/psf/requests)\r\n- [docker-py](https://github.com/docker/docker-py)\r\n- [virtualenv](https://github.com/pypa/virtualenv)\r\n- [flask](https://github.com/pallets/flask)\r\n- [flask_restfull](https://github.com/flask-restful/flask-restful)\r\n- [gunicorn](https://github.com/benoitc/gunicorn)\r\n\r\n## Illustrations\r\nBasic diagram\r\n![Kubemon diagram](./assets/diagram-en.svg)\r\n\r\n## Main functionalities\r\n- Collect data within the provider domain\r\n- The data are collected within Kubernetes Pods\r\n- Can be configured through Kubernetes environment variables\r\n- Collects metrics from operating system, Docker containers and processes created by the container\r\n- Send the collected metrics to the ```collector``` module, which saves the data in a CSV file\r\n- Can be controlled remotely by either a basic CLI or Python API\r\n\r\n### Collected metrics\r\nFor more information about the collected metrics, please refer to:\r\n- Operating System Metrics: These metrics are collected from linux ```/proc``` filesystem using both ```psutil``` Python API and ```/sys/block/\u003cdev\u003e/stat```.\r\n    - CPU: [Miscellaneous kernel statistics in /proc/stat](https://www.kernel.org/doc/html/latest/filesystems/proc.html#miscellaneous-kernel-statistics-in-proc-stat)\r\n    - Memory: [proc - process information pseudo-filesystem: /proc/vmstat](https://man7.org/linux/man-pages/man5/proc.5.html)\r\n    - Disk : [Block layer statistics in /sys/block/\\\u003cdev\\\u003e/stat](https://www.kernel.org/doc/html/latest/block/stat.html#block-layer-statistics-in-sys-block-dev-stat)\r\n    - Network: [proc - process information pseudo-filesystem: /proc/net/dev](https://man7.org/linux/man-pages/man5/proc.5.html)\r\n- Docker: These metrics are collected from linux ```cgroups```.\r\n    - CPU: [cgroups - Linux control groups: cpu,cpuacct](https://www.man7.org/linux/man-pages/man7/cgroups.7.html)\r\n    - Memory: [cgroups - Linux control groups: memory](https://www.man7.org/linux/man-pages/man7/cgroups.7.html)\r\n    - Disk: [cgroups - Linux control groups: blkio](https://www.man7.org/linux/man-pages/man7/cgroups.7.html)\r\n    - Network: [proc - process information pseudo-filesystem: /proc/net/dev](https://man7.org/linux/man-pages/man5/proc.5.html)\r\n- Docker Processes: These metrics are collected from linux ```/proc``` filesystem using ```psutil``` Python API.\r\n    - CPU: [Miscellaneous kernel statistics in /proc/stat](https://www.kernel.org/doc/html/latest/filesystems/proc.html#miscellaneous-kernel-statistics-in-proc-stat)\r\n    - Memory: [proc - process information pseudo-filesystem: /proc/vmstat](https://man7.org/linux/man-pages/man5/proc.5.html)\r\n    - Disk: [Block layer statistics in /sys/block/\\\u003cdev\\\u003e/stat](https://www.kernel.org/doc/html/latest/block/stat.html#block-layer-statistics-in-sys-block-dev-stat)\r\n    - Network: [proc - process information pseudo-filesystem: /proc/net/dev](https://man7.org/linux/man-pages/man5/proc.5.html)\r\n\r\n#### **Operating System**\r\n|  Type   |  Unit  | Metric |\r\n| ------- | ------ | ------ |\r\n| CPU     | Quantity \u003cbr\u003e Quantity \u003cbr\u003e Quantity \u003cbr\u003e Quantity \u003cbr\u003e Clock Ticks \u003cbr\u003e Clock Ticks \u003cbr\u003e Clock Ticks \u003cbr\u003e Clock Ticks \u003cbr\u003e Clock Ticks \u003cbr\u003e Clock Ticks \u003cbr\u003e Clock Ticks \u003cbr\u003e Clock Ticks \u003cbr\u003e Clock Ticks \u003cbr\u003e | Context Switches \u003cbr\u003e Interrupts \u003cbr\u003e Soft Interrupts \u003cbr\u003e Syscalls \u003cbr\u003e Times User \u003cbr\u003e Times System \u003cbr\u003e Times Nice \u003cbr\u003e Times Softirq \u003cbr\u003e Times IRQ \u003cbr\u003e Times IOWait \u003cbr\u003e Times Guest \u003cbr\u003e Times Guest Nice \u003cbr\u003e Times Idle |\r\n| Memory  | Quantity \u003cbr\u003e Quantity \u003cbr\u003e Quantity \u003cbr\u003e Quantity \u003cbr\u003e Quantity \u003cbr\u003e KB \u003cbr\u003e KB \u003cbr\u003e Quantity \u003cbr\u003e Quantity \u003cbr\u003e Quantity \u003cbr\u003e Quantity \u003cbr\u003e | Active (Anon) \u003cbr\u003e Inactive (Anon) \u003cbr\u003e Inactive (file) \u003cbr\u003e Active (file) \u003cbr\u003e Mapped Pages \u003cbr\u003e KB Paged In Since Boot (pgpgin) \u003cbr\u003e KB Paged Out Since Boot (pgpgout) \u003cbr\u003e Pages Free (pgfree) \u003cbr\u003e Page Faults (pgfault) \u003cbr\u003e Major Page Faults (pgmajfault) \u003cbr\u003e Pages Reused (pgreuse) |\r\n| Disk    | Requests \u003cbr\u003e Requests \u003cbr\u003e Sectors \u003cbr\u003e Milliseconds \u003cbr\u003e Requests \u003cbr\u003e Requests \u003cbr\u003e Sectors \u003cbr\u003e Milliseconds \u003cbr\u003e Requests \u003cbr\u003e Milliseconds \u003cbr\u003e Milliseconds \u003cbr\u003e Requests \u003cbr\u003e Requests \u003cbr\u003e Sectors \u003cbr\u003e Milliseconds \u003cbr\u003e Requests \u003cbr\u003e Milliseconds | Read I/O \u003cbr\u003e Read I/O Merged with In-queue I/O \u003cbr\u003e Read Sectors \u003cbr\u003e Total Wait Time for Read Requests \u003cbr\u003e Write I/O \u003cbr\u003e Write I/O Merged with In-Queue I/O \u003cbr\u003e Write Sectors \u003cbr\u003e Total Wait Time for Write Requests \u003cbr\u003e I/O in Flight \u003cbr\u003e Total Time This Block Device Has Been Active \u003cbr\u003e Total Wait Time for All Requests \u003cbr\u003e Discard I/O Processed  \u003cbr\u003e Discard I/O Processed with In-Queue I/O \u003cbr\u003e Discard Sectors \u003cbr\u003e Total Wait Time for Discard Requests \u003cbr\u003e Flush I/O Processed \u003cbr\u003e Total Wait Time for Flush Requests |\r\n| Network | Bytes \u003cbr\u003e Bytes \u003cbr\u003e Packets \u003cbr\u003e Packets | Sent \u003cbr\u003e Received \u003cbr\u003e Sent \u003cbr\u003e Received |\r\n\r\n#### **Docker Processes**\r\n|  Type   |  Unit  | Metric |\r\n| ------- | ------ | ------ |\r\n| CPU     | Clock Ticks \u003cbr\u003e Clock Ticks \u003cbr\u003e Clock Ticks \u003cbr\u003e Clock Ticks \u003cbr\u003e Clock Ticks \u003cbr\u003e | User Time \u003cbr\u003e System Time \u003cbr\u003e Children User \u003cbr\u003e Children System \u003cbr\u003e IOWait |\r\n| Memory  | Pages \u003cbr\u003e Pages \u003cbr\u003e Pages \u003cbr\u003e Pages \u003cbr\u003e Pages \u003cbr\u003e Pages \u003cbr\u003e Pages \u003cbr\u003e | Total Program Size (size) \u003cbr\u003e Resident Set Size (resident) \u003cbr\u003e Resident Shared Pages (shared) \u003cbr\u003e Text (text) \u003cbr\u003e ~~Library (lib)~~ \u003cbr\u003e Data + Stack (data) \u003cbr\u003e ~~Dirty Pages (dt)~~ |\r\n| Disk    | Requests \u003cbr\u003e Requests \u003cbr\u003e Bytes \u003cbr\u003e Bytes \u003cbr\u003e Chars \u003cbr\u003e Chars \u003cbr\u003e | Read \u003cbr\u003e Write \u003cbr\u003e Read \u003cbr\u003e Write \u003cbr\u003e Read \u003cbr\u003e Write \u003cbr\u003e |\r\n| Network | Bytes \u003cbr\u003e Bytes \u003cbr\u003e Packets \u003cbr\u003e Packets | Sent \u003cbr\u003e Received \u003cbr\u003e Sent \u003cbr\u003e Received |\r\n\r\n#### **Docker**\r\n|  Type   |  Unit  | Metric |\r\n| ------- | ------ | ------ |\r\n| CPU     | Clock Ticks \u003cbr\u003e Clock Ticks \u003cbr\u003e Quantity \u003cbr\u003e Quantity \u003cbr\u003e Clock Ticks \u003cbr\u003e | User \u003cbr\u003e System \u003cbr\u003e Periods \u003cbr\u003e Throttled \u003cbr\u003e Throttled Time \u003cbr\u003e |\r\n| Memory  | Pages \u003cbr\u003e Pages \u003cbr\u003e Pages \u003cbr\u003e Pages \u003cbr\u003e Pages \u003cbr\u003e Pages \u003cbr\u003e Pages \u003cbr\u003e Pages \u003cbr\u003e Pages \u003cbr\u003e Pages \u003cbr\u003e Pages \u003cbr\u003e Pages \u003cbr\u003e | Resident Set Size (rss) \u003cbr\u003e Chached \u003cbr\u003e Mapped (mapped_file) \u003cbr\u003e Paged In (pgpgin) \u003cbr\u003e Paged Out (pgpgout) \u003cbr\u003e Page Faults (pgfault) \u003cbr\u003e Major Page Faults (pgmajfault) \u003cbr\u003e Active (active_anon) \u003cbr\u003e Inactive (inactive_anon) \u003cbr\u003e Active File (active_file)\u003cbr\u003e Inactive File (inactive_file) \u003cbr\u003e Unevictable \u003cbr\u003e |\r\n| Disk    | Bytes \u003cbr\u003e Bytes \u003cbr\u003e Bytes \u003cbr\u003e Bytes \u003cbr\u003e Bytes \u003cbr\u003e Bytes \u003cbr\u003e | Read \u003cbr\u003e Write \u003cbr\u003e Sync \u003cbr\u003e Async \u003cbr\u003e Discard \u003cbr\u003e Total \u003cbr\u003e |\r\n| Network | Bytes \u003cbr\u003e Bytes \u003cbr\u003e Packets \u003cbr\u003e Packets | Sent \u003cbr\u003e Received \u003cbr\u003e Sent \u003cbr\u003e Received |\r\n\r\n## Installation\r\nBefore installing Kubemon, make sure Kubernetes and Docker are properly installed in the system.\r\n\r\n1. Download the latest version here: [kubemon](https://github.com/hrchlhck/kubemon/zipball/main) \r\n\r\n2. Extract the zip file and go on the extracted directory\r\n\r\n3. Update the ```nodeName``` field in ```kubernetes/04_collector.yaml``` to your the name of your Kubernetes control-plane node.\r\n\r\n4. Apply the Kubernetes objects within ```kubernetes/```:\r\n    ```sh\r\n    $ kubectl apply -f kubernetes/\r\n    namespace/kubemon created\r\n    configmap/kubemon-env created\r\n    persistentvolume/kubemon-volume created\r\n    persistentvolumeclaim/kubemon-volume-claim created\r\n    service/collector created\r\n    service/monitor created\r\n    pod/collector created\r\n    daemonset.apps/kubemon-monitor created\r\n    ```\r\n\r\nThe following subsection will detail about how to configure and execute the data collecting process.\r\n\r\n## Configuration\r\nKubemon has a few variables that can be defined by the user. For instance, some of the required fields to be configured before running the tool is ```NUM_DAEMONS```, which denotes the expected amount of ```client``` instances should be connected to the ```collector``` component. In addition, the Kubemon components are configured through environment variables inside the Kubernetes pods.\r\n\r\nThe configuration file is at ```kubernetes/01_configmap.yaml```. At the current version of Kubemon, the configmap lists all the configurable variables. You can update according to your needs.\r\n\r\nThe collected metrics will be saved in the Kubernetes control-plane node by default, in ```/mnt/kubemon-data```. This setting can be changed in ```./kubernetes/02_volumes.yaml``` by updating the ```hostPath``` field. \r\n\r\nExample: \r\n```yaml\r\n# Before\r\n...\r\nhostPath:\r\n    path: \"/mnt/kubemon-data\"\r\n    \r\n# After\r\n...\r\nhostPath:\r\n    path: \"/home/user/data\"\r\n```\r\n\r\n## Running\r\n### Starting\r\nTo start the collecting process, you can either start the CLI or execute commands within Python. \r\n\r\nExample with the CLI:\r\n```sh\r\n$ make cli host=10.0.1.2\r\nWaiting for collector to be alive\r\nCollector is alive!\r\n\u003e\u003e\u003e start test000\r\nStarting 2 daemons and saving data at 10.0.1.2:/home/kubemon/output/data/test000\r\n```\r\n\r\nExample by using the CLI API within Python:\r\n```python\r\n\u003e\u003e\u003e from kubemon.collector import CollectorClient\r\n\u003e\u003e\u003e from kubemon.settings import CLI_PORT\r\n\u003e\u003e\u003e \r\n\u003e\u003e\u003e cc = CollectorClient('10.0.1.2', CLI_PORT)\r\n\u003e\u003e\u003e cc.start('test000')\r\nStarting 2 daemons and saving data at 10.0.1.2:/home/kubemon/output/data/test000\r\n```\r\n\r\n### Stopping\r\n\r\nWithin the CLI:\r\n```sh\r\n\u003e\u003e\u003e stop\r\nStopped collector\r\n```\r\n\r\nUsing the API:\r\n```python\r\n...\r\n\u003e\u003e\u003e cc.stop()\r\nStopped collector\r\n```\r\n\r\n### All the CLI commands:\r\nYou can retrieve all the implemented commands by either typing ```help``` within the CLI prompt or by running ```.help()``` method from the API.\r\n\r\nAll the commands:\r\n```\r\n'start': Start collecting metrics from all connected daemons in the collector.\r\n\r\n    Args:\r\n        - Directory name to be saving the data collected. Ex.: start test000\r\n    \r\n'instances': Lists all the connected monitor instances.\r\n    \r\n'daemons': Lists all the daemons (hosts) connected.\r\n    \r\n'stop': Stop all monitors if they're running.\r\n    \r\n'help': Lists all the available commands.\r\n    \r\n'alive': Tells if the collector is alive.\r\n```\r\n\r\n## References\r\n- [Block layer statistics](https://www.kernel.org/doc/html/latest/block/stat.html)\r\n- [/proc virtual file system](https://man7.org/linux/man-pages/man5/proc.5.html)\r\n- [Evaluation of desktop operating systems under thrashing conditions](https://journal-bcs.springeropen.com/track/pdf/10.1007/s13173-012-0080-8.pdf)\r\n- [cgroups](https://www.man7.org/linux/man-pages/man7/cgroups.7.html)\r\n- [Docker runtime metrics](https://docs.docker.com/config/containers/runmetrics/)\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhrchlhck%2Fkubemon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhrchlhck%2Fkubemon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhrchlhck%2Fkubemon/lists"}