Commit 6e6b2972 authored by Olav Morken's avatar Olav Morken

get-triggers: Add option to only show triggers that have been active recently.

parent 8487e3d5
......@@ -269,6 +269,8 @@ def get_triggers(args):
'selectHosts': ['name'],
'min_severity': SEVERITIES[args.severity],
if args.only_true:
kwargs['only_true'] = True
for trigger in invoke('trigger.get', **kwargs):
description = trigger['description']
severity = rseverities[int(trigger['priority'])]
......@@ -357,6 +359,7 @@ def parse_args():
triggers = subparsers.add_parser('get-triggers', help="List triggers")
triggers.add_argument('--severity', choices=SEVERITIES.keys(), default='not_classified', help="Minimum severity to include")
triggers.add_argument('--only-true', action='store_true', help="Return only triggers that have recently been in a problem state.")
find_dead_trapper_items = subparsers.add_parser('find-dead-trapper-items', help="Find trapper items no longer receiving data")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment