Michal Kobus | ac2e16d | 2019-03-18 11:19:42 +0100 | [diff] [blame] | 1 | parameters: |
| 2 | prometheus: |
| 3 | elasticsearch_exporter: |
| 4 | queries: |
| 5 | compute_instance: |
| 6 | # Produces metrics: |
| 7 | # - compute_instance_event_doc_count{event="example"} |
| 8 | # - compute_instance_event_sum_other_doc_count |
| 9 | # - compute_instance_event_doc_count_error_upper_bound |
Michal Kobus | ac2e16d | 2019-03-18 11:19:42 +0100 | [diff] [blame] | 10 | # |
| 11 | indices: '<notification-{now/d}>' |
| 12 | interval: 600 |
| 13 | json: | |
| 14 | { |
| 15 | "size": 0, |
Michal Kobus | ac2e16d | 2019-03-18 11:19:42 +0100 | [diff] [blame] | 16 | "aggs": { |
| 17 | "event": { |
| 18 | "terms": { |
| 19 | "field": "event_type.keyword" |
Michal Kobus | ac2e16d | 2019-03-18 11:19:42 +0100 | [diff] [blame] | 20 | } |
| 21 | } |
| 22 | } |
| 23 | } |
| 24 | |
| 25 | compute_instance_create_start: |
| 26 | # Produces metrics: |
Michal Kobus | 8a3301e | 2019-05-27 13:41:06 +0200 | [diff] [blame^] | 27 | # - compute_instance_create_start_event_doc_count |
| 28 | # - compute_instance_create_start_event_sum_other_doc_count |
| 29 | # - compute_instance_create_start_event_doc_count_error_upper_bound |
Michal Kobus | ac2e16d | 2019-03-18 11:19:42 +0100 | [diff] [blame] | 30 | # - compute_instance_create_start_hits |
| 31 | # - compute_instance_create_start_took_milliseconds |
| 32 | # |
| 33 | indices: '<notification-{now/d}>' |
| 34 | interval: 60 |
| 35 | json: | |
| 36 | { |
| 37 | "size": 0, |
Michal Kobus | ac2e16d | 2019-03-18 11:19:42 +0100 | [diff] [blame] | 38 | "aggs": { |
Michal Kobus | 8a3301e | 2019-05-27 13:41:06 +0200 | [diff] [blame^] | 39 | "event": { |
| 40 | "filter": { |
| 41 | "term": { |
| 42 | "event_type.keyword": "compute.instance.create.start" |
| 43 | } |
Michal Kobus | ac2e16d | 2019-03-18 11:19:42 +0100 | [diff] [blame] | 44 | } |
| 45 | } |
| 46 | } |
| 47 | } |
| 48 | |
| 49 | compute_instance_create_end: |
| 50 | # Produces metrics: |
Michal Kobus | 8a3301e | 2019-05-27 13:41:06 +0200 | [diff] [blame^] | 51 | # - compute_instance_create_end_event_doc_count |
| 52 | # - compute_instance_create_end_event_sum_other_doc_count |
| 53 | # - compute_instance_create_end_event_doc_count_error_upper_bound |
Michal Kobus | ac2e16d | 2019-03-18 11:19:42 +0100 | [diff] [blame] | 54 | # - compute_instance_create_end_hits |
| 55 | # - compute_instance_create_end_took_milliseconds |
| 56 | # |
| 57 | indices: '<notification-{now/d}>' |
| 58 | interval: 60 |
| 59 | json: | |
| 60 | { |
| 61 | "size": 0, |
Michal Kobus | ac2e16d | 2019-03-18 11:19:42 +0100 | [diff] [blame] | 62 | "aggs": { |
Michal Kobus | 8a3301e | 2019-05-27 13:41:06 +0200 | [diff] [blame^] | 63 | "event": { |
| 64 | "filter": { |
| 65 | "term": { |
| 66 | "event_type.keyword": "compute.instance.create.end" |
| 67 | } |
Michal Kobus | ac2e16d | 2019-03-18 11:19:42 +0100 | [diff] [blame] | 68 | } |
| 69 | } |
| 70 | } |
| 71 | } |
| 72 | |
| 73 | compute_instance_create_error: |
| 74 | # Produces metrics: |
Michal Kobus | 8a3301e | 2019-05-27 13:41:06 +0200 | [diff] [blame^] | 75 | # - compute_instance_create_error_event_doc_count |
| 76 | # - compute_instance_create_error_event_sum_other_doc_count |
| 77 | # - compute_instance_create_error_event_doc_count_error_upper_bound |
Michal Kobus | ac2e16d | 2019-03-18 11:19:42 +0100 | [diff] [blame] | 78 | # - compute_instance_create_error_hits |
| 79 | # - compute_instance_create_error_took_milliseconds |
| 80 | # |
| 81 | indices: '<notification-{now/d}>' |
| 82 | interval: 60 |
| 83 | json: | |
| 84 | { |
| 85 | "size": 0, |
Michal Kobus | ac2e16d | 2019-03-18 11:19:42 +0100 | [diff] [blame] | 86 | "aggs": { |
Michal Kobus | 8a3301e | 2019-05-27 13:41:06 +0200 | [diff] [blame^] | 87 | "event": { |
| 88 | "filter": { |
| 89 | "term": { |
| 90 | "event_type.keyword": "compute.instance.create.error" |
| 91 | } |
Michal Kobus | ac2e16d | 2019-03-18 11:19:42 +0100 | [diff] [blame] | 92 | } |
| 93 | } |
| 94 | } |
| 95 | } |