Metadata-Version: 2.1
Name: metricq-tools
Version: 0.3.1
Summary: Useful scripts to manage and inspect a MetricQ instance
Home-page: https://github.com/metricq/metricq-tools
Author: TU Dresden
License: GPL3
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: metricq (~=4.0)
Requires-Dist: click
Requires-Dist: click-log
Requires-Dist: click-completion
Requires-Dist: async-timeout (~=3.0)
Requires-Dist: humanize (~=2.5)
Requires-Dist: python-dateutil (~=2.8)
Requires-Dist: numpy
Requires-Dist: termplotlib
Requires-Dist: tabulate
Provides-Extra: dev
Requires-Dist: pytest ; extra == 'dev'
Requires-Dist: black (==22.10.0) ; extra == 'dev'
Requires-Dist: flake8 ; extra == 'dev'
Requires-Dist: isort (~=5.0) ; extra == 'dev'
Requires-Dist: check-manifest ; extra == 'dev'
Requires-Dist: pre-commit ; extra == 'dev'
Requires-Dist: tox ; extra == 'dev'
Provides-Extra: lint
Requires-Dist: black (==22.10.0) ; extra == 'lint'
Requires-Dist: flake8 ; extra == 'lint'
Requires-Dist: isort (~=5.0) ; extra == 'lint'
Requires-Dist: check-manifest ; extra == 'lint'
Requires-Dist: pre-commit ; extra == 'lint'
Provides-Extra: test
Requires-Dist: pytest ; extra == 'test'

MetricQ Tools
=============

![License: GPLv3](https://img.shields.io/badge/License-GPLv3-yellow)
[![Build](https://github.com/metricq/metricq-tools/actions/workflows/package.yml/badge.svg)](https://github.com/metricq/metricq-tools/actions/workflows/package.yml)
![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)
[![PyPI](https://img.shields.io/pypi/v/metricq-tools)](https://pypi.org/project/metricq-tools/)
![PyPI - Wheel](https://img.shields.io/pypi/wheel/metricq-tools)

Tools and utility scripts to monitor and administrate a MetricQ network.

This repository includes a Python package that installs the following
executables:

`metricq-check`
---------------

Uses the aggregation of persisted metric values to quickly check, if it contains non-finite values like +/-inf and NaN.

```
Usage: metricq-check [OPTIONS]

  Check metrics for non-finite values.

Options:
  -v, --verbosity LVL  Either CRITICAL, ERROR, WARNING, INFO or DEBUG
  --server URL         MetricQ server URL.  [default: amqp://localhost/]
  --help               Show this message and exit.
```

`metricq-discover`
------------------

Send an RPC broadcast on the MetricQ network and wait for replies from clients that are currently online.

```
Usage: metricq-discover [OPTIONS]

  Send an RPC broadcast on the MetricQ network and wait for replies from online
  clients.

Options:
  --version                   Show the version and exit.
  --server URL                MetricQ server URL.  [default:
                              amqp://localhost/]
  -d, --diff JSON_FILE        Show a diff to a list of previously discovered
                              clients (produced with --format=json)
  -t, --timeout DURATION      Wait at most this long for replies.
  --format (pretty|json)      Print results in this format  [default:
                              (pretty)]
  --ignore (error-responses)  Messages to ignore.
  -v, --verbosity LVL         Either CRITICAL, ERROR, WARNING, INFO or DEBUG
  --help                      Show this message and exit.
```

`metricq-inspect`
-----------------

Consumes new data points for the given metric as they are submitted to the network, prints a statistical overview on exit.

```
Usage: metricq-inspect [OPTIONS] METRIC

  Live metric data analysis and inspection on the MetricQ network.

  Consumes new data points for the given metric as they are submitted to the
  network, prints a statistical overview on exit.

Options:
  --server URL                    MetricQ server URL.  [default:
                                  amqp://localhost/]
  --token CLIENT_TOKEN            A token to identify this client on the
                                  MetricQ network.  [default: metricq-inspect]
  -i, --intervals-histogram / -I, --no-intervals-histogram
                                  Show an histogram of the observed
                                  distribution of durations between data
                                  points.
  -h, --values-histogram / -H, --no-values-histogram
                                  Show an histogram of the observed metric
                                  values.
  -c, --chunk-sizes-histogram / -C, --no-chunk-sizes-histogram
                                  Show an histogram of the observed chunk
                                  sizes of all messages received.
  -d, --print-data-points / -D, --no-print-data-points
  -v, --verbosity LVL             Either CRITICAL, ERROR, WARNING, INFO or
                                  DEBUG
  --version                       Show the version and exit.
  --help                          Show this message and exit.
```

`metricq-send`
--------------

Send a single time-value pair for the given metric.

```
Usage: metricq-send [OPTIONS] METRIC VALUE

  Send a single time-value pair for the given metric.

Options:
  -v, --verbosity LVL    Either CRITICAL, ERROR, WARNING, INFO or DEBUG
  --version              Show the version and exit.
  --server URL           MetricQ server URL.  [default: amqp://localhost/]
  --token CLIENT_TOKEN   A token to identify this client on the MetricQ
                         network.  [default: source-send]
  --timestamp TIMESTAMP  Timestamp to send.  [default: (now)]
  --help                 Show this message and exit.
```

`metricq-spy`
-------------

Obtain metadata and storage location for a set of metrics.

```
Usage: metricq-spy [OPTIONS] METRICS...

  Obtain metadata and storage location for a set of metrics.

Options:
  -v, --verbosity LVL     Either CRITICAL, ERROR, WARNING, INFO or DEBUG
  --server URL            MetricQ server URL.  [default: amqp://localhost/]
  --format (pretty|json)  Print results in this format  [default: (pretty)]
  --help                  Show this message and exit.
```

`metricq-summary`
-----------------

Live metric data analysis and inspection on the MetricQ network.

```
Usage: metricq-summary [OPTIONS] COMMAND...

  Live metric data analysis and inspection on the MetricQ network.

  Consumes new data points for the given metric as they are submitted to the
  network, prints a statistical overview on exit.

Options:
  -v, --verbosity LVL             Either CRITICAL, ERROR, WARNING, INFO or
                                  DEBUG
  --server URL                    MetricQ server URL.  [default:
                                  amqp://localhost/]
  --token CLIENT_TOKEN            A token to identify this client on the
                                  MetricQ network.  [default: metricq-summary]
  -i, --intervals-histogram / -I, --no-intervals-histogram
                                  Show an histogram of the observed
                                  distribution of durations between data
                                  points.
  -h, --values-histogram / -H, --no-values-histogram
                                  Show an histogram of the observed metric
                                  values.
  -d, --print-data-points / -D, --no-print-data-points
  -s, --print-statistics / -S, --no-print-statistics
  -m, --metric TEXT               [required]
  --version                       Show the version and exit.
  --help                          Show this message and exit.
```
