|
| 1 | +--- |
| 2 | +setup: |
| 3 | + - do: |
| 4 | + cluster.health: |
| 5 | + wait_for_events: languid |
| 6 | + |
| 7 | + - do: |
| 8 | + cluster.put_component_template: |
| 9 | + name: "logs-apm.app@custom" |
| 10 | + body: |
| 11 | + template: |
| 12 | + settings: |
| 13 | + mapping: |
| 14 | + total_fields: |
| 15 | + limit: 20 |
| 16 | + |
| 17 | +--- |
| 18 | +"Test ignore_malformed": |
| 19 | + - do: |
| 20 | + bulk: |
| 21 | + index: traces-apm-testing |
| 22 | + refresh: true |
| 23 | + body: |
| 24 | + # Passing a (non-coercable) string into a numeric field should not |
| 25 | + # cause an indexing failure; it should just not be indexed. |
| 26 | + - create: {} |
| 27 | + - '{"@timestamp": "2017-06-22", "numeric_labels": {"key": "string"}}' |
| 28 | + - create: {} |
| 29 | + - '{"@timestamp": "2017-06-22", "numeric_labels": {"key": 123}}' |
| 30 | + |
| 31 | + - is_false: errors |
| 32 | + |
| 33 | + - do: |
| 34 | + search: |
| 35 | + index: traces-apm-testing |
| 36 | + body: |
| 37 | + fields: ["numeric_labels.*", "_ignored"] |
| 38 | + - length: { hits.hits: 2 } |
| 39 | + - match: { hits.hits.0.fields: {"_ignored": ["numeric_labels.key"]} } |
| 40 | + - match: { hits.hits.1.fields: {"numeric_labels.key": [123.0]} } |
| 41 | + |
| 42 | +--- |
| 43 | +"Test ignore_dynamic_beyond_limit": |
| 44 | + - do: |
| 45 | + bulk: |
| 46 | + index: logs-apm.app.svc1-testing |
| 47 | + refresh: true |
| 48 | + body: |
| 49 | + - create: {} |
| 50 | + - {"@timestamp": "2017-06-22", "k1": ""} |
| 51 | + - create: {} |
| 52 | + - {"@timestamp": "2017-06-22", "k2": ""} |
| 53 | + - create: {} |
| 54 | + - {"@timestamp": "2017-06-22", "k3": ""} |
| 55 | + - create: {} |
| 56 | + - {"@timestamp": "2017-06-22", "k4": ""} |
| 57 | + - create: {} |
| 58 | + - {"@timestamp": "2017-06-22", "k5": ""} |
| 59 | + - create: {} |
| 60 | + - {"@timestamp": "2017-06-22", "k6": ""} |
| 61 | + - create: {} |
| 62 | + - {"@timestamp": "2017-06-22", "k7": ""} |
| 63 | + - create: {} |
| 64 | + - {"@timestamp": "2017-06-22", "k8": ""} |
| 65 | + - create: {} |
| 66 | + - {"@timestamp": "2017-06-22", "k9": ""} |
| 67 | + - create: {} |
| 68 | + - {"@timestamp": "2017-06-22", "k10": ""} |
| 69 | + - create: {} |
| 70 | + - {"@timestamp": "2017-06-22", "k11": ""} |
| 71 | + - create: {} |
| 72 | + - {"@timestamp": "2017-06-22", "k12": ""} |
| 73 | + - create: {} |
| 74 | + - {"@timestamp": "2017-06-22", "k13": ""} |
| 75 | + - create: {} |
| 76 | + - {"@timestamp": "2017-06-22", "k14": ""} |
| 77 | + - create: {} |
| 78 | + - {"@timestamp": "2017-06-22", "k15": ""} |
| 79 | + - create: {} |
| 80 | + - {"@timestamp": "2017-06-22", "k16": ""} |
| 81 | + - create: {} |
| 82 | + - {"@timestamp": "2017-06-22", "k17": ""} |
| 83 | + - create: {} |
| 84 | + - {"@timestamp": "2017-06-22", "k18": ""} |
| 85 | + - create: {} |
| 86 | + - {"@timestamp": "2017-06-22", "k19": ""} |
| 87 | + - create: {} |
| 88 | + - {"@timestamp": "2017-06-22", "k20": ""} |
| 89 | + |
| 90 | + - is_false: errors |
| 91 | + |
| 92 | + - do: |
| 93 | + search: |
| 94 | + index: logs-apm.app.svc1-testing |
| 95 | + body: |
| 96 | + query: |
| 97 | + term: |
| 98 | + _ignored: |
| 99 | + value: k20 |
| 100 | + - length: { hits.hits: 1 } |
0 commit comments