manage.py 528 Bytes
Newer Older
1
import sys
2
from src import cnfparse, client, collectables
3

4

5
def main():
Bach Dániel committed
6 7
    if len(sys.argv) < 2:
        print("usage: manage.py run [options]")
8

Bach Dániel committed
9 10 11
    if len(sys.argv) is not 2 and sys.argv[1] is not "run":
        print("[ERROR] Command cannot be parsed. Exiting...")
        return
12

Bach Dániel committed
13 14 15 16
    configuration, metrics = cnfparse.importConf("config/client.conf")
    cli = client.Client(configuration)
    cli.startReporting(
        metricCollectors=collectables.collectables.provide(metrics))
17 18 19


if __name__ == "__main__":
Bach Dániel committed
20
    main()