diff --git a/server/adaptors/integrations/__data__/repository/haproxy/assets/haproxy-1.0.0.ndjson b/server/adaptors/integrations/__data__/repository/haproxy/assets/haproxy-1.0.0.ndjson new file mode 100644 index 000000000..73b760074 --- /dev/null +++ b/server/adaptors/integrations/__data__/repository/haproxy/assets/haproxy-1.0.0.ndjson @@ -0,0 +1,11 @@ +{"attributes":{"fields":"[{\"count\":0,\"name\":\"@message\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"@timestamp\",\"type\":\"date\",\"esTypes\":[\"date\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"_id\",\"type\":\"string\",\"esTypes\":[\"_id\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"count\":0,\"name\":\"_index\",\"type\":\"string\",\"esTypes\":[\"_index\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":false},{\"count\":0,\"name\":\"_score\",\"type\":\"number\",\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"_source\",\"type\":\"_source\",\"esTypes\":[\"_source\"],\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"_type\",\"type\":\"string\",\"scripted\":false,\"searchable\":false,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"attributes.data_stream.dataset\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"attributes.data_stream.namespace\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"attributes.data_stream.type\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"body\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"communication.destination.address\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"communication.destination.address.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"communication.destination.address\"}}},{\"count\":0,\"name\":\"communication.destination.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"communication.destination.domain\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"communication.destination.domain.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"communication.destination.domain\"}}},{\"count\":0,\"name\":\"communication.destination.geo.city_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"communication.destination.geo.country_iso_code\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"communication.destination.geo.country_name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"communication.destination.geo.location\",\"type\":\"geo_point\",\"esTypes\":[\"geo_point\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"communication.destination.ip\",\"type\":\"ip\",\"esTypes\":[\"ip\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"communication.destination.mac\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"communication.destination.packets\",\"type\":\"number\",\"esTypes\":[\"long\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"communication.destination.port\",\"type\":\"number\",\"esTypes\":[\"long\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"communication.sock.family\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"communication.source.address\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"communication.source.address.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"communication.source.address\"}}},{\"count\":0,\"name\":\"communication.source.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"communication.source.domain\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"communication.source.domain.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"communication.source.domain\"}}},{\"count\":0,\"name\":\"communication.source.ip\",\"type\":\"ip\",\"esTypes\":[\"ip\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"communication.source.mac\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"communication.source.packets\",\"type\":\"number\",\"esTypes\":[\"long\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"communication.source.port\",\"type\":\"number\",\"esTypes\":[\"long\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"event.category\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"event.domain\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"event.exception.message\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"event.exception.stacktrace\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"event.exception.type\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"event.kind\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"event.name\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"event.result\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"event.source\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"event.type\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"http.client.ip\",\"type\":\"ip\",\"esTypes\":[\"ip\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"http.flavor\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"http.request.body.content\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"http.request.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"http.request.id\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"http.request.id.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"http.request.id\"}}},{\"count\":0,\"name\":\"http.request.method\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"http.request.mime_type\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"http.request.referrer\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"http.resent_count\",\"type\":\"number\",\"esTypes\":[\"integer\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"http.response.body.content\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"http.response.bytes\",\"type\":\"number\",\"esTypes\":[\"long\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"http.response.id\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"http.response.id.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"http.response.id\"}}},{\"count\":0,\"name\":\"http.response.status_code\",\"type\":\"number\",\"esTypes\":[\"integer\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"http.route\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"http.schema\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"http.target\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"http.url\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"http.user_agent\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"instrumentationScope.dropped_attributes_count\",\"type\":\"number\",\"esTypes\":[\"integer\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"instrumentationScope.name\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"instrumentationScope.name.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"instrumentationScope.name\"}}},{\"count\":0,\"name\":\"instrumentationScope.schemaUrl\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"instrumentationScope.schemaUrl.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"instrumentationScope.schemaUrl\"}}},{\"count\":0,\"name\":\"instrumentationScope.version\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"instrumentationScope.version.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"instrumentationScope.version\"}}},{\"count\":0,\"name\":\"observedTimestamp\",\"type\":\"date\",\"esTypes\":[\"date\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"observerTime\",\"type\":\"date\",\"esTypes\":[\"date\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"schemaUrl\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"schemaUrl.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"schemaUrl\"}}},{\"count\":0,\"name\":\"severity.number\",\"type\":\"number\",\"esTypes\":[\"long\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"severity.text\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"severity.text.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"severity.text\"}}},{\"count\":0,\"name\":\"spanId\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"span_id\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"span_id.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"span_id\"}}},{\"count\":0,\"name\":\"traceId\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true},{\"count\":0,\"name\":\"trace_id\",\"type\":\"string\",\"esTypes\":[\"text\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":false,\"readFromDocValues\":false},{\"count\":0,\"name\":\"trace_id.keyword\",\"type\":\"string\",\"esTypes\":[\"keyword\"],\"scripted\":false,\"searchable\":true,\"aggregatable\":true,\"readFromDocValues\":true,\"subType\":{\"multi\":{\"parent\":\"trace_id\"}}}]","timeFieldName":"@timestamp","title":"ss4o_logs-haproxy-sample-sample"},"id":"689b4f16-5275-4e1e-9835-91dd5e06161e","migrationVersion":{"index-pattern":"7.6.0"},"references":[],"type":"index-pattern","updated_at":"2023-11-06T06:10:10.775Z","version":"WzExOSwxXQ=="} +{"attributes":{"columns":["http.request.method","http.response.status_code"],"description":"","hits":0,"kibanaSavedObjectMeta":{"searchSourceJSON":"{\"highlightAll\":true,\"version\":true,\"query\":{\"query\":\"event.domain:haproxy.access\",\"language\":\"kuery\"},\"filter\":[],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}"},"sort":[],"title":"[haproxy Core Logs 1.0] haproxy Access Logs","version":1},"id":"78ce24fc-c71c-4f58-be16-6d736e788a80","migrationVersion":{"search":"7.9.3"},"references":[{"id":"689b4f16-5275-4e1e-9835-91dd5e06161e","name":"kibanaSavedObjectMeta.searchSourceJSON.index","type":"index-pattern"}],"type":"search","updated_at":"2023-11-06T06:10:10.775Z","version":"WzEyMCwxXQ=="} +{"attributes":{"description":"","kibanaSavedObjectMeta":{"searchSourceJSON":"{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[]}"},"savedSearchRefName":"search_0","title":"[haproxy Core Logs 1.0] Response codes over time","uiStateJSON":"{}","version":1,"visState":"{\"title\":\"[haproxy Core Logs 1.0] Response codes over time\",\"type\":\"histogram\",\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"params\":{},\"schema\":\"metric\"},{\"id\":\"2\",\"enabled\":true,\"type\":\"date_histogram\",\"params\":{\"field\":\"@timestamp\",\"timeRange\":{\"from\":\"now-24h\",\"to\":\"now\"},\"useNormalizedOpenSearchInterval\":true,\"scaleMetricValues\":false,\"interval\":\"auto\",\"drop_partials\":false,\"min_doc_count\":1,\"extended_bounds\":{}},\"schema\":\"segment\"},{\"id\":\"3\",\"enabled\":true,\"type\":\"filters\",\"params\":{\"filters\":[{\"input\":{\"query\":\"http.response.status_code:[200 TO 299]\",\"language\":\"lucene\"},\"label\":\"200s\"},{\"input\":{\"query\":\"http.response.status_code:[300 TO 399]\",\"language\":\"lucene\"},\"label\":\"300s\"},{\"input\":{\"query\":\"http.response.status_code:[400 TO 499]\",\"language\":\"lucene\"},\"label\":\"400s\"},{\"input\":{\"query\":\"http.response.status_code:[500 TO 599]\",\"language\":\"lucene\"},\"label\":\"500s\"},{\"input\":{\"query\":\"http.response.status_code:0\",\"language\":\"lucene\"},\"label\":\"0\"}]},\"schema\":\"group\"}],\"params\":{\"type\":\"histogram\",\"grid\":{\"categoryLines\":false},\"categoryAxes\":[{\"id\":\"CategoryAxis-1\",\"type\":\"category\",\"position\":\"bottom\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\"},\"labels\":{\"show\":true,\"filter\":true,\"truncate\":100},\"title\":{}}],\"valueAxes\":[{\"id\":\"ValueAxis-1\",\"name\":\"LeftAxis-1\",\"type\":\"value\",\"position\":\"left\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\",\"mode\":\"normal\"},\"labels\":{\"show\":true,\"rotate\":0,\"filter\":false,\"truncate\":100},\"title\":{\"text\":\"Count\"}}],\"seriesParams\":[{\"show\":true,\"type\":\"histogram\",\"mode\":\"stacked\",\"data\":{\"label\":\"Count\",\"id\":\"1\"},\"valueAxis\":\"ValueAxis-1\",\"drawLinesBetweenPoints\":true,\"lineWidth\":2,\"showCircles\":true}],\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"right\",\"times\":[],\"addTimeMarker\":false,\"labels\":{\"show\":false},\"thresholdLine\":{\"show\":false,\"value\":10,\"width\":1,\"style\":\"full\",\"color\":\"#E7664C\"}}}"},"id":"feb24bf8-f5e4-4f24-a9e0-c6618a8db3c3","migrationVersion":{"visualization":"7.10.0"},"references":[{"id":"78ce24fc-c71c-4f58-be16-6d736e788a80","name":"search_0","type":"search"}],"type":"visualization","updated_at":"2023-11-06T06:10:10.775Z","version":"WzEyMSwxXQ=="} +{"attributes":{"columns":["_source"],"description":"","hits":0,"kibanaSavedObjectMeta":{"searchSourceJSON":"{\"highlightAll\":true,\"query\":{\"query\":\"http.response.status_code >= 300 and event.domain:haproxy.access\",\"language\":\"kuery\"},\"version\":true,\"highlight\":{\"post_tags\":[\"@/kibana-highlighted-field@\"],\"fields\":{\"*\":{}},\"pre_tags\":[\"@kibana-highlighted-field@\"],\"require_field_match\":false,\"fragment_size\":2147483647},\"filter\":[],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}"},"sort":[["@timestamp","desc"]],"title":"[haproxy Core Logs 1.0] haproxy Error Logs","version":1},"id":"aae90f71-83e6-4154-83f8-80185a58cde7","migrationVersion":{"search":"7.9.3"},"references":[{"id":"689b4f16-5275-4e1e-9835-91dd5e06161e","name":"kibanaSavedObjectMeta.searchSourceJSON.index","type":"index-pattern"}],"type":"search","updated_at":"2023-11-06T06:10:10.775Z","version":"WzEyMiwxXQ=="} +{"attributes":{"description":"","kibanaSavedObjectMeta":{"searchSourceJSON":"{\"query\":{\"query\":\"\",\"language\":\"lucene\"},\"filter\":[]}"},"savedSearchRefName":"search_0","title":"[haproxy Core Logs 1.0] Errors over time","uiStateJSON":"{}","version":1,"visState":"{\"title\":\"[haproxy Core Logs 1.0] Errors over time\",\"type\":\"histogram\",\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"params\":{},\"schema\":\"metric\"},{\"id\":\"2\",\"enabled\":true,\"type\":\"date_histogram\",\"params\":{\"field\":\"@timestamp\",\"timeRange\":{\"from\":\"now-24h\",\"to\":\"now\"},\"useNormalizedOpenSearchInterval\":true,\"scaleMetricValues\":false,\"interval\":\"auto\",\"drop_partials\":false,\"min_doc_count\":1,\"extended_bounds\":{}},\"schema\":\"segment\"}],\"params\":{\"type\":\"histogram\",\"grid\":{\"categoryLines\":false},\"categoryAxes\":[{\"id\":\"CategoryAxis-1\",\"type\":\"category\",\"position\":\"bottom\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\"},\"labels\":{\"show\":true,\"filter\":true,\"truncate\":100},\"title\":{}}],\"valueAxes\":[{\"id\":\"ValueAxis-1\",\"name\":\"LeftAxis-1\",\"type\":\"value\",\"position\":\"left\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\",\"mode\":\"normal\"},\"labels\":{\"show\":true,\"rotate\":0,\"filter\":false,\"truncate\":100},\"title\":{\"text\":\"Count\"}}],\"seriesParams\":[{\"show\":true,\"type\":\"histogram\",\"mode\":\"stacked\",\"data\":{\"label\":\"Count\",\"id\":\"1\"},\"valueAxis\":\"ValueAxis-1\",\"drawLinesBetweenPoints\":true,\"lineWidth\":2,\"showCircles\":true}],\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"right\",\"times\":[],\"addTimeMarker\":false,\"labels\":{\"show\":false},\"thresholdLine\":{\"show\":false,\"value\":10,\"width\":1,\"style\":\"full\",\"color\":\"#E7664C\"}}}"},"id":"bfa0e172-75fa-485d-aebd-b623713359b3","migrationVersion":{"visualization":"7.10.0"},"references":[{"id":"aae90f71-83e6-4154-83f8-80185a58cde7","name":"search_0","type":"search"}],"type":"visualization","updated_at":"2023-11-06T06:10:10.775Z","version":"WzEyMywxXQ=="} +{"attributes":{"description":"","kibanaSavedObjectMeta":{"searchSourceJSON":"{\"query\":{\"query\":\"\",\"language\":\"kuery\"},\"filter\":[],\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\"}"},"title":"HTTP Top URLs","uiStateJSON":"{}","version":1,"visState":"{\"title\":\"HTTP Top URLs\",\"type\":\"table\",\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"params\":{},\"schema\":\"metric\"},{\"id\":\"2\",\"enabled\":true,\"type\":\"terms\",\"params\":{\"field\":\"http.url\",\"orderBy\":\"1\",\"order\":\"desc\",\"size\":10,\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\"},\"schema\":\"bucket\"}],\"params\":{\"perPage\":10,\"showPartialRows\":false,\"showMetricsAtAllLevels\":false,\"showTotal\":false,\"totalFunc\":\"sum\",\"percentageCol\":\"\"}}"},"id":"69b27677-9127-4581-9f1a-cc3a84822354","migrationVersion":{"visualization":"7.10.0"},"references":[{"id":"689b4f16-5275-4e1e-9835-91dd5e06161e","name":"kibanaSavedObjectMeta.searchSourceJSON.index","type":"index-pattern"}],"type":"visualization","updated_at":"2023-11-06T06:10:10.775Z","version":"WzEyNSwxXQ=="} +{"attributes":{"description":"","kibanaSavedObjectMeta":{"searchSourceJSON":"{\"query\":{\"query\":\"\",\"language\":\"kuery\"},\"filter\":[]}"},"savedSearchRefName":"search_0","title":"Data Volume","uiStateJSON":"{}","version":1,"visState":"{\"title\":\"Data Volume\",\"type\":\"area\",\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"sum\",\"params\":{\"field\":\"http.response.bytes\",\"customLabel\":\"Response Bytes\"},\"schema\":\"metric\"},{\"id\":\"2\",\"enabled\":true,\"type\":\"date_histogram\",\"params\":{\"field\":\"@timestamp\",\"timeRange\":{\"from\":\"now-15m\",\"to\":\"now\"},\"useNormalizedOpenSearchInterval\":true,\"scaleMetricValues\":false,\"interval\":\"m\",\"drop_partials\":false,\"min_doc_count\":1,\"extended_bounds\":{},\"customLabel\":\"\"},\"schema\":\"segment\"}],\"params\":{\"type\":\"area\",\"grid\":{\"categoryLines\":false},\"categoryAxes\":[{\"id\":\"CategoryAxis-1\",\"type\":\"category\",\"position\":\"bottom\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\"},\"labels\":{\"show\":true,\"filter\":true,\"truncate\":100},\"title\":{}}],\"valueAxes\":[{\"id\":\"ValueAxis-1\",\"name\":\"LeftAxis-1\",\"type\":\"value\",\"position\":\"left\",\"show\":true,\"style\":{},\"scale\":{\"type\":\"linear\",\"mode\":\"normal\"},\"labels\":{\"show\":true,\"rotate\":0,\"filter\":false,\"truncate\":100},\"title\":{\"text\":\"Response Bytes\"}}],\"seriesParams\":[{\"show\":true,\"type\":\"area\",\"mode\":\"stacked\",\"data\":{\"label\":\"Response Bytes\",\"id\":\"1\"},\"drawLinesBetweenPoints\":true,\"lineWidth\":2,\"showCircles\":true,\"interpolate\":\"linear\",\"valueAxis\":\"ValueAxis-1\"}],\"addTooltip\":true,\"addLegend\":true,\"legendPosition\":\"right\",\"times\":[],\"addTimeMarker\":false,\"thresholdLine\":{\"show\":false,\"value\":10,\"width\":1,\"style\":\"full\",\"color\":\"#E7664C\"},\"labels\":{}}}"},"id":"de792cf1-b1f1-4705-890d-4206709c7360","migrationVersion":{"visualization":"7.10.0"},"references":[{"id":"78ce24fc-c71c-4f58-be16-6d736e788a80","name":"search_0","type":"search"}],"type":"visualization","updated_at":"2023-11-06T06:10:10.775Z","version":"WzEyNCwxXQ=="} +{"attributes":{"description":"","kibanaSavedObjectMeta":{"searchSourceJSON":"{\"query\":{\"query\":\"\",\"language\":\"kuery\"},\"filter\":[]}"},"title":"Status code dropdown","uiStateJSON":"{}","version":1,"visState":"{\"title\":\"Status code dropdown\",\"type\":\"input_control_vis\",\"aggs\":[],\"params\":{\"controls\":[{\"id\":\"1700045798676\",\"fieldName\":\"http.response.status_code\",\"parent\":\"\",\"label\":\"Dropdown\",\"type\":\"list\",\"options\":{\"type\":\"terms\",\"multiselect\":true,\"dynamicOptions\":true,\"size\":5,\"order\":\"desc\"},\"indexPatternRefName\":\"control_0_index_pattern\"}],\"updateFiltersOnChange\":false,\"useTimeFilter\":false,\"pinFilters\":false}}"},"id":"c4fcd310-83a5-11ee-8c8a-a1faaf8536ee","migrationVersion":{"visualization":"7.10.0"},"references":[{"id":"689b4f16-5275-4e1e-9835-91dd5e06161e","name":"control_0_index_pattern","type":"index-pattern"}],"type":"visualization","updated_at":"2023-11-15T10:57:29.280Z","version":"WzEyNywxXQ=="} +{"attributes":{"description":"","kibanaSavedObjectMeta":{"searchSourceJSON":"{\"query\":{\"query\":\"\",\"language\":\"kuery\"},\"filter\":[]}"},"savedSearchRefName":"search_0","title":"Transactions by API","uiStateJSON":"{}","version":1,"visState":"{\"title\":\"Transactions by API\",\"type\":\"table\",\"aggs\":[{\"id\":\"1\",\"enabled\":true,\"type\":\"count\",\"params\":{},\"schema\":\"metric\"},{\"id\":\"2\",\"enabled\":true,\"type\":\"terms\",\"params\":{\"field\":\"http.url\",\"orderBy\":\"1\",\"order\":\"desc\",\"size\":500,\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"customLabel\":\"\"},\"schema\":\"bucket\"},{\"id\":\"3\",\"enabled\":true,\"type\":\"terms\",\"params\":{\"field\":\"http.response.status_code\",\"orderBy\":\"1\",\"order\":\"desc\",\"size\":500,\"otherBucket\":false,\"otherBucketLabel\":\"Other\",\"missingBucket\":false,\"missingBucketLabel\":\"Missing\",\"customLabel\":\"\"},\"schema\":\"bucket\"}],\"params\":{\"perPage\":10,\"showPartialRows\":false,\"showMetricsAtAllLevels\":false,\"showTotal\":false,\"totalFunc\":\"sum\",\"percentageCol\":\"\"}}"},"id":"0e69fad0-76ec-11ee-8c8a-a1faaf8536ee","migrationVersion":{"visualization":"7.10.0"},"references":[{"id":"78ce24fc-c71c-4f58-be16-6d736e788a80","name":"search_0","type":"search"}],"type":"visualization","updated_at":"2023-11-16T05:08:59.573Z","version":"WzEzMCwxXQ=="} +{"attributes":{"description":"haproxy dashboard with basic Observability on access / error logs","hits":0,"kibanaSavedObjectMeta":{"searchSourceJSON":"{\"query\":{\"language\":\"kuery\",\"query\":\"\"},\"filter\":[]}"},"optionsJSON":"{\"hidePanelTitles\":false,\"useMargins\":true}","panelsJSON":"[{\"embeddableConfig\":{\"hidePanelTitles\":false},\"gridData\":{\"h\":8,\"i\":\"1f31e50b-06e3-41e6-972e-e4e5fe1a9872\",\"w\":48,\"x\":0,\"y\":15},\"panelIndex\":\"1f31e50b-06e3-41e6-972e-e4e5fe1a9872\",\"title\":\"HTTP Status Codes over Time\",\"version\":\"2.9.0\",\"panelRefName\":\"panel_0\"},{\"embeddableConfig\":{\"hidePanelTitles\":false},\"gridData\":{\"h\":9,\"i\":\"d91a8da4-b34b-470a-aca6-9c76b47cd6fb\",\"w\":24,\"x\":0,\"y\":23},\"panelIndex\":\"d91a8da4-b34b-470a-aca6-9c76b47cd6fb\",\"title\":\"HTTP Errors over Time\",\"version\":\"2.9.0\",\"panelRefName\":\"panel_1\"},{\"embeddableConfig\":{\"vis\":{\"sortColumn\":{\"colIndex\":0,\"direction\":\"asc\"}}},\"gridData\":{\"h\":15,\"i\":\"8e658e0d-7b64-4be8-8ad9-3b28eadf30f0\",\"w\":24,\"x\":24,\"y\":23},\"panelIndex\":\"8e658e0d-7b64-4be8-8ad9-3b28eadf30f0\",\"version\":\"2.9.0\",\"panelRefName\":\"panel_2\"},{\"embeddableConfig\":{\"hidePanelTitles\":false},\"gridData\":{\"h\":15,\"i\":\"4d8c2aa7-159c-4a1a-80ff-00a9299056ce\",\"w\":24,\"x\":0,\"y\":32},\"panelIndex\":\"4d8c2aa7-159c-4a1a-80ff-00a9299056ce\",\"title\":\"HTTP Data Volume\",\"version\":\"2.9.0\",\"panelRefName\":\"panel_3\"},{\"embeddableConfig\":{},\"gridData\":{\"h\":15,\"i\":\"742783de-3ed5-4ba8-aafd-948220697bc6\",\"w\":24,\"x\":0,\"y\":0},\"panelIndex\":\"742783de-3ed5-4ba8-aafd-948220697bc6\",\"version\":\"2.9.0\",\"panelRefName\":\"panel_4\"},{\"embeddableConfig\":{},\"gridData\":{\"h\":15,\"i\":\"8f9de824-cffd-43d1-b59e-8912ec9da1c5\",\"w\":24,\"x\":24,\"y\":0},\"panelIndex\":\"8f9de824-cffd-43d1-b59e-8912ec9da1c5\",\"version\":\"2.9.0\",\"panelRefName\":\"panel_5\"}]","refreshInterval":{"pause":true,"value":0},"timeFrom":"now-90d","timeRestore":true,"timeTo":"now","title":"haproxy Logs Overview","version":1},"id":"49e36499-ca0a-4636-9216-6db5095cc96e","migrationVersion":{"dashboard":"7.9.3"},"references":[{"id":"feb24bf8-f5e4-4f24-a9e0-c6618a8db3c3","name":"panel_0","type":"visualization"},{"id":"bfa0e172-75fa-485d-aebd-b623713359b3","name":"panel_1","type":"visualization"},{"id":"69b27677-9127-4581-9f1a-cc3a84822354","name":"panel_2","type":"visualization"},{"id":"de792cf1-b1f1-4705-890d-4206709c7360","name":"panel_3","type":"visualization"},{"id":"c4fcd310-83a5-11ee-8c8a-a1faaf8536ee","name":"panel_4","type":"visualization"},{"id":"0e69fad0-76ec-11ee-8c8a-a1faaf8536ee","name":"panel_5","type":"visualization"}],"type":"dashboard","updated_at":"2023-11-16T05:16:26.850Z","version":"WzEzMiwxXQ=="} +{"exportedCount":10,"missingRefCount":0,"missingReferences":[]} \ No newline at end of file diff --git a/server/adaptors/integrations/__data__/repository/haproxy/data/sample.json b/server/adaptors/integrations/__data__/repository/haproxy/data/sample.json new file mode 100644 index 000000000..05e7bd172 --- /dev/null +++ b/server/adaptors/integrations/__data__/repository/haproxy/data/sample.json @@ -0,0 +1 @@ +[{"span_id":"abcdef1010","attributes":{"data_stream":{"namespace":"production","dataset":"haproxy.access","type":"logs"}},"event":{"domain":"haproxy.access","kind":"event","result":"success","type":["access"],"category":["web"],"name":"access"},"@timestamp":"2023-11-20T06:46:14.029Z","observedTimestamp":"2023-11-20T06:46:14.029Z","body":"10.81.1.1:57147 stats stats/0/0/0/0/0 1/1/0/0/00/0--LR--[20/Nov/2023:06:46:14 +0000] \"GET /monitor HTTP/1.1\" 200 23741 \"{Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36 Edg/119.0.0.0}\"","trace_id":"102981ABCD2901","http":{"flavor":"1.1","request":{"method":"GET"},"response":{"status_code":"300","bytes":23741},"url":"/monitor"}},{"span_id":"abcdef1010","attributes":{"data_stream":{"namespace":"production","dataset":"haproxy.access","type":"logs"}},"event":{"domain":"haproxy.access","kind":"event","result":"success","type":["access"],"category":["web"],"name":"access"},"@timestamp":"2023-11-20T07:10:24.734Z","observedTimestamp":"2023-11-20T07:10:24.734Z","body":"10.81.1.1:57147 stats stats/0/0/0/0/0 1/1/0/0/00/0--LR--[20/Nov/2023:07:10:24 +0000] \"GET /monitor HTTP/1.1\" 200 23881 \"{Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36 Edg/119.0.0.0}\"","trace_id":"102981ABCD2901","http":{"flavor":"1.1","request":{"method":"GET"},"response":{"status_code":"400","bytes":23881},"url":"/monitor"}},{"span_id":"abcdef1010","attributes":{"data_stream":{"namespace":"production","dataset":"haproxy.access","type":"logs"}},"event":{"domain":"haproxy.access","kind":"event","result":"success","type":["access"],"category":["web"],"name":"access"},"@timestamp":"2023-11-20T07:10:19.628Z","observedTimestamp":"2023-11-20T07:10:19.628Z","body":"10.81.1.1:57147 stats stats/0/0/0/0/0 1/1/0/0/00/0--LR--[20/Nov/2023:07:10:19 +0000] \"GET /monitor HTTP/1.1\" 200 23881 \"{Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36 Edg/119.0.0.0}\"","trace_id":"102981ABCD2901","http":{"flavor":"1.1","request":{"method":"GET"},"response":{"status_code":"200","bytes":23881},"url":"/monitor"}},{"span_id":"abcdef1010","attributes":{"data_stream":{"namespace":"production","dataset":"haproxy.access","type":"logs"}},"event":{"domain":"haproxy.access","kind":"event","result":"success","type":["access"],"category":["web"],"name":"access"},"@timestamp":"2023-11-20T07:10:14.505Z","observedTimestamp":"2023-11-20T07:10:14.505Z","body":"10.81.1.1:57147 stats stats/0/0/0/0/0 1/1/0/0/00/0--LR--[20/Nov/2023:07:10:14 +0000] \"GET /monitor HTTP/1.1\" 200 23886 \"{Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36 Edg/119.0.0.0}\"","trace_id":"102981ABCD2901","http":{"flavor":"1.1","request":{"method":"GET"},"response":{"status_code":"200","bytes":23886},"url":"/monitor"}},{"span_id":"abcdef1010","attributes":{"data_stream":{"namespace":"production","dataset":"haproxy.access","type":"logs"}},"event":{"domain":"haproxy.access","kind":"event","result":"success","type":["access"],"category":["web"],"name":"access"},"@timestamp":"2023-11-20T07:10:09.302Z","observedTimestamp":"2023-11-20T07:10:09.302Z","body":"10.81.1.1:57147 stats stats/0/0/0/0/0 1/1/0/0/00/0--LR--[20/Nov/2023:07:10:09 +0000] \"GET /monitor HTTP/1.1\" 200 23886 \"{Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36 Edg/119.0.0.0}\"","trace_id":"102981ABCD2901","http":{"flavor":"1.1","request":{"method":"GET"},"response":{"status_code":"200","bytes":23886},"url":"/monitor"}},{"span_id":"abcdef1010","attributes":{"data_stream":{"namespace":"production","dataset":"haproxy.access","type":"logs"}},"event":{"domain":"haproxy.access","kind":"event","result":"success","type":["access"],"category":["web"],"name":"access"},"@timestamp":"2023-11-20T07:10:04.151Z","observedTimestamp":null,"body":"10.81.1.1:57147 stats stats/0/0/0/0/0 1/1/0/0/00/0--LR--[20/Nov/2023:07:10:04 +0000] \"GET /monitor HTTP/1.1\" 200 23886 \"{Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36 Edg/119.0.0.0}\"","trace_id":"102981ABCD2901","http":{"flavor":"1.1","request":{"method":"GET"},"response":{"status_code":"200","bytes":23886},"url":"/monitor"}},{"span_id":"abcdef1010","attributes":{"data_stream":{"namespace":"production","dataset":"haproxy.access","type":"logs"}},"event":{"domain":"haproxy.access","kind":"event","result":"success","type":["access"],"category":["web"],"name":"access"},"@timestamp":"2023-11-20T07:10:04.151Z","observedTimestamp":"2023-11-20T07:10:04.000Z","body":"10.81.1.1:57147 stats stats/0/0/0/0/0 1/1/0/0/00/0--LR--[20/Nov/2023:07:10:04 +0000] \"GET /monitor HTTP/1.1\" 200 23886 \"{Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36 Edg/119.0.0.0}\"","trace_id":"102981ABCD2901","http":{"flavor":"1.1","request":{"method":"GET"},"response":{"status_code":"404","bytes":23886},"url":"/monitor"}},{"span_id":"abcdef1010","attributes":{"data_stream":{"namespace":"production","dataset":"haproxy.access","type":"logs"}},"event":{"domain":"haproxy.access","kind":"event","result":"success","type":["access"],"category":["web"],"name":"access"},"@timestamp":"2023-11-21T08:57:33.000Z","observedTimestamp":"2023-11-21T08:57:43.000Z","body":"10.81.1.1:61108 stats stats/-1/-1/-1/-1/10009a 1/1/0/0/00/0--cR--[21/Nov/2023:08:57:43 +0000] \" HTTP/1.1\" 408 0 \"\"\"","trace_id":"102981ABCD2901","http":{"flavor":"1.1","request":{},"response":{"status_code":"408","bytes":1},"url":"/monitor"}}] \ No newline at end of file diff --git a/server/adaptors/integrations/__data__/repository/haproxy/haproxy-1.0.0.json b/server/adaptors/integrations/__data__/repository/haproxy/haproxy-1.0.0.json new file mode 100644 index 000000000..d53cc1ccf --- /dev/null +++ b/server/adaptors/integrations/__data__/repository/haproxy/haproxy-1.0.0.json @@ -0,0 +1,50 @@ +{ + "name": "haproxy", + "version": "1.0.0", + "displayName": "Haproxy Dashboard", + "description": "Haproxy logs collector", + "license": "Apache-2.0", + "type": "logs", + "labels": ["Observability", "Logs"], + "author": "OpenSearch", + "sourceUrl": "https://github.com/opensearch-project/dashboards-observability/tree/main/server/adaptors/integrations/__data__/repository/haproxy/info", + "statics": { + "logo": { + "annotation": "Haproxy Logo", + "path": "logo.svg" + }, + "gallery": [ + { + "annotation": "Haproxy Dashboard", + "path": "dashboard1.png" + }, + { + "annotation": "Haproxy Dashboard view", + "path": "dashboard2.png" + } + ] + }, + "components": [ + { + "name": "communication", + "version": "1.0.0" + }, + { + "name": "http", + "version": "1.0.0" + }, + { + "name": "logs", + "version": "1.0.0" + } + ], + "assets": { + "savedObjects": { + "name": "haproxy", + "version": "1.0.0" + } + }, + "sampleData": { + "path": "sample.json" + } + } \ No newline at end of file diff --git a/server/adaptors/integrations/__data__/repository/haproxy/info/README.md b/server/adaptors/integrations/__data__/repository/haproxy/info/README.md new file mode 100644 index 000000000..7373d5da9 --- /dev/null +++ b/server/adaptors/integrations/__data__/repository/haproxy/info/README.md @@ -0,0 +1,18 @@ +# HAProxy Integration + +## What is HAProxy? + +HAProxy is open-source software that provides a high availability load balancer and proxy server for TCP and HTTP-based applications. + +See additional details [here](http://www.haproxy.org/). + +## What is HAProxy Integration? + +An integration is a bundle of pre-canned assets that are packaged together in a meaningful manner. +HAProxy integration includes dashboards, visualisations, queries and an index mapping. + +### Dashboards + +![](../static/dashboard1.png) +![](../static/dashboard2.png) + diff --git a/server/adaptors/integrations/__data__/repository/haproxy/info/test/docker-compose.yaml b/server/adaptors/integrations/__data__/repository/haproxy/info/test/docker-compose.yaml new file mode 100644 index 000000000..731bba55d --- /dev/null +++ b/server/adaptors/integrations/__data__/repository/haproxy/info/test/docker-compose.yaml @@ -0,0 +1,90 @@ +version: '3' + +services: + opensearch: + image: opensearchstaging/opensearch:3.0.0 + container_name: opensearch + environment: + - cluster.name=opensearch-cluster # Name the cluster + - node.name=opensearch # Name the node that will run in this container + - discovery.seed_hosts=opensearch # Nodes to look for when discovering the cluster + - cluster.initial_cluster_manager_nodes=opensearch # Nodes eligibile to serve as cluster manager + - bootstrap.memory_lock=true # Disable JVM heap memory swapping + - "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m" # Set min and max JVM heap sizes to at least 50% of system RAM + - "DISABLE_INSTALL_DEMO_CONFIG=true" # Prevents execution of bundled demo script which installs demo certificates and security configurations to OpenSearch + - "DISABLE_SECURITY_PLUGIN=true" # Disables security plugin + ulimits: + memlock: + soft: -1 # Set memlock to unlimited (no soft or hard limit) + hard: -1 + nofile: + soft: 65536 # Maximum number of open files for the opensearch user - set to at least 65536 + hard: 65536 + volumes: + - opensearch:/usr/share/opensearch/data # Creates volume called opensearch-data1 and mounts it to the container + ports: + - 9200:9200 + - 9600:9600 + expose: + - "9200" + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:9200/_cluster/health?wait_for_status=yellow"] + interval: 5s + timeout: 25s + retries: 4 + networks: + - opensearch-net # All of the containers will join the same Docker bridge network + haproxy: + container_name: haproxy + image: haproxytech/haproxy-alpine:2.4 + volumes: + # - ./haproxy-otel/opentelemetry_module.conf:/etc/nginx/conf.d/opentelemetry_module.conf + - ./haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro + ports: + - 8405:8405 + depends_on: + - flask-app + - fluentbit + networks: + - opensearch-net # All of the containers will join the same Docker bridge network + links: + - fluentbit + logging: + driver: "fluentd" + options: + fluentd-address: 127.0.0.1:24224 + tag: haproxy.access + fluentbit: + container_name: fluentbit + image: fluent/fluent-bit:latest + volumes: + - ./fluent-bit:/fluent-bit/etc + ports: + - "24224:24224" + - "24224:24224/udp" + depends_on: + - opensearch + networks: + - opensearch-net + redis: + image: redis + ports: + - 6357:6357 + networks: + - opensearch-net + flask-app: + build: flask-app + ports: + - 5000:5000 + depends_on: + - redis + volumes: + - ./flask-app/app.py:/code/app.py + networks: + - opensearch-net + +volumes: + opensearch: + +networks: + opensearch-net: diff --git a/server/adaptors/integrations/__data__/repository/haproxy/info/test/flask-app/Dockerfile b/server/adaptors/integrations/__data__/repository/haproxy/info/test/flask-app/Dockerfile new file mode 100644 index 000000000..bb172b4af --- /dev/null +++ b/server/adaptors/integrations/__data__/repository/haproxy/info/test/flask-app/Dockerfile @@ -0,0 +1,9 @@ +FROM python:latest +ADD . /code +WORKDIR /code +RUN pip install -r requirements.txt + +RUN mkdir -p /run/haproxy/ +RUN export VALUE=$(id -u haproxy) + +CMD ["flask", "run", "-h", "0.0.0.0", "-p", "5000", "--debug"] diff --git a/server/adaptors/integrations/__data__/repository/haproxy/info/test/flask-app/app.py b/server/adaptors/integrations/__data__/repository/haproxy/info/test/flask-app/app.py new file mode 100644 index 000000000..26f064770 --- /dev/null +++ b/server/adaptors/integrations/__data__/repository/haproxy/info/test/flask-app/app.py @@ -0,0 +1,20 @@ +from random import random, randint +from flask import Flask +from redis import Redis + +app = Flask(__name__) +redis = Redis(host='redis', port=6379) + + +@app.route("/") +def hits(): + if random() < 0.20: + return "Random error", 500 + h = redis.incr('hits') + return f"This page has been viewed {h} time(s)" + +@app.route("/dice") +def roll_dice(): + if random() < 0.05: + return "Random error", 500 + return str(randint(1, 6)) diff --git a/server/adaptors/integrations/__data__/repository/haproxy/info/test/flask-app/requirements.txt b/server/adaptors/integrations/__data__/repository/haproxy/info/test/flask-app/requirements.txt new file mode 100644 index 000000000..56c1ce66b --- /dev/null +++ b/server/adaptors/integrations/__data__/repository/haproxy/info/test/flask-app/requirements.txt @@ -0,0 +1,2 @@ +flask==2.3.2 +redis \ No newline at end of file diff --git a/server/adaptors/integrations/__data__/repository/haproxy/info/test/fluent-bit/fluent-bit.conf b/server/adaptors/integrations/__data__/repository/haproxy/info/test/fluent-bit/fluent-bit.conf new file mode 100644 index 000000000..991f74792 --- /dev/null +++ b/server/adaptors/integrations/__data__/repository/haproxy/info/test/fluent-bit/fluent-bit.conf @@ -0,0 +1,30 @@ +[SERVICE] + Parsers_File parsers.conf + +[INPUT] + Name forward + Port 24224 + +[FILTER] + Name parser + Match haproxy.access + Key_Name log + Parser haproxy + +[FILTER] + Name lua + Match haproxy.access + Script otel-converter.lua + call convert_to_otel + +[OUTPUT] + Name opensearch + Match haproxy.access + Host opensearch + Port 9200 + Index ss4o_logs-haproxy-dev + Suppress_Type_Name On + +[OUTPUT] + Name stdout + Match haproxy.access \ No newline at end of file diff --git a/server/adaptors/integrations/__data__/repository/haproxy/info/test/fluent-bit/otel-converter.lua b/server/adaptors/integrations/__data__/repository/haproxy/info/test/fluent-bit/otel-converter.lua new file mode 100644 index 000000000..178f4bb8c --- /dev/null +++ b/server/adaptors/integrations/__data__/repository/haproxy/info/test/fluent-bit/otel-converter.lua @@ -0,0 +1,84 @@ +local hexCharset = "0123456789abcdef" +local function randHex(length) + if length > 0 then + local index = math.random(1, #hexCharset) + return randHex(length - 1) .. hexCharset:sub(index, index) + else + return "" + end +end + +local function format_haproxy(c) + if c.error then + return string.format( + "%s [%s] \"%s HTTP/1.1\" %s %s \"%s\"", + c.remote, + os.date("%d/%b/%Y:%H:%M:%S %z"), + c.method, + c.code, + c.size, + c.error + ) + else + return string.format( + "%s [%s] \"%s %s HTTP/1.1\" %s %s \"%s\"", + c.remote, + os.date("%d/%b/%Y:%H:%M:%S %z"), + c.method, + c.path, + c.code, + c.size, + c.agent + ) + end +end + +local formats = { + ["haproxy.access"] = format_haproxy + +} + +function convert_to_otel(tag, timestamp, record) + local data = { + traceId=randHex(32), + spanId=randHex(16), + ["@timestamp"]=os.date("!%Y-%m-%dT%H:%M:%S.000Z"), + observedTimestamp=os.date("!%Y-%m-%dT%H:%M:%S.000Z"), + body=formats[tag](record), + attributes={ + data_stream={ + dataset=tag, + namespace="production", + type="logs" + } + }, + event={ + category="web", + name="access", + domain=tag, + kind="event", + result="success", + type="access" + }, + http={ + request={ + method=record.method + }, + response={ + bytes=tonumber(record.size), + status_code=tonumber(record.code) + }, + flavor="1.1", + url=record.path + }, + communication={ + source={ + address=record.remote + } + } + } + if record.remote then + data.communication.source.ip = string.match(record.remote, "%d+%.%d+%.%d+%.%d+") + end + return 1, timestamp, data +end \ No newline at end of file diff --git a/server/adaptors/integrations/__data__/repository/haproxy/info/test/fluent-bit/parsers.conf b/server/adaptors/integrations/__data__/repository/haproxy/info/test/fluent-bit/parsers.conf new file mode 100644 index 000000000..fb5c26a46 --- /dev/null +++ b/server/adaptors/integrations/__data__/repository/haproxy/info/test/fluent-bit/parsers.conf @@ -0,0 +1,6 @@ +[PARSER] + Name haproxy + Format regex + Regex ^(?[^ ]*) \[(?