/usr/lib/python2.7/dist-packages/elastalert/schema.yaml is in elastalert 0.1.28-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 | $schema: http://json-schema.org/draft-04/schema#
definitions:
# Either a single string OR an array of strings
arrayOfStrings: &arrayOfString
type: [string, array]
items: {type: string}
# Either a single string OR an array of strings OR an array of ararys
arrayOfStringsOrOtherArrays: &arrayOfStringsOrOtherArray
type: [string, array]
items: {type: [string, array]}
timeFrame: &timeframe
type: object
additionalProperties: false
properties:
days: {type: number}
weeks: {type: number}
hours: {type: number}
minutes: {type: number}
seconds: {type: number}
milliseconds: {type: number}
schedule: {type: string}
filter: &filter {}
required: [type, index, alert]
type: object
### Rule Types section
oneOf:
- title: Any
properties:
type: {enum: [any]}
- title: Blacklist
required: [blacklist, compare_key]
properties:
type: {enum: [blacklist]}
compare_key: {'items': {'type': 'string'},'type': ['string', 'array']}
blacklist: {type: array, items: {type: string}}
- title: Whitelist
required: [whitelist, compare_key, ignore_null]
properties:
type: {enum: [whitelist]}
compare_key: {'items': {'type': 'string'},'type': ['string', 'array']}
whitelist: {type: array, items: {type: string}}
ignore_null: {type: boolean}
- title: Change
required: [query_key, compare_key, ignore_null]
properties:
type: {enum: [change]}
compare_key: {'items': {'type': 'string'},'type': ['string', 'array']}
ignore_null: {type: boolean}
timeframe: *timeframe
- title: Frequency
required: [num_events, timeframe]
properties:
type: {enum: [frequency]}
num_events: {type: integer}
timeframe: *timeframe
use_count_query: {type: boolean}
doc_type: {type: string}
use_terms_query: {type: boolean}
terms_size: {type: integer}
attach_related: {type: boolean}
- title: Spike
required: [spike_height, spike_type, timeframe]
properties:
type: {enum: [spike]}
spike_height: {type: number}
spike_type: {enum: ["up", "down", "both"]}
timeframe: *timeframe
use_count_query: {type: boolean}
doc_type: {type: string}
use_terms_query: {type: boolean}
terms_size: {type: integer}
alert_on_new_data: {type: boolean}
threshold_ref: {type: integer}
threshold_cur: {type: integer}
- title: Flatline
required: [threshold, timeframe]
properties:
type: {enum: [flatline]}
timeframe: *timeframe
threshold: {type: integer}
use_count_query: {type: boolean}
doc_type: {type: string}
- title: New Term
required: [fields]
properties:
type: {enum: [new_term]}
fields: *arrayOfStringsOrOtherArray
terms_window_size: *timeframe
alert_on_missing_field: {type: boolean}
use_terms_query: {type: boolean}
terms_size: {type: integer}
- title: Cardinality
required: [cardinality_field, timeframe]
properties:
type: {enum: [cardinality]}
max_cardinality: {type: integer}
min_cardinality: {type: integer}
cardinality_field: {type: string}
timeframe: *timeframe
- title: Metric Aggregation
required: [metric_agg_key,metric_agg_type]
properties:
type: {enum: [metric_aggregation]}
metric_agg_type: {enum: ["min", "max", "avg", "sum", "cardinality", "value_count"]}
#timeframe: *timeframe
- title: Percentage Match
required: [match_bucket_filter]
properties:
type: {enum: [percentage_match]}
- title: Custom Rule from Module
properties:
# custom rules include a period in the rule type
type: {pattern: "[.]"}
properties:
# Common Settings
es_host: {type: string}
es_port: {type: integer}
index: {type: string}
name: {type: string}
use_ssl: {type: boolean}
verify_certs: {type: boolean}
es_username: {type: string}
es_password: {type: string}
use_strftime_index: {type: boolean}
# Optional Settings
import: {type: string}
aggregation: *timeframe
realert: *timeframe
exponential_realert: *timeframe
buffer_time: *timeframe
query_delay: *timeframe
max_query_size: {type: integer}
owner: {type: string}
priority: {type: integer}
filter :
type: [array, object]
items: *filter
additionalProperties: false
properties:
download_dashboard: {type: string}
include: {type: array, items: {type: string}}
top_count_keys: {type: array, items: {type: string}}
top_count_number: {type: integer}
raw_count_keys: {type: boolean}
generate_kibana_link: {type: boolean}
kibana_dashboard: {type: string}
use_kibana_dashboard: {type: string}
use_local_time: {type: boolean}
match_enhancements: {type: array, items: {type: string}}
query_key: *arrayOfString
replace_dots_in_field_names: {type: boolean}
# Alert Content
alert_text: {type: string} # Python format string
alert_text_args: {type: array, items: {type: string}}
alert_text_kw: {type: object}
alert_text_type: {enum: [alert_text_only, exclude_fields]}
alert_missing_value: {type: string}
timestamp_field: {type: string}
field: {}
### Commands
command: *arrayOfString
pipe_match_json: {type: boolean}
fail_on_non_zero_exit: {type: boolean}
### Email
email: *arrayOfString
email_reply_to: {type: string}
notify_email: *arrayOfString # if rule is slow or erroring, send to this email
smtp_host: {type: string}
from_addr: {type: string}
### JIRA
jira_server: {type: string}
jira_project: {type: string}
jira_issuetype: {type: string}
jira_account_file: {type: string} # a Yaml file that includes the keys {user:, password:}
jira_assignee: {type: string}
jira_component: *arrayOfString
jira_components: *arrayOfString
jira_label: *arrayOfString
jira_labels: *arrayOfString
jira_bump_tickets: {type: boolean}
jira_bump_in_statuses: *arrayOfString
jira_bump_not_in_statuses: *arrayOfString
jira_max_age: {type: number}
jira_watchers: *arrayOfString
### HipChat
hipchat_auth_token: {type: string}
hipchat_room_id: {type: [string, integer]}
hipchat_domain: {type: string}
hipchat_ignore_ssl_errors: {type: boolean}
hipchat_notify: {type: boolean}
hipchat_from: {type: string}
hipchat_mentions: {type: array, items: {type: string}}
### Stride
stride_access_token: {type: string}
stride_cloud_id: {type: string}
stride_converstation_id: {type: string}
stride_ignore_ssl_errors: {type: boolean}
### Slack
slack_webhook_url: *arrayOfString
slack_username_override: {type: string}
slack_emoji_override: {type: string}
slack_icon_url_override: {type: string}
slack_msg_color: {enum: [good, warning, danger]}
slack_parse_override: {enum: [none, full]}
slack_text_string: {type: string}
### PagerDuty
pagerduty_service_key: {type: string}
pagerduty_client_name: {type: string}
pagerduty_event_type: {enum: [none, trigger, resolve, acknowledge]}
### Exotel
exotel_account_sid: {type: string}
exotel_auth_token: {type: string}
exotel_to_number: {type: string}
exotel_from_number: {type: string}
### Twilio
twilio_account_sid: {type: string}
twilio_auth_token: {type: string}
twilio_to_number: {type: string}
twilio_from_number: {type: string}
### VictorOps
victorops_api_key: {type: string}
victorops_routing_key: {type: string}
victorops_message_type: {enum: [INFO, WARNING, ACKNOWLEDGEMENT, CRITICAL, RECOVERY]}
victorops_entity_id: {type: string}
victorops_entity_display_name: {type: string}
### Telegram
telegram_bot_token: {type: string}
telegram_room_id: {type: string}
telegram_api_url: {type: string}
### Gitter
gitter_webhook_url: {type: string}
gitter_proxy: {type: string}
gitter_msg_level: {enum: [info, error]}
### Simple
simple_webhook_url: *arrayOfString
simple_proxy: {type: string}
|