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

Support input packages #809

Merged
merged 20 commits into from
Jun 1, 2022
Prev Previous commit
Next Next commit
Add sql_input 1.0.2
mtojek committed May 10, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit bb6ec75fd80237a02ef1f91bc05ff37f74297dc1
56 changes: 56 additions & 0 deletions testdata/generated/package/sql_input/1.0.2/index.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"name": "sql_input",
"title": "SQL Input",
"version": "1.0.2",
"release": "ga",
"description": "Execute custom queries against an SQL database and store the results in Elasticsearch.",
"type": "input",
"download": "/epr/sql_input/sql_input-1.0.2.zip",
"path": "/package/sql_input/1.0.2",
"icons": [
{
"src": "/img/sample-logo.svg",
"path": "/package/sql_input/1.0.2/img/sample-logo.svg",
"type": "image/svg+xml"
}
],
"owner": {
"github": "elastic/integrations"
},
"categories": [
"custom",
"datastore"
],
"format_version": "1.0.0",
"readme": "/package/sql_input/1.0.2/docs/README.md",
"license": "basic",
"screenshots": [
{
"src": "/img/sample-screenshot.png",
"path": "/package/sql_input/1.0.2/img/sample-screenshot.png",
"title": "Sample screenshot",
"size": "600x600",
"type": "image/png"
}
],
"assets": [
"/package/sql_input/1.0.2/changelog.yml",
"/package/sql_input/1.0.2/manifest.yml",
"/package/sql_input/1.0.2/docs/README.md",
"/package/sql_input/1.0.2/fields/input.yml",
"/package/sql_input/1.0.2/img/sample-logo.svg",
"/package/sql_input/1.0.2/img/sample-screenshot.png",
"/package/sql_input/1.0.2/agent/input/input.yml.hbs"
],
"policy_templates": [
{
"name": "sql_query",
"title": "SQL Query",
"description": "Query the database to capture metrics.",
"multiple": true,
"type": "metrics",
"input": "sql",
"template_path": "input.yml.hbs"
}
]
}
31 changes: 31 additions & 0 deletions testdata/generated/search-all.json
Original file line number Diff line number Diff line change
@@ -385,6 +385,37 @@
"datastore"
]
},
{
"name": "sql_input",
"title": "SQL Input",
"version": "1.0.2",
"release": "ga",
"description": "Execute custom queries against an SQL database and store the results in Elasticsearch.",
"type": "input",
"download": "/epr/sql_input/sql_input-1.0.2.zip",
"path": "/package/sql_input/1.0.2",
"icons": [
{
"src": "/img/sample-logo.svg",
"path": "/package/sql_input/1.0.2/img/sample-logo.svg",
"type": "image/svg+xml"
}
],
"policy_templates": [
{
"name": "sql_query",
"title": "SQL Query",
"description": "Query the database to capture metrics."
}
],
"owner": {
"github": "elastic/integrations"
},
"categories": [
"custom",
"datastore"
]
},
{
"name": "yamlpipeline",
"title": "Yaml Pipeline package",
8 changes: 4 additions & 4 deletions testdata/generated/search-category-custom.json
Original file line number Diff line number Diff line change
@@ -241,16 +241,16 @@
{
"name": "sql_input",
"title": "SQL Input",
"version": "1.0.1",
"version": "1.0.2",
"release": "ga",
"description": "Execute custom queries against an SQL database and store the results in Elasticsearch.",
"type": "input",
"download": "/epr/sql_input/sql_input-1.0.1.zip",
"path": "/package/sql_input/1.0.1",
"download": "/epr/sql_input/sql_input-1.0.2.zip",
"path": "/package/sql_input/1.0.2",
"icons": [
{
"src": "/img/sample-logo.svg",
"path": "/package/sql_input/1.0.1/img/sample-logo.svg",
"path": "/package/sql_input/1.0.2/img/sample-logo.svg",
"type": "image/svg+xml"
}
],
8 changes: 4 additions & 4 deletions testdata/generated/search-category-datastore-prerelease.json
Original file line number Diff line number Diff line change
@@ -73,16 +73,16 @@
{
"name": "sql_input",
"title": "SQL Input",
"version": "1.0.1",
"version": "1.0.2",
"release": "ga",
"description": "Execute custom queries against an SQL database and store the results in Elasticsearch.",
"type": "input",
"download": "/epr/sql_input/sql_input-1.0.1.zip",
"path": "/package/sql_input/1.0.1",
"download": "/epr/sql_input/sql_input-1.0.2.zip",
"path": "/package/sql_input/1.0.2",
"icons": [
{
"src": "/img/sample-logo.svg",
"path": "/package/sql_input/1.0.1/img/sample-logo.svg",
"path": "/package/sql_input/1.0.2/img/sample-logo.svg",
"type": "image/svg+xml"
}
],
8 changes: 4 additions & 4 deletions testdata/generated/search-category-datastore.json
Original file line number Diff line number Diff line change
@@ -73,16 +73,16 @@
{
"name": "sql_input",
"title": "SQL Input",
"version": "1.0.1",
"version": "1.0.2",
"release": "ga",
"description": "Execute custom queries against an SQL database and store the results in Elasticsearch.",
"type": "input",
"download": "/epr/sql_input/sql_input-1.0.1.zip",
"path": "/package/sql_input/1.0.1",
"download": "/epr/sql_input/sql_input-1.0.2.zip",
"path": "/package/sql_input/1.0.2",
"icons": [
{
"src": "/img/sample-logo.svg",
"path": "/package/sql_input/1.0.1/img/sample-logo.svg",
"path": "/package/sql_input/1.0.2/img/sample-logo.svg",
"type": "image/svg+xml"
}
],
8 changes: 4 additions & 4 deletions testdata/generated/search-input-packages.json
Original file line number Diff line number Diff line change
@@ -2,16 +2,16 @@
{
"name": "sql_input",
"title": "SQL Input",
"version": "1.0.1",
"version": "1.0.2",
"release": "ga",
"description": "Execute custom queries against an SQL database and store the results in Elasticsearch.",
"type": "input",
"download": "/epr/sql_input/sql_input-1.0.1.zip",
"path": "/package/sql_input/1.0.1",
"download": "/epr/sql_input/sql_input-1.0.2.zip",
"path": "/package/sql_input/1.0.2",
"icons": [
{
"src": "/img/sample-logo.svg",
"path": "/package/sql_input/1.0.1/img/sample-logo.svg",
"path": "/package/sql_input/1.0.2/img/sample-logo.svg",
"type": "image/svg+xml"
}
],
8 changes: 4 additions & 4 deletions testdata/generated/search-kibana652.json
Original file line number Diff line number Diff line change
@@ -55,16 +55,16 @@
{
"name": "sql_input",
"title": "SQL Input",
"version": "1.0.1",
"version": "1.0.2",
"release": "ga",
"description": "Execute custom queries against an SQL database and store the results in Elasticsearch.",
"type": "input",
"download": "/epr/sql_input/sql_input-1.0.1.zip",
"path": "/package/sql_input/1.0.1",
"download": "/epr/sql_input/sql_input-1.0.2.zip",
"path": "/package/sql_input/1.0.2",
"icons": [
{
"src": "/img/sample-logo.svg",
"path": "/package/sql_input/1.0.1/img/sample-logo.svg",
"path": "/package/sql_input/1.0.2/img/sample-logo.svg",
"type": "image/svg+xml"
}
],
8 changes: 4 additions & 4 deletions testdata/generated/search-kibana721.json
Original file line number Diff line number Diff line change
@@ -230,16 +230,16 @@
{
"name": "sql_input",
"title": "SQL Input",
"version": "1.0.1",
"version": "1.0.2",
"release": "ga",
"description": "Execute custom queries against an SQL database and store the results in Elasticsearch.",
"type": "input",
"download": "/epr/sql_input/sql_input-1.0.1.zip",
"path": "/package/sql_input/1.0.1",
"download": "/epr/sql_input/sql_input-1.0.2.zip",
"path": "/package/sql_input/1.0.2",
"icons": [
{
"src": "/img/sample-logo.svg",
"path": "/package/sql_input/1.0.1/img/sample-logo.svg",
"path": "/package/sql_input/1.0.2/img/sample-logo.svg",
"type": "image/svg+xml"
}
],
8 changes: 4 additions & 4 deletions testdata/generated/search-kibana800.json
Original file line number Diff line number Diff line change
@@ -236,16 +236,16 @@
{
"name": "sql_input",
"title": "SQL Input",
"version": "1.0.1",
"version": "1.0.2",
"release": "ga",
"description": "Execute custom queries against an SQL database and store the results in Elasticsearch.",
"type": "input",
"download": "/epr/sql_input/sql_input-1.0.1.zip",
"path": "/package/sql_input/1.0.1",
"download": "/epr/sql_input/sql_input-1.0.2.zip",
"path": "/package/sql_input/1.0.2",
"icons": [
{
"src": "/img/sample-logo.svg",
"path": "/package/sql_input/1.0.1/img/sample-logo.svg",
"path": "/package/sql_input/1.0.2/img/sample-logo.svg",
"type": "image/svg+xml"
}
],
8 changes: 4 additions & 4 deletions testdata/generated/search-package-experimental.json
Original file line number Diff line number Diff line change
@@ -467,16 +467,16 @@
{
"name": "sql_input",
"title": "SQL Input",
"version": "1.0.1",
"version": "1.0.2",
"release": "ga",
"description": "Execute custom queries against an SQL database and store the results in Elasticsearch.",
"type": "input",
"download": "/epr/sql_input/sql_input-1.0.1.zip",
"path": "/package/sql_input/1.0.1",
"download": "/epr/sql_input/sql_input-1.0.2.zip",
"path": "/package/sql_input/1.0.2",
"icons": [
{
"src": "/img/sample-logo.svg",
"path": "/package/sql_input/1.0.1/img/sample-logo.svg",
"path": "/package/sql_input/1.0.2/img/sample-logo.svg",
"type": "image/svg+xml"
}
],
8 changes: 4 additions & 4 deletions testdata/generated/search-package-internal.json
Original file line number Diff line number Diff line change
@@ -273,16 +273,16 @@
{
"name": "sql_input",
"title": "SQL Input",
"version": "1.0.1",
"version": "1.0.2",
"release": "ga",
"description": "Execute custom queries against an SQL database and store the results in Elasticsearch.",
"type": "input",
"download": "/epr/sql_input/sql_input-1.0.1.zip",
"path": "/package/sql_input/1.0.1",
"download": "/epr/sql_input/sql_input-1.0.2.zip",
"path": "/package/sql_input/1.0.2",
"icons": [
{
"src": "/img/sample-logo.svg",
"path": "/package/sql_input/1.0.1/img/sample-logo.svg",
"path": "/package/sql_input/1.0.2/img/sample-logo.svg",
"type": "image/svg+xml"
}
],
8 changes: 4 additions & 4 deletions testdata/generated/search-package-prerelease.json
Original file line number Diff line number Diff line change
@@ -446,16 +446,16 @@
{
"name": "sql_input",
"title": "SQL Input",
"version": "1.0.1",
"version": "1.0.2",
"release": "ga",
"description": "Execute custom queries against an SQL database and store the results in Elasticsearch.",
"type": "input",
"download": "/epr/sql_input/sql_input-1.0.1.zip",
"path": "/package/sql_input/1.0.1",
"download": "/epr/sql_input/sql_input-1.0.2.zip",
"path": "/package/sql_input/1.0.2",
"icons": [
{
"src": "/img/sample-logo.svg",
"path": "/package/sql_input/1.0.1/img/sample-logo.svg",
"path": "/package/sql_input/1.0.2/img/sample-logo.svg",
"type": "image/svg+xml"
}
],
8 changes: 4 additions & 4 deletions testdata/generated/search.json
Original file line number Diff line number Diff line change
@@ -273,16 +273,16 @@
{
"name": "sql_input",
"title": "SQL Input",
"version": "1.0.1",
"version": "1.0.2",
"release": "ga",
"description": "Execute custom queries against an SQL database and store the results in Elasticsearch.",
"type": "input",
"download": "/epr/sql_input/sql_input-1.0.1.zip",
"path": "/package/sql_input/1.0.1",
"download": "/epr/sql_input/sql_input-1.0.2.zip",
"path": "/package/sql_input/1.0.2",
"icons": [
{
"src": "/img/sample-logo.svg",
"path": "/package/sql_input/1.0.1/img/sample-logo.svg",
"path": "/package/sql_input/1.0.2/img/sample-logo.svg",
"type": "image/svg+xml"
}
],
9 changes: 9 additions & 0 deletions testdata/package/sql_input/1.0.2/agent/input/input.yml.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
metricsets: ["query"]
period: {{period}}
hosts:
{{#each hosts}}
- {{this}}
{{/each}}
driver: {{driver}}
sql_query: {{sql_query}
sql_response_format: {{sql_response_format}}
6 changes: 6 additions & 0 deletions testdata/package/sql_input/1.0.2/changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# newer versions go on top
- version: "1.0.1"
changes:
- description: Initial draft of the package
type: enhancement
link: https://github.com/elastic/package-spec/pull/325
1 change: 1 addition & 0 deletions testdata/package/sql_input/1.0.2/docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# SQL Input
4 changes: 4 additions & 0 deletions testdata/package/sql_input/1.0.2/fields/input.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- name: input.name
type: constant_keyword
description: Sample field to be added.
value: logs
1 change: 1 addition & 0 deletions testdata/package/sql_input/1.0.2/img/sample-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
67 changes: 67 additions & 0 deletions testdata/package/sql_input/1.0.2/manifest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
format_version: 1.0.0
name: sql_input
title: SQL Input
description: >-
Execute custom queries against an SQL database and store the results in Elasticsearch.
type: input
version: 1.0.2
license: basic
categories:
- custom
- datastore
policy_templates:
- name: sql_query
type: metrics
title: SQL Query
description: Query the database to capture metrics.
input: sql
template_path: input.yml.hbs
vars:
- name: hosts
type: text
title: Hosts
multi: true
required: true
show_user: true
default:
- http://127.0.0.1
- name: period
type: text
title: Period
multi: false
required: true
show_user: true
default: 10s
- name: driver
type: text
title: Driver
description: "Supported database drivers: mssql, mysql, oracle, postgres"
multi: false
required: true
show_user: true
default: "mysql"
- name: sql_query
type: text
title: Query
multi: false
required: true
show_user: true
default: "SHOW GLOBAL STATUS LIKE 'Innodb_system%'"
- name: sql_response_format
type: text
title: Response format
description: "Supported response formats: variables, table"
multi: false
required: true
show_user: false
default: "variables"
icons:
- src: "/img/sample-logo.svg"
type: "image/svg+xml"
screenshots:
- src: "/img/sample-screenshot.png"
title: "Sample screenshot"
size: "600x600"
type: "image/png"
owner:
github: elastic/integrations