diff --git a/ansible/roles/elastic_stack/files/tenderdash.ndjson b/ansible/roles/elastic_stack/files/tenderdash.ndjson new file mode 100644 index 00000000..80f9d5c0 --- /dev/null +++ b/ansible/roles/elastic_stack/files/tenderdash.ndjson @@ -0,0 +1,3 @@ +{"attributes":{"allowHidden":false,"fieldAttrs":"{}","fieldFormatMap":"{}","fields":"[]","name":"tenderdash","runtimeFieldMap":"{}","sourceFilters":"[]","timeFieldName":"@timestamp","title":"logs-drive.tenderdash-*"},"coreMigrationVersion":"8.8.0","created_at":"2024-08-07T10:06:51.847Z","id":"5c087872-c39b-4cca-849b-e8d8b8e9db9b","managed":false,"references":[],"type":"index-pattern","typeMigrationVersion":"8.0.0","updated_at":"2024-08-08T09:20:55.532Z","version":"WzI0NywxXQ=="} +{"attributes":{"columns":["host.name","json.module","log.level","json.height","json.round","message"],"description":"","grid":{"columns":{"host.name":{"width":148},"json.height":{"width":130},"json.module":{"width":120},"json.round":{"width":121},"log.level":{"width":113}}},"hideChart":false,"isTextBasedQuery":false,"kibanaSavedObjectMeta":{"searchSourceJSON":"{\"query\":{\"query\":\"\",\"language\":\"kuery\"},\"filter\":[{\"meta\":{\"alias\":null,\"negate\":false,\"disabled\":true,\"type\":\"phrase\",\"key\":\"message\",\"params\":{\"query\":\"received complete proposal block\"},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index\"},\"query\":{\"match_phrase\":{\"message\":\"received complete proposal block\"}},\"$state\":{\"store\":\"appState\"}}],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}"},"sort":[["@timestamp","desc"]],"timeRestore":false,"title":"tenderdash","usesAdHocDataView":false},"coreMigrationVersion":"8.8.0","created_at":"2024-08-08T09:23:07.311Z","id":"8a041e5f-0bab-4f06-b90c-6a54245eaec6","managed":false,"references":[{"id":"5c087872-c39b-4cca-849b-e8d8b8e9db9b","name":"kibanaSavedObjectMeta.searchSourceJSON.index","type":"index-pattern"},{"id":"5c087872-c39b-4cca-849b-e8d8b8e9db9b","name":"kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index","type":"index-pattern"}],"type":"search","typeMigrationVersion":"10.2.0","updated_at":"2024-08-08T09:33:32.358Z","version":"WzI3MSwxXQ=="} +{"excludedObjects":[],"excludedObjectsCount":0,"exportedCount":2,"missingRefCount":0,"missingReferences":[]} \ No newline at end of file diff --git a/ansible/roles/elastic_stack/tasks/configure_cluster.yml b/ansible/roles/elastic_stack/tasks/configure_cluster.yml index 9cea11cb..4d035a80 100644 --- a/ansible/roles/elastic_stack/tasks/configure_cluster.yml +++ b/ansible/roles/elastic_stack/tasks/configure_cluster.yml @@ -65,3 +65,16 @@ headers: kbn-xsrf: true body: "{{ lookup('file', 'files/infrastructure-ui-source.json') }}" + +- name: Set up Tenderdash in Kibana UI + ansible.builtin.uri: + url: http://localhost:5601/api/saved_objects/_import + method: POST + status_code: 200 + user: '{{ elastic_username }}' + password: '{{ elastic_password }}' + body_format: json + force_basic_auth: true + headers: + kbn-xsrf: true + body: "{{ lookup('file', 'files/tenderdash.ndjson') }}"