in cookbooks/aws-parallelcluster-config/files/default/cloudwatch_agent/write_cloudwatch_agent_json.py [0:0]
def parse_args():
"""Parse CL args and return an argparse.Namespace."""
parser = argparse.ArgumentParser(description="Create the cloudwatch agent config file")
parser.add_argument("--config", help="Path to JSON file describing logs that should be monitored", required=True)
parser.add_argument(
"--platform", help="OS family of this instance", choices=["amazon", "centos", "ubuntu"], required=True
)
parser.add_argument("--log-group", help="Name of the log group", required=True)
parser.add_argument(
"--node-role",
required=True,
choices=["HeadNode", "ComputeFleet"],
help="Role this node plays in the cluster " "(i.e., is it a compute node or the head node?)",
)
parser.add_argument("--scheduler", required=True, choices=["slurm", "awsbatch", "plugin"], help="Scheduler")
parser.add_argument(
"--cluster-config-path",
required=False,
help="Cluster configuration path",
)
return parser.parse_args()