Skip to content

Commit

Permalink
better help messages
Browse files Browse the repository at this point in the history
  • Loading branch information
unfor19 committed Jan 13, 2021
1 parent b686690 commit 2beee58
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion scripts/frigga.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ def cli(config, ci):
@click.option('--output-file-path', '-o', default='./.metrics.json', show_default=True, required=False, type=str)
# @click.option('--file', '-f', prompt=False, default=".", help="Output metrics.json file to pwd")
def grafana_list(grafana_url, grafana_api_key, output_file_path):
"""Provide Grafana URL and Grafana API Key (Viewer)\n
"""Alias: gl\n
Provide Grafana URL and Grafana API Key (Viewer)\n
Returns a list of metrics that are used in all dashboards"""
if "http" not in grafana_url:
print_msg(
Expand All @@ -72,5 +73,11 @@ def grafana_list(grafana_url, grafana_api_key, output_file_path):
@click.option('--create-backup-file', '-b', is_flag=True, default=True, required=False)
@click.option('--skip-rules-file', '-sr', is_flag=True, default=False, required=False)
def prometheus_apply(prom_yaml_path, metrics_json_path, create_backup_file, skip_rules_file):
"""Alias: pa\n
Applies .metrics.json for a given prometheus.yml file\n
By default:\n
- Creates a backup of prometheus.yml to prometheus.yml.bak.yml (same dir as prometheus.yml)\n
- Creates a .prometheus-rules.yml file with all relabel_configs
"""
apply_yaml(prom_yaml_path, metrics_json_path,
create_backup_file, skip_rules_file)

0 comments on commit 2beee58

Please sign in to comment.