manage.py 676 Bytes
Newer Older
1
import sys
2
from src import cnfparse, client, collectables
3 4 5 6 7 8 9 10 11 12 13 14 15 16

def main():

    if (len(sys.argv)<2):
        print("usage: manage.py run [options]")
        print("""
        options:
        --config <path> : path to the configuration file you intend
        to start the client with
        --debug : enables the debug mode and writes metrics sent to the
        server
        """)

    if (len(sys.argv)==2 and sys.argv[1]=="run"):
17
        configuration, metrics = cnfparse.importConf("config/client.conf")
18

19
    cli = client.Client(configuration)
20 21
    cli.startReporting(metricCollectors =
			collectables.collectables.provide(metrics))
22 23 24

if __name__ == "__main__":
    main()