|
5 | 5 |
|
6 | 6 |
|
7 | 7 | @click.command('send', short_help='Send an alert') |
8 | | -@click.option('--resource', '-r', metavar='RESOURCE', required=True, help='resource under alarm') |
9 | | -@click.option('--event', '-e', metavar='EVENT', required=True, help='event name') |
10 | | -@click.option('--environment', '-E', metavar='ENVIRONMENT', help='environment eg. Production, Development') |
11 | | -@click.option('--severity', '-s', metavar='SEVERITY', help='severity eg. critical, major, minor, warning') |
12 | | -@click.option('--correlate', '-C', metavar='EVENT', multiple=True, help='list of related events eg. node_up, node_down') |
13 | | -@click.option('--service', '-S', metavar='SERVICE', multiple=True, help='list of affected services eg. app name, Web, Network, Storage, Database, Security') |
14 | | -@click.option('--group', '-g', metavar='GROUP', help='group event by type eg. OS, Performance') |
15 | | -@click.option('--value', '-v', metavar='VALUE', help='string event value') |
16 | | -@click.option('--text', '-t', metavar='DESCRIPTION', help='description of alert') |
17 | | -@click.option('--tag', '-T', 'tags', multiple=True, metavar='TAG', help='list of tags eg. London, os:linux, AWS/EC2') |
18 | | -@click.option('--attributes', '-A', multiple=True, metavar='KEY=VALUE', help='list of attributes eg. priority=high') |
19 | | -@click.option('--origin', '-O', metavar='ORIGIN', help='origin of alert in form app/host') |
20 | | -@click.option('--type', metavar='EVENT_TYPE', help='event type eg. exceptionAlert, performanceAlert, nagiosAlert') |
21 | | -@click.option('--timeout', metavar='EXPIRES', help='seconds before an open alert will be expired') |
22 | | -@click.option('--raw-data', metavar='STRING', help='raw data of orignal alert eg. SNMP trap PDU') |
| 8 | +@click.option('--resource', '-r', metavar='RESOURCE', required=True, help='Resource under alarm') |
| 9 | +@click.option('--event', '-e', metavar='EVENT', required=True, help='Event name') |
| 10 | +@click.option('--environment', '-E', metavar='ENVIRONMENT', help='Environment eg. Production, Development') |
| 11 | +@click.option('--severity', '-s', metavar='SEVERITY', help='Severity eg. critical, major, minor, warning') |
| 12 | +@click.option('--correlate', '-C', metavar='EVENT', multiple=True, help='List of related events eg. node_up, node_down') |
| 13 | +@click.option('--service', '-S', metavar='SERVICE', multiple=True, help='List of affected services eg. app name, Web, Network, Storage, Database, Security') |
| 14 | +@click.option('--group', '-g', metavar='GROUP', help='Group event by type eg. OS, Performance') |
| 15 | +@click.option('--value', '-v', metavar='VALUE', help='Event value') |
| 16 | +@click.option('--text', '-t', metavar='DESCRIPTION', help='Description of alert') |
| 17 | +@click.option('--tag', '-T', 'tags', multiple=True, metavar='TAG', help='List of tags eg. London, os:linux, AWS/EC2') |
| 18 | +@click.option('--attributes', '-A', multiple=True, metavar='KEY=VALUE', help='List of attributes eg. priority=high') |
| 19 | +@click.option('--origin', '-O', metavar='ORIGIN', help='Origin of alert in form app/host') |
| 20 | +@click.option('--type', metavar='EVENT_TYPE', help='Event type eg. exceptionAlert, performanceAlert, nagiosAlert') |
| 21 | +@click.option('--timeout', metavar='EXPIRES', help='Seconds before an open alert will be expired') |
| 22 | +@click.option('--raw-data', metavar='STRING', help='Raw data of orignal alert eg. SNMP trap PDU') |
23 | 23 | @click.pass_obj |
24 | 24 | def cli(obj, resource, event, environment, severity, correlate, service, group, value, text, tags, attributes, origin, type, timeout, raw_data): |
25 | 25 | """Send an alert.""" |
|
0 commit comments