Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

re-adding synthetic package #406

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
type: http
name: {{name}}
urls: {{url}}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change to urls: {{urls}}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually if you want to properly render a list of urls, there is a different to do this. See the paths example:

paths:
{{#each paths as |path i|}}
 - {{path}}
{{/each}}

EDIT:

I just realized (# do not change this to true, we specifically want it to be singular) that you may prefer to keep a string here (concatenated urls). In this case the Dominique's suggestion is correct.

schedule: {{schedule}}
15 changes: 15 additions & 0 deletions packages/synthetics/data_stream/monitor/fields/base-fields.yml
Original file line number Diff line number Diff line change
@@ -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.
10 changes: 10 additions & 0 deletions packages/synthetics/data_stream/monitor/fields/ecs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
- name: process
title: Process
group: 2
type: group
fields:
- name: pid
level: core
type: long
format: string
description: Process id.
270 changes: 270 additions & 0 deletions packages/synthetics/data_stream/monitor/fields/fields.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,270 @@
- name: haproxy.info
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume that it has been copied from haproxy.info. This file should describe fields that data stream monitor contains.

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.
28 changes: 28 additions & 0 deletions packages/synthetics/data_stream/monitor/manifest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
type: logs
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change to synthetics elastic/elasticsearch#61665

title: synthetic monitor check
release: experimental
streams:
- input: synthetics/http
title: Synthetic monitor check
description: Monitor the health of an http endpoint
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: HTTP

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While migrating from Beats modules to Integration packages we tend to improve things including user experience. Do you think it might be better to switch this field to multi: true?

multi: false
required: true
show_user: true
4 changes: 4 additions & 0 deletions packages/synthetics/docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Elastic Synthetics Integration

This integration sets up required assets for Synthetics to use central management.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you want to render the list of fields, sample event, similarly to https://github.com/elastic/integrations/tree/master/packages/nginx , I suggest to use the template file for README.md . See: https://raw.githubusercontent.com/elastic/integrations/master/packages/nginx/_dev/build/docs/README.md

The elastic-package build command will render it into the final README.md


14 changes: 14 additions & 0 deletions packages/synthetics/img/uptime-logo-color-64px.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions packages/synthetics/manifest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
format_version: 1.0.0
name: synthetics
title: Elastic Synthetics
description: Monitor services availability.
version: 0.1.0
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