Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions scripts/monitor
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env python3

from monitoring.cli import main

if __name__ == "__main__":
main()
30 changes: 22 additions & 8 deletions src/monitoring/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,28 @@

## Usage

Check available products from `/api/monitoring-products`
```bash
# Monitor current period by default
./scripts/monitor {day,week,month,year,all}

Run monitoring:
# Common options
# start and stop arguments have format YYYY-MM-DD, YYYY-VV, YYYY-MM or YYYY
# depending on the subcommand
--start START Monitor periods starting from START
--stop STOP Monitor periods until STOP
--product [PRODUCT ...] Monitor only these products
--site [SITE ...] Monitor only these sites

```
python -m monitoring INSTRUMENT_UUID SITE all PRODUCT_ID
python -m monitoring INSTRUMENT_UUID SITE year:DATE PRODUCT_ID
python -m monitoring INSTRUMENT_UUID SITE month:DATE PRODUCT_ID
python -m monitoring INSTRUMENT_UUID SITE week:DATE PRODUCT_ID
python -m monitoring INSTRUMENT_UUID SITE day:DATE PRODUCT_ID
# Subcommand specific options
## day
--day [YYYY-MM-DD ...]

## week
--week [YYYY-VV ...]

## month
--month [YYYY-MM ...]

## year
--year [YYYY ...]
```
96 changes: 0 additions & 96 deletions src/monitoring/__main__.py

This file was deleted.

Loading