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

4

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

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

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__":
20
	main()