Skip to main content

Metal Metrics

Project description

metalmetrics

Actions Status Docker License PyPI Tag

Introduction

metalmetrics is a worker of metalflow written in Python.

Requirement

  • Python >= 3.7

Run

  • Local mode

    git clone https://github.com/craftslab/metalmetrics-py.git
    
    cd metalmetrics-py
    pip install -Ur requirements.txt
    python metrics.py --config-file="config.yml" --output-file="output.json"
    
  • Service mode

    git clone https://github.com/craftslab/metalmetrics-py.git
    
    cd metalmetrics-py
    pip install -Ur requirements.txt
    python metrics.py --config-file="config.yml" --listen-url="127.0.0.1:9090"
    

Docker

  • Local mode

    git clone https://github.com/craftslab/metalmetrics-py.git
    
    cd metalmetrics-py
    docker build --no-cache -f Dockerfile -t craftslab/metalmetrics-py:latest .
    docker run -it -v /tmp:/tmp craftslab/metalmetrics-py:latest ./metalmetrics --config-file="config.yml" --output-file="/tmp/output.json"
    
  • Service mode

    git clone https://github.com/craftslab/metalmetrics-py.git
    
    cd metalmetrics-py
    docker build --no-cache -f Dockerfile -t craftslab/metalmetrics-py:latest .
    docker run -it -p 9090:9090 craftslab/metalmetrics-py:latest ./metalmetrics --config-file="config.yml" --listen-url="127.0.0.1:9090"
    

Usage

usage: metrics.py [-h] --config-file CONFIG_FILE
                  [--listen-url LISTEN_URL | --output-file OUTPUT_FILE] [-v]

Metal Metrics

optional arguments:
  -h, --help            show this help message and exit
  --config-file CONFIG_FILE
                        config file (.yml)
  --listen-url LISTEN_URL
                        listen url (host:port)
  --output-file OUTPUT_FILE
                        output file (.json|.txt|.xlsx)
  -v, --version         show program's version number and exit

Settings

metalmetrics parameters can be set in the directory config.

An example of configuration in config.yml:

apiVersion: v1
kind: Deployment
metadata:
  name: metalmetrics
spec:
  bare:
    - cpu
    - disk
    - io
    - ip
    - kernel
    - mac
    - network
    - os
    - ram
  container:
  kubernetes:

Design

design

License

Project License can be found here.

Reference

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

metalmetrics-4.0.0.tar.gz (15.5 kB view hashes)

Uploaded Source

Built Distribution

metalmetrics-4.0.0-py2.py3-none-any.whl (19.6 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page