获取帮助

    输出帮助信息结果如下:

    1. python main.py start [--role {{agent,server,monitor}}]
    2. # start local service.
    3. python main.py stop [--role {{agent,server,monitor}}]
    4. # stop local service.
    5. python main.py start [--user USER] [--host HOST] [--project-path PROJECT_PATH] [--role {{agent,server,monitor}}]
    6. # start the remote service.
    7. python main.py stop [--user USER] [--host HOST] [--project-path PROJECT_PATH] [--role {{agent,server,monitor}}]
    8. # stop the remote service.
    9. python main.py deploy [--user USER] [--host HOST] [--project-path PROJECT_PATH]
    10. # deploy project in remote host.
    11. python main.py show_metrics
    12. # display all monitored metrics(can only be executed on 'detector' machine).
    13. python main.py forecast [--metric-name METRIC_NAME] [--forecast-periods FORECAST_PERIODS] [--forecast-method {{auto_arima, fbprophet}}] [--save-path SAVE_PATH]
    14. # forecast future trend of metric(can only be executed on 'detector' machine).
    15. abnomaly_detection: a timeseries forecast and anomaly detection tool.
    16. positional arguments:
    17. {start,stop,deploy,show_metrics,forecast}
    18. optional arguments:
    19. -h, --help show this help message and exit
    20. --user USER User of remote server.
    21. --host HOST IP of remote server.
    22. --project-path PROJECT_PATH
    23. Project location in remote server.
    24. --role {agent,server,monitor}
    25. Run as 'agent', 'server', 'monitor'. notes: ensure the
    26. normal operation of the openGauss in agent.
    27. --metric-name METRIC_NAME
    28. Metric name to be predicted, if this parameter is not
    29. provided, all metric in database will be predicted.
    30. --forecast-periods FORECAST_PERIODS
    31. Forecast periods of metric, it should be integer plus
    32. Day, W: Week. notes: the specific value should be
    33. determined to the trainnig data.if this parameter is
    34. not provided, the default value '100S' will be used.
    35. --forecast-method FORECAST_METHOD
    36. Forecast method, default method is 'auto_arima',if
    37. want to use 'fbprophet', you should install fbprophet
    38. first.
    39. --save-path SAVE_PATH
    40. Save the results to this path using csv format, if
    41. this parameter is not provided,, the result wil not be
    42. saved.
    43. -v, --version show program's version number and exit
    44. epilog:
    45. the 'a-detection.conf' and 'metric_task.conf' will be read when the program is running,
    46. the location of them is:
    47. metric_config: xxx/metric_task.conf.