flapjack 1.6.0 → 2.0.0b1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +4 -6
- data/.gitmodules +1 -1
- data/.rspec +1 -1
- data/.ruby-version +1 -1
- data/.travis.yml +12 -13
- data/CHANGELOG.md +2 -9
- data/CONTRIBUTING.md +7 -2
- data/Gemfile +4 -13
- data/LICENCE +1 -0
- data/README.md +8 -2
- data/Rakefile +2 -2
- data/bin/flapjack +3 -12
- data/build.sh +4 -2
- data/etc/flapjack_config.toml.example +273 -0
- data/features/ack_after_sched_maint.feature +18 -21
- data/features/cli.feature +11 -71
- data/features/cli_flapjack-feed-events.feature +14 -15
- data/features/cli_flapjack-nagios-receiver.feature +12 -41
- data/features/cli_flapper.feature +12 -41
- data/features/cli_purge.feature +5 -6
- data/features/cli_receive-events.feature +6 -7
- data/features/cli_simulate-failed-check.feature +5 -6
- data/features/events.feature +206 -181
- data/features/events_check_names.feature +4 -7
- data/features/notification_rules.feature +144 -223
- data/features/notifications.feature +65 -57
- data/features/rollup.feature +45 -47
- data/features/steps/cli_steps.rb +4 -5
- data/features/steps/events_steps.rb +163 -373
- data/features/steps/notifications_steps.rb +408 -264
- data/features/steps/packaging-lintian_steps.rb +0 -4
- data/features/steps/time_travel_steps.rb +0 -26
- data/features/support/daemons.rb +6 -31
- data/features/support/env.rb +65 -74
- data/flapjack.gemspec +22 -24
- data/lib/flapjack.rb +14 -7
- data/lib/flapjack/cli/flapper.rb +74 -173
- data/lib/flapjack/cli/maintenance.rb +278 -109
- data/lib/flapjack/cli/migrate.rb +950 -0
- data/lib/flapjack/cli/purge.rb +19 -22
- data/lib/flapjack/cli/receiver.rb +150 -326
- data/lib/flapjack/cli/server.rb +8 -235
- data/lib/flapjack/cli/simulate.rb +42 -57
- data/lib/flapjack/configuration.rb +51 -37
- data/lib/flapjack/coordinator.rb +138 -129
- data/lib/flapjack/data/acknowledgement.rb +177 -0
- data/lib/flapjack/data/alert.rb +97 -158
- data/lib/flapjack/data/check.rb +611 -0
- data/lib/flapjack/data/condition.rb +70 -0
- data/lib/flapjack/data/contact.rb +226 -456
- data/lib/flapjack/data/event.rb +96 -184
- data/lib/flapjack/data/extensions/associations.rb +59 -0
- data/lib/flapjack/data/extensions/short_name.rb +25 -0
- data/lib/flapjack/data/medium.rb +428 -0
- data/lib/flapjack/data/metrics.rb +194 -0
- data/lib/flapjack/data/notification.rb +22 -281
- data/lib/flapjack/data/rule.rb +473 -0
- data/lib/flapjack/data/scheduled_maintenance.rb +244 -0
- data/lib/flapjack/data/state.rb +221 -0
- data/lib/flapjack/data/statistic.rb +112 -0
- data/lib/flapjack/data/tag.rb +277 -0
- data/lib/flapjack/data/test_notification.rb +182 -0
- data/lib/flapjack/data/unscheduled_maintenance.rb +159 -0
- data/lib/flapjack/data/validators/id_validator.rb +20 -0
- data/lib/flapjack/exceptions.rb +6 -0
- data/lib/flapjack/filters/acknowledgement.rb +23 -16
- data/lib/flapjack/filters/base.rb +0 -5
- data/lib/flapjack/filters/delays.rb +53 -43
- data/lib/flapjack/filters/ok.rb +23 -14
- data/lib/flapjack/filters/scheduled_maintenance.rb +3 -3
- data/lib/flapjack/filters/unscheduled_maintenance.rb +12 -3
- data/lib/flapjack/gateways/aws_sns.rb +65 -49
- data/lib/flapjack/gateways/aws_sns/alert.text.erb +2 -2
- data/lib/flapjack/gateways/aws_sns/alert_subject.text.erb +2 -2
- data/lib/flapjack/gateways/aws_sns/rollup_subject.text.erb +1 -1
- data/lib/flapjack/gateways/email.rb +107 -90
- data/lib/flapjack/gateways/email/alert.html.erb +19 -18
- data/lib/flapjack/gateways/email/alert.text.erb +20 -14
- data/lib/flapjack/gateways/email/alert_subject.text.erb +2 -1
- data/lib/flapjack/gateways/email/rollup.html.erb +14 -13
- data/lib/flapjack/gateways/email/rollup.text.erb +13 -10
- data/lib/flapjack/gateways/jabber.rb +679 -671
- data/lib/flapjack/gateways/jabber/alert.text.erb +9 -6
- data/lib/flapjack/gateways/jsonapi.rb +164 -350
- data/lib/flapjack/gateways/jsonapi/data/join_descriptor.rb +44 -0
- data/lib/flapjack/gateways/jsonapi/data/method_descriptor.rb +21 -0
- data/lib/flapjack/gateways/jsonapi/helpers/headers.rb +63 -0
- data/lib/flapjack/gateways/jsonapi/helpers/miscellaneous.rb +136 -0
- data/lib/flapjack/gateways/jsonapi/helpers/resources.rb +227 -0
- data/lib/flapjack/gateways/jsonapi/helpers/serialiser.rb +313 -0
- data/lib/flapjack/gateways/jsonapi/helpers/swagger_docs.rb +322 -0
- data/lib/flapjack/gateways/jsonapi/methods/association_delete.rb +115 -0
- data/lib/flapjack/gateways/jsonapi/methods/association_get.rb +288 -0
- data/lib/flapjack/gateways/jsonapi/methods/association_patch.rb +178 -0
- data/lib/flapjack/gateways/jsonapi/methods/association_post.rb +116 -0
- data/lib/flapjack/gateways/jsonapi/methods/metrics.rb +71 -0
- data/lib/flapjack/gateways/jsonapi/methods/resource_delete.rb +119 -0
- data/lib/flapjack/gateways/jsonapi/methods/resource_get.rb +186 -0
- data/lib/flapjack/gateways/jsonapi/methods/resource_patch.rb +239 -0
- data/lib/flapjack/gateways/jsonapi/methods/resource_post.rb +197 -0
- data/lib/flapjack/gateways/jsonapi/middleware/array_param_fixer.rb +27 -0
- data/lib/flapjack/gateways/jsonapi/{rack → middleware}/json_params_parser.rb +7 -6
- data/lib/flapjack/gateways/jsonapi/middleware/request_timestamp.rb +18 -0
- data/lib/flapjack/gateways/oobetet.rb +222 -170
- data/lib/flapjack/gateways/pager_duty.rb +388 -0
- data/lib/flapjack/gateways/pager_duty/alert.text.erb +13 -0
- data/lib/flapjack/gateways/slack.rb +56 -48
- data/lib/flapjack/gateways/slack/alert.text.erb +1 -1
- data/lib/flapjack/gateways/slack/rollup.text.erb +1 -1
- data/lib/flapjack/gateways/sms_aspsms.rb +155 -0
- data/lib/flapjack/gateways/sms_aspsms/alert.text.erb +7 -0
- data/lib/flapjack/gateways/sms_aspsms/rollup.text.erb +2 -0
- data/lib/flapjack/gateways/sms_messagenet.rb +77 -57
- data/lib/flapjack/gateways/sms_messagenet/alert.text.erb +3 -2
- data/lib/flapjack/gateways/sms_nexmo.rb +53 -51
- data/lib/flapjack/gateways/sms_nexmo/alert.text.erb +2 -2
- data/lib/flapjack/gateways/sms_nexmo/rollup.text.erb +1 -1
- data/lib/flapjack/gateways/sms_twilio.rb +79 -62
- data/lib/flapjack/gateways/sms_twilio/alert.text.erb +3 -2
- data/lib/flapjack/gateways/web.rb +437 -345
- data/lib/flapjack/gateways/web/middleware/request_timestamp.rb +18 -0
- data/lib/flapjack/gateways/web/public/css/bootstrap.css +3793 -4340
- data/lib/flapjack/gateways/web/public/css/bootstrap.css.map +1 -0
- data/lib/flapjack/gateways/web/public/fonts/glyphicons-halflings-regular.eot +0 -0
- data/lib/flapjack/gateways/web/public/fonts/glyphicons-halflings-regular.svg +273 -214
- data/lib/flapjack/gateways/web/public/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/lib/flapjack/gateways/web/public/fonts/glyphicons-halflings-regular.woff +0 -0
- data/lib/flapjack/gateways/web/public/fonts/glyphicons-halflings-regular.woff2 +0 -0
- data/lib/flapjack/gateways/web/public/js/bootstrap.js +1637 -1607
- data/lib/flapjack/gateways/web/public/js/self_stats.js +1 -2
- data/lib/flapjack/gateways/web/views/_pagination.html.erb +19 -0
- data/lib/flapjack/gateways/web/views/check.html.erb +159 -121
- data/lib/flapjack/gateways/web/views/checks.html.erb +82 -41
- data/lib/flapjack/gateways/web/views/contact.html.erb +59 -71
- data/lib/flapjack/gateways/web/views/contacts.html.erb +32 -8
- data/lib/flapjack/gateways/web/views/index.html.erb +2 -2
- data/lib/flapjack/gateways/web/views/{layout.erb → layout.html.erb} +7 -23
- data/lib/flapjack/gateways/web/views/self_stats.html.erb +32 -33
- data/lib/flapjack/gateways/web/views/tag.html.erb +32 -0
- data/lib/flapjack/gateways/web/views/tags.html.erb +51 -0
- data/lib/flapjack/logger.rb +34 -3
- data/lib/flapjack/notifier.rb +180 -112
- data/lib/flapjack/patches.rb +8 -63
- data/lib/flapjack/pikelet.rb +185 -143
- data/lib/flapjack/processor.rb +323 -191
- data/lib/flapjack/record_queue.rb +33 -0
- data/lib/flapjack/redis_proxy.rb +66 -0
- data/lib/flapjack/utility.rb +21 -15
- data/lib/flapjack/version.rb +2 -1
- data/libexec/httpbroker.go +218 -14
- data/libexec/oneoff.go +13 -10
- data/spec/lib/flapjack/configuration_spec.rb +286 -0
- data/spec/lib/flapjack/coordinator_spec.rb +103 -157
- data/spec/lib/flapjack/data/check_spec.rb +175 -0
- data/spec/lib/flapjack/data/contact_spec.rb +26 -349
- data/spec/lib/flapjack/data/event_spec.rb +76 -291
- data/spec/lib/flapjack/data/medium_spec.rb +19 -0
- data/spec/lib/flapjack/data/rule_spec.rb +43 -0
- data/spec/lib/flapjack/data/scheduled_maintenance_spec.rb +976 -0
- data/spec/lib/flapjack/data/unscheduled_maintenance_spec.rb +34 -0
- data/spec/lib/flapjack/gateways/aws_sns_spec.rb +111 -60
- data/spec/lib/flapjack/gateways/email_spec.rb +194 -161
- data/spec/lib/flapjack/gateways/jabber_spec.rb +961 -162
- data/spec/lib/flapjack/gateways/jsonapi/methods/check_links_spec.rb +155 -0
- data/spec/lib/flapjack/gateways/jsonapi/methods/checks_spec.rb +426 -0
- data/spec/lib/flapjack/gateways/jsonapi/methods/contact_links_spec.rb +217 -0
- data/spec/lib/flapjack/gateways/jsonapi/methods/contacts_spec.rb +425 -0
- data/spec/lib/flapjack/gateways/jsonapi/methods/events_spec.rb +271 -0
- data/spec/lib/flapjack/gateways/jsonapi/methods/media_spec.rb +257 -0
- data/spec/lib/flapjack/gateways/jsonapi/methods/medium_links_spec.rb +163 -0
- data/spec/lib/flapjack/gateways/jsonapi/methods/metrics_spec.rb +8 -0
- data/spec/lib/flapjack/gateways/jsonapi/methods/rule_links_spec.rb +212 -0
- data/spec/lib/flapjack/gateways/jsonapi/methods/rules_spec.rb +289 -0
- data/spec/lib/flapjack/gateways/jsonapi/methods/scheduled_maintenance_links_spec.rb +49 -0
- data/spec/lib/flapjack/gateways/jsonapi/methods/scheduled_maintenances_spec.rb +242 -0
- data/spec/lib/flapjack/gateways/jsonapi/methods/tag_links_spec.rb +274 -0
- data/spec/lib/flapjack/gateways/jsonapi/methods/tags_spec.rb +302 -0
- data/spec/lib/flapjack/gateways/jsonapi/methods/unscheduled_maintenance_links_spec.rb +49 -0
- data/spec/lib/flapjack/gateways/jsonapi/methods/unscheduled_maintenances_spec.rb +339 -0
- data/spec/lib/flapjack/gateways/jsonapi_spec.rb +1 -1
- data/spec/lib/flapjack/gateways/oobetet_spec.rb +151 -79
- data/spec/lib/flapjack/gateways/pager_duty_spec.rb +353 -0
- data/spec/lib/flapjack/gateways/slack_spec.rb +53 -53
- data/spec/lib/flapjack/gateways/sms_aspsms_spec.rb +106 -0
- data/spec/lib/flapjack/gateways/sms_messagenet_spec.rb +111 -54
- data/spec/lib/flapjack/gateways/sms_nexmo_spec.rb +50 -51
- data/spec/lib/flapjack/gateways/sms_twilio_spec.rb +108 -48
- data/spec/lib/flapjack/gateways/web_spec.rb +144 -216
- data/spec/lib/flapjack/notifier_spec.rb +132 -1
- data/spec/lib/flapjack/pikelet_spec.rb +111 -50
- data/spec/lib/flapjack/processor_spec.rb +210 -40
- data/spec/lib/flapjack/redis_proxy_spec.rb +45 -0
- data/spec/lib/flapjack/utility_spec.rb +11 -15
- data/spec/service_consumers/fixture_data.rb +547 -0
- data/spec/service_consumers/pact_helper.rb +21 -32
- data/spec/service_consumers/pacts/flapjack-diner_v2.0.json +4652 -0
- data/spec/service_consumers/provider_states_for_flapjack-diner.rb +279 -322
- data/spec/service_consumers/provider_support.rb +8 -0
- data/spec/spec_helper.rb +34 -44
- data/spec/support/erb_view_helper.rb +1 -1
- data/spec/support/factories.rb +58 -0
- data/spec/support/jsonapi_helper.rb +15 -26
- data/spec/support/mock_logger.rb +43 -0
- data/spec/support/xmpp_comparable.rb +24 -0
- data/src/flapjack/transport_test.go +30 -1
- data/tasks/dump_keys.rake +82 -0
- data/tasks/events.rake +7 -7
- data/tasks/support/flapjack_config_benchmark.toml +28 -0
- data/tasks/support/flapjack_config_benchmark.yaml +0 -2
- metadata +175 -222
- data/Guardfile +0 -14
- data/etc/flapjack_config.yaml.example +0 -477
- data/features/cli_flapjack-populator.feature +0 -90
- data/features/support/silent_system.rb +0 -4
- data/lib/flapjack/cli/import.rb +0 -108
- data/lib/flapjack/data/entity.rb +0 -652
- data/lib/flapjack/data/entity_check.rb +0 -1044
- data/lib/flapjack/data/message.rb +0 -56
- data/lib/flapjack/data/migration.rb +0 -234
- data/lib/flapjack/data/notification_rule.rb +0 -425
- data/lib/flapjack/data/semaphore.rb +0 -44
- data/lib/flapjack/data/tagged.rb +0 -48
- data/lib/flapjack/gateways/jsonapi/check_methods.rb +0 -206
- data/lib/flapjack/gateways/jsonapi/check_presenter.rb +0 -221
- data/lib/flapjack/gateways/jsonapi/contact_methods.rb +0 -186
- data/lib/flapjack/gateways/jsonapi/entity_methods.rb +0 -223
- data/lib/flapjack/gateways/jsonapi/medium_methods.rb +0 -185
- data/lib/flapjack/gateways/jsonapi/metrics_methods.rb +0 -132
- data/lib/flapjack/gateways/jsonapi/notification_rule_methods.rb +0 -141
- data/lib/flapjack/gateways/jsonapi/pagerduty_credential_methods.rb +0 -139
- data/lib/flapjack/gateways/jsonapi/report_methods.rb +0 -146
- data/lib/flapjack/gateways/pagerduty.rb +0 -318
- data/lib/flapjack/gateways/pagerduty/alert.text.erb +0 -10
- data/lib/flapjack/gateways/web/public/css/select2-bootstrap.css +0 -87
- data/lib/flapjack/gateways/web/public/css/select2.css +0 -615
- data/lib/flapjack/gateways/web/public/css/tablesort.css +0 -67
- data/lib/flapjack/gateways/web/public/img/select2-spinner.gif +0 -0
- data/lib/flapjack/gateways/web/public/img/select2.png +0 -0
- data/lib/flapjack/gateways/web/public/img/select2x2.png +0 -0
- data/lib/flapjack/gateways/web/public/js/backbone.js +0 -1581
- data/lib/flapjack/gateways/web/public/js/backbone.jsonapi.js +0 -322
- data/lib/flapjack/gateways/web/public/js/flapjack.js +0 -82
- data/lib/flapjack/gateways/web/public/js/jquery.tablesorter.js +0 -1640
- data/lib/flapjack/gateways/web/public/js/jquery.tablesorter.widgets.js +0 -1390
- data/lib/flapjack/gateways/web/public/js/modules/contact.js +0 -520
- data/lib/flapjack/gateways/web/public/js/modules/entity.js +0 -28
- data/lib/flapjack/gateways/web/public/js/modules/medium.js +0 -40
- data/lib/flapjack/gateways/web/public/js/select2.js +0 -3397
- data/lib/flapjack/gateways/web/public/js/tablesort.js +0 -44
- data/lib/flapjack/gateways/web/public/js/underscore.js +0 -1276
- data/lib/flapjack/gateways/web/views/edit_contacts.html.erb +0 -173
- data/lib/flapjack/gateways/web/views/entities.html.erb +0 -30
- data/lib/flapjack/gateways/web/views/entity.html.erb +0 -51
- data/lib/flapjack/rack_logger.rb +0 -47
- data/lib/flapjack/redis_pool.rb +0 -42
- data/spec/lib/flapjack/data/entity_check_spec.rb +0 -1418
- data/spec/lib/flapjack/data/entity_spec.rb +0 -872
- data/spec/lib/flapjack/data/message_spec.rb +0 -30
- data/spec/lib/flapjack/data/migration_spec.rb +0 -104
- data/spec/lib/flapjack/data/notification_rule_spec.rb +0 -232
- data/spec/lib/flapjack/data/notification_spec.rb +0 -53
- data/spec/lib/flapjack/data/semaphore_spec.rb +0 -24
- data/spec/lib/flapjack/filters/acknowledgement_spec.rb +0 -6
- data/spec/lib/flapjack/filters/delays_spec.rb +0 -6
- data/spec/lib/flapjack/filters/ok_spec.rb +0 -6
- data/spec/lib/flapjack/filters/scheduled_maintenance_spec.rb +0 -6
- data/spec/lib/flapjack/filters/unscheduled_maintenance_spec.rb +0 -6
- data/spec/lib/flapjack/gateways/jsonapi/check_methods_spec.rb +0 -315
- data/spec/lib/flapjack/gateways/jsonapi/check_presenter_spec.rb +0 -223
- data/spec/lib/flapjack/gateways/jsonapi/contact_methods_spec.rb +0 -131
- data/spec/lib/flapjack/gateways/jsonapi/entity_methods_spec.rb +0 -389
- data/spec/lib/flapjack/gateways/jsonapi/medium_methods_spec.rb +0 -231
- data/spec/lib/flapjack/gateways/jsonapi/notification_rule_methods_spec.rb +0 -169
- data/spec/lib/flapjack/gateways/jsonapi/pagerduty_credential_methods_spec.rb +0 -114
- data/spec/lib/flapjack/gateways/jsonapi/report_methods_spec.rb +0 -590
- data/spec/lib/flapjack/gateways/pagerduty_spec.rb +0 -249
- data/spec/lib/flapjack/gateways/web/views/check.html.erb_spec.rb +0 -21
- data/spec/lib/flapjack/gateways/web/views/contact.html.erb_spec.rb +0 -24
- data/spec/lib/flapjack/gateways/web/views/index.html.erb_spec.rb +0 -16
- data/spec/lib/flapjack/redis_pool_spec.rb +0 -29
- data/spec/service_consumers/pacts/flapjack-diner_v1.0.json +0 -4702
- data/tasks/entities.rake +0 -151
- data/tasks/profile.rake +0 -282
- data/tmp/acknowledge.rb +0 -13
- data/tmp/create_config_yaml.rb +0 -16
- data/tmp/create_event_ok.rb +0 -30
- data/tmp/create_event_unknown.rb +0 -30
- data/tmp/create_events_failure.rb +0 -34
- data/tmp/create_events_ok.rb +0 -32
- data/tmp/create_events_ok_fail_ack_ok.rb +0 -53
- data/tmp/create_events_ok_failure.rb +0 -41
- data/tmp/create_events_ok_failure_ack.rb +0 -53
- data/tmp/dummy_contacts.json +0 -43
- data/tmp/dummy_entities.json +0 -37
- data/tmp/generate_nagios_test_hosts.rb +0 -16
- data/tmp/notification_rules.rb +0 -73
- data/tmp/parse_config_yaml.rb +0 -7
- data/tmp/redis_find_spurious_unknown_states.rb +0 -52
- data/tmp/test_json_post.rb +0 -19
- data/tmp/test_notification_rules_api.rb +0 -171
|
@@ -2,20 +2,17 @@
|
|
|
2
2
|
Feature: events and check names
|
|
3
3
|
Flapjack must handle weird characters in check names in events
|
|
4
4
|
|
|
5
|
-
Background:
|
|
6
|
-
Given an entity 'foo-app-01.example.com' exists
|
|
7
|
-
|
|
8
5
|
@time
|
|
9
6
|
Scenario: acknowledgements for checks with colons
|
|
10
7
|
Given the check is check 'Disk C: Utilisation' on entity 'foo-app-01.example.com'
|
|
11
8
|
And the check is in an ok state
|
|
12
9
|
When a warning event is received
|
|
13
|
-
Then
|
|
10
|
+
Then no notifications should have been generated
|
|
14
11
|
When 1 minute passes
|
|
15
12
|
And a warning event is received
|
|
16
|
-
Then
|
|
13
|
+
Then 1 notification should have been generated
|
|
17
14
|
When an acknowledgement event is received
|
|
18
|
-
Then
|
|
15
|
+
Then 2 notifications should have been generated
|
|
19
16
|
When 1 minute passes
|
|
20
17
|
And a warning event is received
|
|
21
|
-
Then
|
|
18
|
+
Then 2 notifications should have been generated
|
|
@@ -2,80 +2,56 @@
|
|
|
2
2
|
Feature: Notification rules on a per contact basis
|
|
3
3
|
|
|
4
4
|
Background:
|
|
5
|
-
Given the following
|
|
6
|
-
| id
|
|
7
|
-
|
|
|
8
|
-
|
|
|
9
|
-
|
|
|
10
|
-
|
|
|
11
|
-
|
|
|
12
|
-
|
|
|
13
|
-
|
|
14
|
-
And the following
|
|
15
|
-
| id
|
|
16
|
-
|
|
|
17
|
-
|
|
|
18
|
-
|
|
|
19
|
-
|
|
|
20
|
-
|
|
|
21
|
-
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
| email |
|
|
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
|
-
| | email | email | | |
|
|
56
|
-
| baz | sms | sms | | |
|
|
57
|
-
| buf | email | email | | |
|
|
58
|
-
| buf | sms | sms | | |
|
|
59
|
-
| bar | email | email | true | true |
|
|
60
|
-
|
|
61
|
-
And user c4 has the following notification rules:
|
|
62
|
-
| tags | warning_media | critical_media | time_restrictions |
|
|
63
|
-
| | | | |
|
|
64
|
-
| xyz, disk, util | sms | sms | |
|
|
65
|
-
| xyz, ping | sms,email | sms,email | 8-18 weekdays |
|
|
66
|
-
|
|
67
|
-
And user c5 has the following notification rules:
|
|
68
|
-
| unknown_media | critical_media |
|
|
69
|
-
| email | email, sms |
|
|
70
|
-
|
|
71
|
-
And user c6 has the following notification rules:
|
|
72
|
-
| entities | regex_entities | tags | warning_media | critical_media |
|
|
73
|
-
| | | | | |
|
|
74
|
-
| foo-app-01.xyz | | check_disk | email | email |
|
|
75
|
-
| blakes7 | | | | email |
|
|
76
|
-
| blakes7 | ++* | | | sms |
|
|
77
|
-
|
|
78
|
-
@time_restrictions @time
|
|
5
|
+
Given the following contacts exist:
|
|
6
|
+
| id | name | timezone |
|
|
7
|
+
| 7f96a216-76aa-45fc-a88e-7431cd6d7aac | Malak Al-Musawi | Asia/Baghdad |
|
|
8
|
+
| 65d32027-1942-43b3-93c5-52f4b12d36b0 | Imani Farooq | Europe/Moscow |
|
|
9
|
+
| 9f77502c-1daf-47a2-b806-f3ae7d04cefb | Vera Дурейко | Europe/Paris |
|
|
10
|
+
| 158ec8fd-36ca-4d10-a2f4-dc04d374e321 | Lucia Moretti | Europe/Rome |
|
|
11
|
+
| 5da490ec-72a0-42b0-834f-4049867dfce7 | Wang Fang Wong | Asia/Shanghai |
|
|
12
|
+
| 09ab8f30-a2da-475b-a61f-8fdab4430567 | John Bloke | Australia/Sydney |
|
|
13
|
+
|
|
14
|
+
And the following media exist:
|
|
15
|
+
| id | contact_id | transport | address | interval | rollup_threshold |
|
|
16
|
+
| 28032dbf-388d-4f52-91b2-dc5e5be2becc | 7f96a216-76aa-45fc-a88e-7431cd6d7aac | email | malak@example.com | 15 | 5 |
|
|
17
|
+
| 73e2803f-948e-467a-a707-37b9f53ee21a | 7f96a216-76aa-45fc-a88e-7431cd6d7aac | sms | +61400000001 | 60 | 5 |
|
|
18
|
+
| 1d473cef-5369-4396-9f59-533f3db6c1cb | 65d32027-1942-43b3-93c5-52f4b12d36b0 | email | imani@example.com | 15 | 5 |
|
|
19
|
+
| 7f96a216-76aa-45fc-a88e-7431cd6d7aac | 65d32027-1942-43b3-93c5-52f4b12d36b0 | sms | +61400000002 | 60 | 5 |
|
|
20
|
+
| 65d32027-1942-43b3-93c5-52f4b12d36b0 | 9f77502c-1daf-47a2-b806-f3ae7d04cefb | email | vera@example.com | 15 | 5 |
|
|
21
|
+
| 55d3778e-e4b2-4dcc-8337-03fcbd2e5f80 | 9f77502c-1daf-47a2-b806-f3ae7d04cefb | sms | +61400000003 | 60 | 5 |
|
|
22
|
+
| 19ef48b1-9a42-488b-9734-00314c79e5eb | 158ec8fd-36ca-4d10-a2f4-dc04d374e321 | email | lucia@example.com | 15 | 5 |
|
|
23
|
+
| ad25c952-c300-4285-9301-ef4408c9d645 | 158ec8fd-36ca-4d10-a2f4-dc04d374e321 | sms | +61400000004 | 60 | 5 |
|
|
24
|
+
| f15078cf-3643-4cf1-b701-ac9fe2836365 | 5da490ec-72a0-42b0-834f-4049867dfce7 | email | fang@example.com | 15 | 5 |
|
|
25
|
+
| 862228f8-fc80-4887-bc4c-e133fcda4107 | 5da490ec-72a0-42b0-834f-4049867dfce7 | sms | +61400000005 | 60 | 5 |
|
|
26
|
+
| 2e92f734-0597-40bb-bcc6-6ccef4b34720 | 09ab8f30-a2da-475b-a61f-8fdab4430567 | email | bloke@example.com | 15 | 5 |
|
|
27
|
+
| 94b74a9f-7d16-4713-83cf-37196abed014 | 09ab8f30-a2da-475b-a61f-8fdab4430567 | sms | +61400000006 | 60 | 5 |
|
|
28
|
+
|
|
29
|
+
And the following checks exist:
|
|
30
|
+
| id | name | tags |
|
|
31
|
+
| 56c13ce2-f246-4bc6-adfa-2206789c3ced | foo:ping | foo,ping |
|
|
32
|
+
| 91d66290-2c70-4c0e-a955-acb5bf9e721e | foo:ssh | foo,ssh |
|
|
33
|
+
| d1a39575-0480-4f65-a7f7-64c90db93731 | bar:ping | bar,ping |
|
|
34
|
+
| 2ae8327c-ecf3-4544-ac3e-9c7779503a4a | baz:ping | baz,ping |
|
|
35
|
+
| 982fc9fb-fbf8-44cd-b6de-6ccbab8e7230 | buf:ping | buf,ping |
|
|
36
|
+
|
|
37
|
+
And the following rules exist:
|
|
38
|
+
| name | id | contact_id | blackhole | strategy | tags | condition | time_restriction | media_ids |
|
|
39
|
+
| malak email t | b0c8deb9-b8c8-4fdd-acc4-72493852ca15 | 7f96a216-76aa-45fc-a88e-7431cd6d7aac | false | all_tags | foo,ping | critical | 8-18 weekdays | 28032dbf-388d-4f52-91b2-dc5e5be2becc |
|
|
40
|
+
| imani email | 2df6bbc4-d6a4-4f23-b6e5-5c4a07c6e686 | 65d32027-1942-43b3-93c5-52f4b12d36b0 | false | all_tags | bar,ping | critical,unknown | | 1d473cef-5369-4396-9f59-533f3db6c1cb |
|
|
41
|
+
| imani sms | fb989a80-2f65-49e6-8d73-1777ad0aee0d | 65d32027-1942-43b3-93c5-52f4b12d36b0 | false | any_tag | buf,ssh | | | 7f96a216-76aa-45fc-a88e-7431cd6d7aac |
|
|
42
|
+
| vera email | fc2d1b1f-1480-45dd-814b-4655bc5b1474 | 9f77502c-1daf-47a2-b806-f3ae7d04cefb | false | all_tags | foo,ping | critical | | 65d32027-1942-43b3-93c5-52f4b12d36b0 |
|
|
43
|
+
| vera sms | 7c123a29-1a67-4a32-b38e-2658e63834d8 | 9f77502c-1daf-47a2-b806-f3ae7d04cefb | false | all_tags | foo,ping | | | 55d3778e-e4b2-4dcc-8337-03fcbd2e5f80 |
|
|
44
|
+
| lucia email, sms t | e8a67e7c-4f3d-4d9b-afe4-ef276bbeb0df | 158ec8fd-36ca-4d10-a2f4-dc04d374e321 | false | all_tags | baz,ping | critical | 8-18 weekdays | 19ef48b1-9a42-488b-9734-00314c79e5eb,ad25c952-c300-4285-9301-ef4408c9d645 |
|
|
45
|
+
| lucia email t | 0a3c66f2-6245-49cf-a02c-28d586b2f55a | 158ec8fd-36ca-4d10-a2f4-dc04d374e321 | false | all_tags | baz,ping | warning | 8-18 weekdays | 19ef48b1-9a42-488b-9734-00314c79e5eb |
|
|
46
|
+
| malak email | 9b437f3e-4b48-4516-8067-a57935684777 | 7f96a216-76aa-45fc-a88e-7431cd6d7aac | false | all_tags | buf,ping | critical | | 28032dbf-388d-4f52-91b2-dc5e5be2becc |
|
|
47
|
+
| fang email | 724bf183-215c-4ba9-b835-56db781c4844 | 5da490ec-72a0-42b0-834f-4049867dfce7 | false | global | | | | f15078cf-3643-4cf1-b701-ac9fe2836365 |
|
|
48
|
+
| fang sms | 1c501800-6b20-458d-bb99-a78d17397c00 | 5da490ec-72a0-42b0-834f-4049867dfce7 | false | global | | | | 862228f8-fc80-4887-bc4c-e133fcda4107 |
|
|
49
|
+
| drop malak email | dd7005b9-d30b-4875-9e83-dec7fb70895c | 7f96a216-76aa-45fc-a88e-7431cd6d7aac | true | all_tags | buf,ping | | | 28032dbf-388d-4f52-91b2-dc5e5be2becc |
|
|
50
|
+
| bloke sms g | 4441658d-c7af-45ef-bc8e-f6cd61fdc241 | 09ab8f30-a2da-475b-a61f-8fdab4430567 | false | global | | | | 94b74a9f-7d16-4713-83cf-37196abed014 |
|
|
51
|
+
| bloke sms no | 0f860a78-2f8a-40ca-8070-e1d88c6ff041 | 09ab8f30-a2da-475b-a61f-8fdab4430567 | true | no_tag | buf | | | 94b74a9f-7d16-4713-83cf-37196abed014 |
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
@time_restriction @time
|
|
79
55
|
Scenario: Alerts only during specified time restrictions
|
|
80
56
|
Given the timezone is Asia/Baghdad
|
|
81
57
|
And the time is February 1 2013 6:59
|
|
@@ -90,75 +66,65 @@ Feature: Notification rules on a per contact basis
|
|
|
90
66
|
And a critical event is received
|
|
91
67
|
Then 1 email alert should be queued for malak@example.com
|
|
92
68
|
When the time is February 1 2013 12:00
|
|
93
|
-
Then all alert dropping keys for user c1 should have expired
|
|
94
69
|
When a critical event is received
|
|
95
70
|
Then 2 email alerts should be queued for malak@example.com
|
|
96
71
|
When the time is February 1 2013 17:59
|
|
97
|
-
Then all alert dropping keys for user c1 should have expired
|
|
98
72
|
When a critical event is received
|
|
99
73
|
Then 3 email alerts should be queued for malak@example.com
|
|
100
74
|
When the time is February 1 2013 18:01
|
|
101
75
|
When a critical event is received
|
|
102
76
|
Then 3 email alerts should be queued for malak@example.com
|
|
103
77
|
|
|
104
|
-
Scenario: time
|
|
105
|
-
|
|
106
|
-
@time
|
|
107
|
-
Scenario: skip rule with invalid regex
|
|
108
|
-
Given the check is check 'ping' on entity 'blakes7'
|
|
109
|
-
And the check is in an ok state
|
|
110
|
-
When a critical event is received
|
|
111
|
-
And 5 minutes passes
|
|
112
|
-
And a critical event is received
|
|
113
|
-
Then 1 email alert should be queued for jive@example.com
|
|
114
|
-
And 0 sms alerts should be queued for +61400000006
|
|
78
|
+
# Scenario: time restriction continues to work as expected when a contact changes timezone
|
|
115
79
|
|
|
116
80
|
@severity @time
|
|
117
|
-
Scenario: Don't alert when
|
|
81
|
+
Scenario: Don't alert when severity does not match any matching routes's severity
|
|
118
82
|
Given the check is check 'ping' on entity 'bar'
|
|
119
83
|
And the check is in an ok state
|
|
120
84
|
When a warning event is received
|
|
121
85
|
And 60 minutes passes
|
|
122
86
|
And a warning event is received
|
|
123
|
-
Then no email alerts should be queued for
|
|
87
|
+
Then no email alerts should be queued for imani@example.com
|
|
124
88
|
|
|
125
89
|
@severity @time
|
|
126
|
-
Scenario: Recoveries are not affected by
|
|
127
|
-
Given the check is check 'ping' on entity '
|
|
90
|
+
Scenario: Recoveries are not affected by intervals
|
|
91
|
+
Given the check is check 'ping' on entity 'foo'
|
|
128
92
|
And the check is in an ok state
|
|
129
93
|
When a critical event is received
|
|
130
94
|
And 5 minutes passes
|
|
131
95
|
And a critical event is received
|
|
132
|
-
Then 1 email alert should be queued for
|
|
96
|
+
Then 1 email alert should be queued for vera@example.com
|
|
133
97
|
When 1 minute passes
|
|
134
98
|
And an ok event is received
|
|
135
|
-
Then 2 email alerts should be queued for
|
|
99
|
+
Then 2 email alerts should be queued for vera@example.com
|
|
136
100
|
|
|
137
101
|
@severity @time
|
|
138
102
|
Scenario: Alerts are sent to media of highest severity reached since last ok
|
|
139
|
-
Given the
|
|
103
|
+
Given the timezone is Europe/Rome
|
|
104
|
+
And the time is February 1 2013 8:01
|
|
105
|
+
And the check is check 'ping' on entity 'baz'
|
|
140
106
|
And the check is in an ok state
|
|
141
107
|
When a warning event is received
|
|
142
108
|
And 1 minute passes
|
|
143
109
|
And a warning event is received
|
|
144
|
-
Then 1 email alert should be queued for
|
|
145
|
-
And 0 sms alerts should be queued for +
|
|
110
|
+
Then 1 email alert should be queued for lucia@example.com
|
|
111
|
+
And 0 sms alerts should be queued for +61400000004
|
|
146
112
|
When 70 minutes passes
|
|
147
113
|
And a critical event is received
|
|
148
114
|
And 1 minute passes
|
|
149
115
|
And a critical event is received
|
|
150
|
-
Then 2 email alerts should be queued for
|
|
151
|
-
And 1 sms alert should be queued for +
|
|
116
|
+
Then 2 email alerts should be queued for lucia@example.com
|
|
117
|
+
And 1 sms alert should be queued for +61400000004
|
|
152
118
|
When 70 minutes passes
|
|
153
119
|
And a warning event is received
|
|
154
120
|
And 1 minute passes
|
|
155
121
|
And a warning event is received
|
|
156
|
-
Then 3 email alerts should be queued for
|
|
157
|
-
And 2 sms alerts should be queued for +
|
|
122
|
+
Then 3 email alerts should be queued for lucia@example.com
|
|
123
|
+
And 2 sms alerts should be queued for +61400000004
|
|
158
124
|
When 70 minutes passes
|
|
159
125
|
And an ok event is received
|
|
160
|
-
Then 4 email alerts should be queued for
|
|
161
|
-
And 3 sms alerts should be queued for +
|
|
126
|
+
Then 4 email alerts should be queued for lucia@example.com
|
|
127
|
+
And 3 sms alerts should be queued for +61400000004
|
|
162
128
|
|
|
163
129
|
@severity @time
|
|
164
130
|
Scenario: Alerts only when media,severity matches any matching rule's severity's media with ok->warning->critical->ok
|
|
@@ -167,17 +133,17 @@ Feature: Notification rules on a per contact basis
|
|
|
167
133
|
When a warning event is received
|
|
168
134
|
And 1 minute passes
|
|
169
135
|
And a warning event is received
|
|
170
|
-
Then no email alerts should be queued for
|
|
136
|
+
Then no email alerts should be queued for imani@example.com
|
|
171
137
|
When a critical event is received
|
|
172
138
|
And 5 minutes passes
|
|
173
139
|
And a critical event is received
|
|
174
|
-
Then 1 email alert should be queued for
|
|
140
|
+
Then 1 email alert should be queued for imani@example.com
|
|
175
141
|
When 1 minute passes
|
|
176
142
|
And an ok event is received
|
|
177
|
-
Then 2 email alert should be queued for
|
|
143
|
+
Then 2 email alert should be queued for imani@example.com
|
|
178
144
|
|
|
179
145
|
@blackhole @time
|
|
180
|
-
Scenario: Drop alerts matching a
|
|
146
|
+
Scenario: Drop alerts matching a rejector
|
|
181
147
|
Given the check is check 'ping' on entity 'buf'
|
|
182
148
|
And the check is in an ok state
|
|
183
149
|
When a critical event is received
|
|
@@ -185,80 +151,58 @@ Feature: Notification rules on a per contact basis
|
|
|
185
151
|
And a critical event is received
|
|
186
152
|
Then 0 email alerts should be queued for malak@example.com
|
|
187
153
|
|
|
188
|
-
@blackhole @time
|
|
189
|
-
Scenario: Drop alerts matching a blackhole rule by entity
|
|
190
|
-
Given the check is check 'ping' on entity 'bar'
|
|
191
|
-
And the check is in an ok state
|
|
192
|
-
When a warning event is received
|
|
193
|
-
And 1 minute passes
|
|
194
|
-
And a warning event is received
|
|
195
|
-
Then 0 email alerts should be queued for malak@example.com
|
|
196
|
-
And 0 email alerts should be queued for vera@example.com
|
|
197
|
-
When an ok event is received
|
|
198
|
-
Then 0 email alerts should be queued for malak@example.com
|
|
199
|
-
And 0 email alerts should be queued for vera@example.com
|
|
200
|
-
|
|
201
|
-
@blackhole @time
|
|
202
|
-
Scenario: Drop alerts matching a blackhole rule by tags
|
|
203
|
-
Given the check is check 'wags the dog' on entity 'blakes7'
|
|
204
|
-
And the check is in an ok state
|
|
205
|
-
When a warning event is received
|
|
206
|
-
And 1 minute passes
|
|
207
|
-
And a warning event is received
|
|
208
|
-
Then 0 email alerts should be queued for imani@example.com
|
|
209
|
-
When an ok event is received
|
|
210
|
-
Then 0 email alerts should be queued for imani@example.com
|
|
211
|
-
|
|
212
154
|
@intervals @time
|
|
213
155
|
Scenario: Alerts according to custom interval
|
|
214
156
|
Given the check is check 'ping' on entity 'bar'
|
|
215
157
|
And the check is in an ok state
|
|
216
158
|
When a critical event is received
|
|
217
|
-
Then no email alerts should be queued for
|
|
159
|
+
Then no email alerts should be queued for imani@example.com
|
|
218
160
|
When 1 minute passes
|
|
219
161
|
And a critical event is received
|
|
220
|
-
Then 1 email alert should be queued for
|
|
162
|
+
Then 1 email alert should be queued for imani@example.com
|
|
221
163
|
When 10 minutes passes
|
|
222
164
|
And a critical event is received
|
|
223
|
-
Then 1 email alert should be queued for
|
|
165
|
+
Then 1 email alert should be queued for imani@example.com
|
|
224
166
|
When 6 minutes passes
|
|
225
167
|
And a critical event is received
|
|
226
|
-
Then 2 email alerts should be queued for
|
|
168
|
+
Then 2 email alerts should be queued for imani@example.com
|
|
227
169
|
|
|
228
170
|
@intervals @time
|
|
229
171
|
Scenario: Alerts according to custom interval with unknown
|
|
230
172
|
Given the check is check 'ping' on entity 'bar'
|
|
231
173
|
And the check is in an ok state
|
|
232
174
|
When an unknown event is received
|
|
233
|
-
Then no email alerts should be queued for
|
|
175
|
+
Then no email alerts should be queued for imani@example.com
|
|
234
176
|
When 1 minute passes
|
|
235
177
|
And an unknown event is received
|
|
236
|
-
Then 1 email alert should be queued for
|
|
178
|
+
Then 1 email alert should be queued for imani@example.com
|
|
237
179
|
When 10 minutes passes
|
|
238
180
|
And an unknown event is received
|
|
239
|
-
Then 1 email alert should be queued for
|
|
181
|
+
Then 1 email alert should be queued for imani@example.com
|
|
240
182
|
When 6 minutes passes
|
|
241
183
|
And an unknown event is received
|
|
242
|
-
Then 2 email alerts should be queued for
|
|
184
|
+
Then 2 email alerts should be queued for imani@example.com
|
|
243
185
|
|
|
244
186
|
@intervals @time
|
|
245
|
-
Scenario: Problem directly after
|
|
246
|
-
Given the
|
|
187
|
+
Scenario: Problem directly after recovery should alert despite notification intervals
|
|
188
|
+
Given the timezone is Europe/Rome
|
|
189
|
+
And the time is February 1 2013 8:01
|
|
190
|
+
And the check is check 'ping' on entity 'baz'
|
|
247
191
|
And the check is in an ok state
|
|
248
192
|
When a critical event is received
|
|
249
193
|
And 1 minute passes
|
|
250
194
|
And a critical event is received
|
|
251
|
-
Then 1 email alert should be queued for
|
|
252
|
-
And 1 sms alert should be queued for +
|
|
195
|
+
Then 1 email alert should be queued for lucia@example.com
|
|
196
|
+
And 1 sms alert should be queued for +61400000004
|
|
253
197
|
When an ok event is received
|
|
254
|
-
Then 2 email alerts should be queued for
|
|
255
|
-
And 2 sms alerts should be queued for +
|
|
198
|
+
Then 2 email alerts should be queued for lucia@example.com
|
|
199
|
+
And 2 sms alerts should be queued for +61400000004
|
|
256
200
|
When 1 minute passes
|
|
257
201
|
And a critical event is received
|
|
258
202
|
And 1 minute passes
|
|
259
203
|
And a critical event is received
|
|
260
|
-
Then 3 email alerts should be queued for
|
|
261
|
-
And 3 sms alerts should be queued for +
|
|
204
|
+
Then 3 email alerts should be queued for lucia@example.com
|
|
205
|
+
And 3 sms alerts should be queued for +61400000004
|
|
262
206
|
|
|
263
207
|
@intervals @time
|
|
264
208
|
Scenario: Problem directly after Recovery should alert despite notification intervals with unknown
|
|
@@ -267,19 +211,18 @@ Feature: Notification rules on a per contact basis
|
|
|
267
211
|
When an unknown event is received
|
|
268
212
|
And 1 minute passes
|
|
269
213
|
And an unknown event is received
|
|
270
|
-
Then 1 email alert should be queued for
|
|
214
|
+
Then 1 email alert should be queued for imani@example.com
|
|
271
215
|
When an ok event is received
|
|
272
|
-
Then 2 email alert should be queued for
|
|
216
|
+
Then 2 email alert should be queued for imani@example.com
|
|
273
217
|
When 1 minute passes
|
|
274
218
|
And an unknown event is received
|
|
275
219
|
And 1 minute passes
|
|
276
220
|
And an unknown event is received
|
|
277
|
-
Then 3 email alerts should be queued for
|
|
278
|
-
And 0 sms alerts should be queued for +61400000001
|
|
221
|
+
Then 3 email alerts should be queued for imani@example.com
|
|
279
222
|
|
|
280
223
|
@time
|
|
281
|
-
Scenario: Contact
|
|
282
|
-
Given the check is check 'ping' on entity '
|
|
224
|
+
Scenario: Contact without a global rule is not notified for non-matching checks
|
|
225
|
+
Given the check is check 'ping' on entity 'baz'
|
|
283
226
|
And the check is in an ok state
|
|
284
227
|
When a critical event is received
|
|
285
228
|
And 1 minute passes
|
|
@@ -287,17 +230,17 @@ Feature: Notification rules on a per contact basis
|
|
|
287
230
|
Then no email alerts should be queued for malak@example.com
|
|
288
231
|
|
|
289
232
|
@time
|
|
290
|
-
Scenario: Contact with
|
|
291
|
-
Given the check is check 'ping' on entity '
|
|
233
|
+
Scenario: Contact with a global rule should be notified for all events
|
|
234
|
+
Given the check is check 'ping' on entity 'bar'
|
|
292
235
|
And the check is in an ok state
|
|
293
236
|
When a critical event is received
|
|
294
237
|
And 1 minute passes
|
|
295
238
|
And a critical event is received
|
|
296
|
-
Then 1 email alert should be queued for
|
|
239
|
+
Then 1 email alert should be queued for fang@example.com
|
|
297
240
|
|
|
298
241
|
@time
|
|
299
|
-
Scenario:
|
|
300
|
-
Given the check is check 'ping' on entity '
|
|
242
|
+
Scenario: Multiple matching 'all_tags' rules should be additive
|
|
243
|
+
Given the check is check 'ping' on entity 'foo'
|
|
301
244
|
And the check is in an ok state
|
|
302
245
|
When a critical event is received
|
|
303
246
|
And 1 minute passes
|
|
@@ -306,47 +249,61 @@ Feature: Notification rules on a per contact basis
|
|
|
306
249
|
Then 1 sms alert should be queued for +61400000003
|
|
307
250
|
|
|
308
251
|
@time
|
|
309
|
-
Scenario: Multiple
|
|
310
|
-
Given the check is check 'ping' on entity '
|
|
252
|
+
Scenario: Multiple global rules should be additive
|
|
253
|
+
Given the check is check 'ping' on entity 'bar'
|
|
254
|
+
And the check is in an ok state
|
|
255
|
+
When a critical event is received
|
|
256
|
+
And 1 minute passes
|
|
257
|
+
And a critical event is received
|
|
258
|
+
Then 1 email alert should be queued for fang@example.com
|
|
259
|
+
Then 1 sms alert should be queued for +61400000005
|
|
260
|
+
|
|
261
|
+
@time
|
|
262
|
+
Scenario: An 'any_tag' rule should match even if only one tag matches
|
|
263
|
+
Given the check is check 'ssh' on entity 'foo'
|
|
311
264
|
And the check is in an ok state
|
|
312
265
|
When a critical event is received
|
|
313
266
|
And 1 minute passes
|
|
314
267
|
And a critical event is received
|
|
315
|
-
Then 1 email alert should be queued for imani@example.com
|
|
316
268
|
Then 1 sms alert should be queued for +61400000002
|
|
317
269
|
|
|
318
270
|
@time
|
|
319
|
-
Scenario:
|
|
320
|
-
Given the check is check 'ping' on entity '
|
|
271
|
+
Scenario: A 'no_tag' blackhole rule should not match if a tag matches
|
|
272
|
+
Given the check is check 'ping' on entity 'buf'
|
|
321
273
|
And the check is in an ok state
|
|
322
274
|
When a critical event is received
|
|
323
275
|
And 1 minute passes
|
|
324
276
|
And a critical event is received
|
|
325
|
-
Then
|
|
326
|
-
|
|
277
|
+
Then 1 sms alert should be queued for +61400000006
|
|
278
|
+
|
|
279
|
+
@time
|
|
280
|
+
Scenario: A 'no_tag' blackhole rule should match if no tag matches
|
|
281
|
+
Given the check is check 'ping' on entity 'foo'
|
|
282
|
+
And the check is in an ok state
|
|
283
|
+
When a critical event is received
|
|
284
|
+
And 1 minute passes
|
|
285
|
+
And a critical event is received
|
|
286
|
+
Then no sms alerts should be queued for +61400000006
|
|
327
287
|
|
|
328
288
|
@time
|
|
329
289
|
Scenario: Test notifications behave like a critical notification
|
|
330
|
-
Given the check is check 'ping' on entity '
|
|
290
|
+
Given the check is check 'ping' on entity 'bar'
|
|
331
291
|
And the check is in an ok state
|
|
332
292
|
When a test event is received
|
|
333
|
-
Then 1 email alert should be queued for
|
|
334
|
-
|
|
293
|
+
Then 1 email alert should be queued for imani@example.com
|
|
294
|
+
|
|
335
295
|
@time
|
|
336
296
|
Scenario: Critical straight after test
|
|
337
|
-
Given the check is check 'ping' on entity '
|
|
297
|
+
Given the check is check 'ping' on entity 'bar'
|
|
338
298
|
And the check is in an ok state
|
|
339
299
|
When a test event is received
|
|
340
|
-
Then 1 email alert should be queued for
|
|
341
|
-
And 1 sms alert should be queued for +61400000001
|
|
300
|
+
Then 1 email alert should be queued for imani@example.com
|
|
342
301
|
When 10 seconds passes
|
|
343
302
|
And a critical event is received
|
|
344
|
-
Then 1 email alert should be queued for
|
|
345
|
-
And 1 sms alert should be queued for +61400000001
|
|
303
|
+
Then 1 email alert should be queued for imani@example.com
|
|
346
304
|
When 40 seconds passes
|
|
347
305
|
And a critical event is received
|
|
348
|
-
Then 2 email alert should be queued for
|
|
349
|
-
And 2 sms alert should be queued for +61400000001
|
|
306
|
+
Then 2 email alert should be queued for imani@example.com
|
|
350
307
|
|
|
351
308
|
@time
|
|
352
309
|
Scenario: Unknown event during unscheduled maintenance
|
|
@@ -355,63 +312,30 @@ Feature: Notification rules on a per contact basis
|
|
|
355
312
|
When an unknown event is received
|
|
356
313
|
And 1 minute passes
|
|
357
314
|
And an unknown event is received
|
|
358
|
-
Then 1 email alert should be queued for
|
|
315
|
+
Then 1 email alert should be queued for imani@example.com
|
|
359
316
|
When 6 minutes passes
|
|
360
317
|
And an acknowledgement event is received
|
|
361
|
-
Then 2 email alerts should be queued for
|
|
318
|
+
Then 2 email alerts should be queued for imani@example.com
|
|
362
319
|
When 6 minutes passes
|
|
363
320
|
And an unknown event is received
|
|
364
|
-
Then 2 email alerts should be queued for
|
|
321
|
+
Then 2 email alerts should be queued for imani@example.com
|
|
365
322
|
When 1 minute passes
|
|
366
323
|
And an unknown event is received
|
|
367
|
-
Then 2 email alerts should be queued for
|
|
324
|
+
Then 2 email alerts should be queued for imani@example.com
|
|
368
325
|
|
|
369
326
|
Scenario: Unknown events alert only specified media
|
|
370
|
-
Given the check is check 'ping' on entity '
|
|
327
|
+
Given the check is check 'ping' on entity 'bar'
|
|
371
328
|
And the check is in an ok state
|
|
372
329
|
When an unknown event is received
|
|
373
330
|
And 1 minute passes
|
|
374
331
|
And an unknown event is received
|
|
375
|
-
Then 0 sms alerts should be queued for +
|
|
376
|
-
|
|
377
|
-
@time
|
|
378
|
-
Scenario: A blackhole rule on an entity should override another matching entity specific rule
|
|
379
|
-
|
|
380
|
-
@time
|
|
381
|
-
Scenario: A blackhole rule on an entity should override another matching general rule
|
|
382
|
-
|
|
383
|
-
@time
|
|
384
|
-
Scenario: Notify when tags in a rule match the event's tags
|
|
385
|
-
Given the check is check 'Disk / Util' on entity 'foo-app-01.xyz'
|
|
386
|
-
And the check is in an ok state
|
|
387
|
-
When a critical event is received
|
|
388
|
-
And 1 minute passes
|
|
389
|
-
And a critical event is received
|
|
390
|
-
Then 1 sms alert should be queued for +61400000004
|
|
391
|
-
|
|
392
|
-
@time
|
|
393
|
-
Scenario: Don't notify when tags in a rule don't match the event's tags
|
|
394
|
-
Given the check is check 'Memory Util' on entity 'foo-app-01.xyz'
|
|
395
|
-
And the check is in an ok state
|
|
396
|
-
When a critical event is received
|
|
397
|
-
And 1 minute passes
|
|
398
|
-
And a critical event is received
|
|
399
|
-
Then no sms alerts should be queued for +61400000004
|
|
332
|
+
Then 0 sms alerts should be queued for +61400000002
|
|
400
333
|
|
|
401
334
|
@time
|
|
402
|
-
Scenario:
|
|
403
|
-
Given the check is check 'Memory Util' on entity 'foo-app-01.xyz'
|
|
404
|
-
And the check is in an ok state
|
|
405
|
-
When a critical event is received
|
|
406
|
-
And 1 minute passes
|
|
407
|
-
And a critical event is received
|
|
408
|
-
Then no email alerts should be queued for jive@example.com
|
|
409
|
-
|
|
410
|
-
@time
|
|
411
|
-
Scenario: Only notify during specified time periods in tag matched rules
|
|
335
|
+
Scenario: Only notify during specified time periods
|
|
412
336
|
Given the timezone is Europe/Rome
|
|
413
337
|
And the time is February 1 2013 6:59
|
|
414
|
-
And the check is check 'ping' on entity '
|
|
338
|
+
And the check is check 'ping' on entity 'baz'
|
|
415
339
|
And the check is in an ok state
|
|
416
340
|
And a critical event is received
|
|
417
341
|
Then no sms alerts should be queued for +61400000004
|
|
@@ -422,37 +346,34 @@ Feature: Notification rules on a per contact basis
|
|
|
422
346
|
And a critical event is received
|
|
423
347
|
Then 1 sms alert should be queued for +61400000004
|
|
424
348
|
When the time is February 1 2013 12:00
|
|
425
|
-
Then all alert dropping keys for user c1 should have expired
|
|
426
349
|
When a critical event is received
|
|
427
350
|
Then 2 sms alerts should be queued for +61400000004
|
|
428
351
|
When the time is February 1 2013 17:59
|
|
429
|
-
Then all alert dropping keys for user c1 should have expired
|
|
430
352
|
When a critical event is received
|
|
431
353
|
Then 3 sms alerts should be queued for +61400000004
|
|
432
354
|
When the time is February 1 2013 18:01
|
|
433
|
-
Then all alert dropping keys for user c1 should have expired
|
|
434
355
|
When a critical event is received
|
|
435
356
|
Then 3 sms alerts should be queued for +61400000004
|
|
436
357
|
|
|
437
358
|
# tests that notifications are sent as acknowledgement clears the notification intervals
|
|
438
359
|
@time
|
|
439
360
|
Scenario: an second acknowledgement is created after the first is deleted (gh-308)
|
|
440
|
-
Given the check is check 'ping' on entity '
|
|
361
|
+
Given the check is check 'ping' on entity 'bar'
|
|
441
362
|
And the check is in an ok state
|
|
442
363
|
When a critical event is received
|
|
443
364
|
And 1 minute passes
|
|
444
365
|
And a critical event is received
|
|
445
|
-
Then 1 email alert should be queued for
|
|
366
|
+
Then 1 email alert should be queued for imani@example.com
|
|
446
367
|
When 1 minute passes
|
|
447
368
|
And an acknowledgement event is received
|
|
448
369
|
Then unscheduled maintenance should be generated
|
|
449
|
-
And 2 email alerts should be queued for
|
|
370
|
+
And 2 email alerts should be queued for imani@example.com
|
|
450
371
|
When 1 minute passes
|
|
451
372
|
And the unscheduled maintenance is ended
|
|
452
373
|
And 1 minute passes
|
|
453
374
|
And a critical event is received
|
|
454
|
-
Then 3 email alerts should be queued for
|
|
375
|
+
Then 3 email alerts should be queued for imani@example.com
|
|
455
376
|
When 1 minute passes
|
|
456
377
|
And an acknowledgement event is received
|
|
457
378
|
Then unscheduled maintenance should be generated
|
|
458
|
-
And 4 email alerts should be queued for
|
|
379
|
+
And 4 email alerts should be queued for imani@example.com
|