Michal Kobus | c26cfc1 | 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 |
| 10 | # - compute_instance_event_host_doc_count{host="example01",event="example"} |
| 11 | # - compute_instance_event_host_sum_other_doc_count{event="example"} |
| 12 | # - compute_instance_event_host_doc_count_error_upper_bound{event="example"} |
| 13 | # |
| 14 | indices: '<notification-{now/d}>' |
| 15 | interval: 600 |
| 16 | json: | |
| 17 | { |
| 18 | "size": 0, |
| 19 | "query": { |
| 20 | "match_all": {} |
| 21 | }, |
| 22 | "aggs": { |
| 23 | "event": { |
| 24 | "terms": { |
| 25 | "field": "event_type.keyword" |
| 26 | }, |
| 27 | "aggs": { |
| 28 | "host": { |
| 29 | "terms": { |
Michal Kobus | 0cdb274 | 2019-04-09 12:32:14 +0200 | [diff] [blame] | 30 | "field": "Hostname.keyword", |
| 31 | "min_doc_count": 0 |
Michal Kobus | c26cfc1 | 2019-03-18 11:19:42 +0100 | [diff] [blame] | 32 | } |
| 33 | } |
| 34 | } |
| 35 | } |
| 36 | } |
| 37 | } |
| 38 | |
| 39 | compute_instance_create_start: |
| 40 | # Produces metrics: |
| 41 | # - compute_instance_create_start_host_doc_count{host="example01"} |
| 42 | # - compute_instance_create_start_host_event_sum_other_doc_count |
| 43 | # - compute_instance_create_start_host_doc_count_error_upper_bound |
| 44 | # - compute_instance_create_start_hits |
| 45 | # - compute_instance_create_start_took_milliseconds |
| 46 | # |
| 47 | indices: '<notification-{now/d}>' |
| 48 | interval: 60 |
| 49 | json: | |
| 50 | { |
| 51 | "size": 0, |
| 52 | "query": { |
| 53 | "term": { |
| 54 | "event_type": "compute.instance.create.start" |
| 55 | } |
| 56 | }, |
| 57 | "aggs": { |
| 58 | "host": { |
| 59 | "terms": { |
Michal Kobus | 0cdb274 | 2019-04-09 12:32:14 +0200 | [diff] [blame] | 60 | "field": "Hostname.keyword", |
| 61 | "min_doc_count": 0 |
Michal Kobus | c26cfc1 | 2019-03-18 11:19:42 +0100 | [diff] [blame] | 62 | } |
| 63 | } |
| 64 | } |
| 65 | } |
| 66 | |
| 67 | compute_instance_create_end: |
| 68 | # Produces metrics: |
| 69 | # - compute_instance_create_end_host_doc_count{host="example01"} |
| 70 | # - compute_instance_create_end_host_event_sum_other_doc_count |
| 71 | # - compute_instance_create_end_host_doc_count_error_upper_bound |
| 72 | # - compute_instance_create_end_hits |
| 73 | # - compute_instance_create_end_took_milliseconds |
| 74 | # |
| 75 | indices: '<notification-{now/d}>' |
| 76 | interval: 60 |
| 77 | json: | |
| 78 | { |
| 79 | "size": 0, |
| 80 | "query": { |
| 81 | "term": { |
| 82 | "event_type": "compute.instance.create.end" |
| 83 | } |
| 84 | }, |
| 85 | "aggs": { |
| 86 | "host": { |
| 87 | "terms": { |
Michal Kobus | 0cdb274 | 2019-04-09 12:32:14 +0200 | [diff] [blame] | 88 | "field": "Hostname.keyword", |
| 89 | "min_doc_count": 0 |
Michal Kobus | c26cfc1 | 2019-03-18 11:19:42 +0100 | [diff] [blame] | 90 | } |
| 91 | } |
| 92 | } |
| 93 | } |
| 94 | |
| 95 | compute_instance_create_error: |
| 96 | # Produces metrics: |
| 97 | # - compute_instance_create_error_host_doc_count{host="example01"} |
| 98 | # - compute_instance_create_error_host_event_sum_other_doc_count |
| 99 | # - compute_instance_create_error_host_doc_count_error_upper_bound |
| 100 | # - compute_instance_create_error_hits |
| 101 | # - compute_instance_create_error_took_milliseconds |
| 102 | # |
| 103 | indices: '<notification-{now/d}>' |
| 104 | interval: 60 |
| 105 | json: | |
| 106 | { |
| 107 | "size": 0, |
| 108 | "query": { |
| 109 | "term": { |
| 110 | "event_type": "compute.instance.create.error" |
| 111 | } |
| 112 | }, |
| 113 | "aggs": { |
| 114 | "host": { |
| 115 | "terms": { |
Michal Kobus | 0cdb274 | 2019-04-09 12:32:14 +0200 | [diff] [blame] | 116 | "field": "Hostname.keyword", |
| 117 | "min_doc_count": 0 |
Michal Kobus | c26cfc1 | 2019-03-18 11:19:42 +0100 | [diff] [blame] | 118 | } |
| 119 | } |
| 120 | } |
| 121 | } |
| 122 | |