From ca4a8f309e0bbb933160f6252e1827996d9138b1 Mon Sep 17 00:00:00 2001 From: Shahzad Date: Thu, 19 Nov 2020 16:33:35 +0100 Subject: [PATCH 1/2] adding synthetic package --- .../monitor/agent/stream/stream.yml.hbs | 4 + .../monitor/fields/base-fields.yml | 15 + .../data_stream/monitor/fields/ecs.yml | 10 + .../data_stream/monitor/fields/fields.yml | 270 ++++++++++++++++++ .../data_stream/monitor/manifest.yml | 28 ++ packages/synthetics/docs/README.md | 4 + .../synthetics/img/uptime-logo-color-64px.svg | 14 + packages/synthetics/manifest.yml | 25 ++ 8 files changed, 370 insertions(+) create mode 100644 packages/synthetics/data_stream/monitor/agent/stream/stream.yml.hbs create mode 100644 packages/synthetics/data_stream/monitor/fields/base-fields.yml create mode 100644 packages/synthetics/data_stream/monitor/fields/ecs.yml create mode 100644 packages/synthetics/data_stream/monitor/fields/fields.yml create mode 100644 packages/synthetics/data_stream/monitor/manifest.yml create mode 100644 packages/synthetics/docs/README.md create mode 100644 packages/synthetics/img/uptime-logo-color-64px.svg create mode 100644 packages/synthetics/manifest.yml diff --git a/packages/synthetics/data_stream/monitor/agent/stream/stream.yml.hbs b/packages/synthetics/data_stream/monitor/agent/stream/stream.yml.hbs new file mode 100644 index 00000000000..d8721d0fba0 --- /dev/null +++ b/packages/synthetics/data_stream/monitor/agent/stream/stream.yml.hbs @@ -0,0 +1,4 @@ +type: http +name: {{name}} +urls: {{url}} +schedule: {{schedule}} \ No newline at end of file diff --git a/packages/synthetics/data_stream/monitor/fields/base-fields.yml b/packages/synthetics/data_stream/monitor/fields/base-fields.yml new file mode 100644 index 00000000000..9f2ce48c8b6 --- /dev/null +++ b/packages/synthetics/data_stream/monitor/fields/base-fields.yml @@ -0,0 +1,15 @@ +- name: data_stream.type + type: constant_keyword + description: Dataset type. +- name: data_stream.name + type: constant_keyword + description: Dataset name. +- name: data_stream.namespace + type: constant_keyword + description: Dataset namespace. +- name: data_stream.dataset + type: constant_keyword + description: Data stream namespace. +- name: "@timestamp" + type: date + description: Event timestamp. diff --git a/packages/synthetics/data_stream/monitor/fields/ecs.yml b/packages/synthetics/data_stream/monitor/fields/ecs.yml new file mode 100644 index 00000000000..397e9478a2c --- /dev/null +++ b/packages/synthetics/data_stream/monitor/fields/ecs.yml @@ -0,0 +1,10 @@ +- name: process + title: Process + group: 2 + type: group + fields: + - name: pid + level: core + type: long + format: string + description: Process id. diff --git a/packages/synthetics/data_stream/monitor/fields/fields.yml b/packages/synthetics/data_stream/monitor/fields/fields.yml new file mode 100644 index 00000000000..3dd7be4f410 --- /dev/null +++ b/packages/synthetics/data_stream/monitor/fields/fields.yml @@ -0,0 +1,270 @@ +- name: haproxy.info + type: group + fields: + - name: processes + type: long + description: | + Number of processes. + - name: process_num + type: long + description: | + Process number. + - name: threads + type: long + description: | + Number of threads. + - name: run_queue + type: long + - name: stopping + type: long + description: | + Number of stopping jobs. + - name: jobs + type: long + description: | + Number of all jobs. + - name: unstoppable_jobs + type: long + description: | + Number of unstoppable jobs. + - name: listeners + type: long + description: | + Number of listeners. + - name: dropped_logs + type: long + description: | + Number of dropped logs. + - name: busy_polling + type: long + description: | + Number of busy polling. + - name: failed_resolutions + type: long + description: | + Number of failed resolutions. + - name: tasks + type: long + - name: uptime.sec + type: long + description: | + Current uptime in seconds. + - name: memory.max.bytes + type: long + format: bytes + description: | + Maximum amount of memory usage in bytes (the 'Memmax_MB' value converted to bytes). + - name: bytes + type: group + fields: + - name: out + type: group + fields: + - name: total + type: long + description: | + Number of bytes sent out. + - name: rate + type: long + description: | + Average bytes output rate. + - name: peers + type: group + fields: + - name: active + type: long + description: | + Number of active peers. + - name: connected + type: long + description: | + Number of connected peers. + - name: pool + type: group + fields: + - name: allocated + type: long + description: | + Size of the allocated pool. + - name: used + type: long + description: | + Number of members used from the allocated pool. + - name: failed + type: long + description: | + Number of failed connections to pool members. + - name: ulimit_n + type: long + description: | + Maximum number of open files for the process. + - name: compress + type: group + fields: + - name: bps + type: group + fields: + - name: in + type: long + description: | + Incoming compressed data in bits per second. + - name: out + type: long + description: | + Outgoing compressed data in bits per second. + - name: rate_limit + type: long + description: | + Rate limit of compressed data in bits per second. + - name: connection + type: group + fields: + - name: rate + type: group + fields: + - name: value + type: long + description: | + Number of connections in the last second. + - name: limit + type: long + description: | + Rate limit of connections. + - name: max + type: long + description: | + Maximum rate of connections. + - name: current + type: long + description: | + Current connections. + - name: total + type: long + description: | + Total connections. + - name: ssl.current + type: long + description: | + Current SSL connections. + - name: ssl.total + type: long + description: | + Total SSL connections. + - name: ssl.max + type: long + description: | + Maximum SSL connections. + - name: max + type: long + description: | + Maximum connections. + - name: hard_max + type: long + - name: requests.total + type: long + description: | + Total number of requests. + - name: sockets.max + type: long + description: | + Maximum number of sockets. + - name: requests.max + type: long + description: | + Maximum number of requests. + - name: pipes + type: group + fields: + - name: used + type: integer + description: | + Number of used pipes during kernel-based tcp splicing. + - name: free + type: integer + description: | + Number of free pipes. + - name: max + type: integer + description: | + Maximum number of used pipes. + - name: session + type: group + fields: + - name: rate.value + type: integer + description: | + Rate of session per seconds. + - name: rate.limit + type: integer + description: | + Rate limit of sessions. + - name: rate.max + type: integer + description: | + Maximum rate of sessions. + - name: ssl + type: group + fields: + - name: rate.value + type: integer + description: | + Rate of SSL requests. + - name: rate.limit + type: integer + description: | + Rate limit of SSL requests. + - name: rate.max + type: integer + description: | + Maximum rate of SSL requests. + - name: frontend + type: group + fields: + - name: key_rate.value + type: integer + description: | + Key rate of SSL frontend. + - name: key_rate.max + type: integer + description: | + Maximum key rate of SSL frontend. + - name: session_reuse.pct + type: scaled_float + format: percent + description: | + Rate of reuse of SSL frontend sessions. + - name: backend + type: group + fields: + - name: key_rate.value + type: integer + description: | + Key rate of SSL backend sessions. + - name: key_rate.max + type: integer + description: | + Maximum key rate of SSL backend sessions. + - name: cached_lookups + type: long + description: | + Number of SSL cache lookups. + - name: cache_misses + type: long + description: | + Number of SSL cache misses. + - name: zlib_mem_usage + type: group + fields: + - name: value + type: integer + description: | + Memory usage of zlib. + - name: max + type: integer + description: | + Maximum memory usage of zlib. + - name: idle.pct + type: scaled_float + format: percent + description: | + Percentage of idle time. diff --git a/packages/synthetics/data_stream/monitor/manifest.yml b/packages/synthetics/data_stream/monitor/manifest.yml new file mode 100644 index 00000000000..e3ae0d72688 --- /dev/null +++ b/packages/synthetics/data_stream/monitor/manifest.yml @@ -0,0 +1,28 @@ +type: logs +title: synthetic monitor check +release: experimental +streams: + - input: synthetics/http + title: Synthetic monitor check + description: Monitor the health of an http endpoint + vars: + - name: name + type: text + title: Monitor name + multi: false + required: false + show_user: true + - name: schedule + type: text + title: Schedule + multi: false + required: true + show_user: true + default: 10s + - name: urls + type: text + title: URL + # do not change this to true, we specifically want it to be singular + multi: false + required: true + show_user: true diff --git a/packages/synthetics/docs/README.md b/packages/synthetics/docs/README.md new file mode 100644 index 00000000000..bb3d455ca2e --- /dev/null +++ b/packages/synthetics/docs/README.md @@ -0,0 +1,4 @@ +# Elastic Synthetics Integration + +This integration sets up required assets for Synthetics to use central management. + diff --git a/packages/synthetics/img/uptime-logo-color-64px.svg b/packages/synthetics/img/uptime-logo-color-64px.svg new file mode 100644 index 00000000000..a49124cc962 --- /dev/null +++ b/packages/synthetics/img/uptime-logo-color-64px.svg @@ -0,0 +1,14 @@ + + + + uptime-logo-color-64px + Created with Sketch. + + + + + + + + + diff --git a/packages/synthetics/manifest.yml b/packages/synthetics/manifest.yml new file mode 100644 index 00000000000..59ca8ad0e28 --- /dev/null +++ b/packages/synthetics/manifest.yml @@ -0,0 +1,25 @@ +format_version: 1.0.0 +name: synthetics +title: Elastic Synthetics +description: Monitor services availability. +version: 0.2.2 +categories: ["custom"] +release: experimental +type: integration +license: basic +policy_templates: + - name: synthetics + title: Elastic Synthetics + description: Perform synthetic health checks on network endpoints. + inputs: + - type: synthetics/http + title: Monitor + description: Perform synthetic monitor checks +conditions: + kibana.version: "^7.10.0" +icons: + - src: /img/uptime-logo-color-64px.svg + size: 16x16 + type: image/svg+xml +owner: + github: elastic/uptime From 6989d7afd001b8123e73ef4a3627cf5a3f89cf02 Mon Sep 17 00:00:00 2001 From: Shahzad Date: Fri, 20 Nov 2020 10:04:36 +0100 Subject: [PATCH 2/2] version update --- packages/synthetics/manifest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/synthetics/manifest.yml b/packages/synthetics/manifest.yml index 59ca8ad0e28..5668ce69e47 100644 --- a/packages/synthetics/manifest.yml +++ b/packages/synthetics/manifest.yml @@ -2,7 +2,7 @@ format_version: 1.0.0 name: synthetics title: Elastic Synthetics description: Monitor services availability. -version: 0.2.2 +version: 0.1.0 categories: ["custom"] release: experimental type: integration