diff --git a/x-pack/plugins/fleet/common/types/models/epm.ts b/x-pack/plugins/fleet/common/types/models/epm.ts index 9da1075e52dff..902b32745d0e6 100644 --- a/x-pack/plugins/fleet/common/types/models/epm.ts +++ b/x-pack/plugins/fleet/common/types/models/epm.ts @@ -149,7 +149,7 @@ interface RegistryOverridePropertyValue { screenshots?: RegistryImage[]; } -export type RegistryRelease = PackageSpecManifest['release']; +export type RegistryRelease = NonNullable; export interface RegistryImage extends PackageSpecIcon { path: string; } diff --git a/x-pack/plugins/fleet/common/types/models/package_spec.ts b/x-pack/plugins/fleet/common/types/models/package_spec.ts index f4021b087912a..9eadbb65f373c 100644 --- a/x-pack/plugins/fleet/common/types/models/package_spec.ts +++ b/x-pack/plugins/fleet/common/types/models/package_spec.ts @@ -16,7 +16,7 @@ export interface PackageSpecManifest { version: string; license?: 'basic'; type?: 'integration'; - release: 'experimental' | 'beta' | 'ga'; + release?: 'experimental' | 'beta' | 'ga'; categories?: Array; conditions?: PackageSpecConditions; icons?: PackageSpecIcon[]; diff --git a/x-pack/plugins/fleet/public/applications/integrations/hooks/use_merge_epr_with_replacements.ts b/x-pack/plugins/fleet/public/applications/integrations/hooks/use_merge_epr_with_replacements.ts index 89163e0438a2d..412cdac83c4a7 100644 --- a/x-pack/plugins/fleet/public/applications/integrations/hooks/use_merge_epr_with_replacements.ts +++ b/x-pack/plugins/fleet/public/applications/integrations/hooks/use_merge_epr_with_replacements.ts @@ -15,7 +15,7 @@ import { FLEET_APM_PACKAGE } from '../../../../common/constants'; function findReplacementsForEprPackage( replacements: CustomIntegration[], packageName: string, - release: 'beta' | 'experimental' | 'ga' + release?: 'beta' | 'experimental' | 'ga' ): CustomIntegration[] { if (release === 'ga') { return []; diff --git a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/home/index.tsx b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/home/index.tsx index 2ddc78218466a..4322f434ddc70 100644 --- a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/home/index.tsx +++ b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/home/index.tsx @@ -71,7 +71,7 @@ export const mapToCard = ( let release: 'ga' | 'beta' | 'experimental' | undefined; if ('release' in item) { release = item.release; - } else if (item.isBeta === true) { + } else if ((item as CustomIntegration).isBeta === true) { release = 'beta'; } diff --git a/x-pack/plugins/fleet/server/services/epm/archive/parse.ts b/x-pack/plugins/fleet/server/services/epm/archive/parse.ts index 14b1eb8c305b8..30cd13137ff59 100644 --- a/x-pack/plugins/fleet/server/services/epm/archive/parse.ts +++ b/x-pack/plugins/fleet/server/services/epm/archive/parse.ts @@ -8,6 +8,8 @@ import { merge } from '@kbn/std'; import yaml from 'js-yaml'; import { pick, uniq } from 'lodash'; +import semverMajor from 'semver/functions/major'; +import semverPrerelease from 'semver/functions/prerelease'; import type { ArchivePackage, @@ -93,7 +95,6 @@ const requiredArchivePackageProps: readonly RequiredPackageProp[] = [ 'description', 'title', 'format_version', - 'release', 'owner', ] as const; @@ -108,6 +109,7 @@ const optionalArchivePackageProps: readonly OptionalPackageProp[] = [ 'screenshots', 'icons', 'policy_templates', + 'release', ] as const; const registryInputProps = Object.values(RegistryInputKeys); @@ -206,6 +208,14 @@ function parseAndVerifyArchive(paths: string[]): ArchivePackage { parsed.readme = readme; } + // If no `release` is specified, fall back to a value based on the `version` of the integration + // to maintain backwards comptability. This is a temporary measure until the `release` field is + // completely deprecated elsewhere in Fleet/Agent. See https://github.com/elastic/package-spec/issues/225 + if (!parsed.release) { + parsed.release = + semverPrerelease(parsed.version) || semverMajor(parsed.version) < 1 ? 'beta' : 'ga'; + } + return parsed; } diff --git a/x-pack/test/fleet_api_integration/apis/epm/install_by_upload.ts b/x-pack/test/fleet_api_integration/apis/epm/install_by_upload.ts index 28b68609ce15e..a952d24129894 100644 --- a/x-pack/test/fleet_api_integration/apis/epm/install_by_upload.ts +++ b/x-pack/test/fleet_api_integration/apis/epm/install_by_upload.ts @@ -163,7 +163,7 @@ export default function (providerContext: FtrProviderContext) { .send(buf) .expect(400); expect(res.error.text).to.equal( - '{"statusCode":400,"error":"Bad Request","message":"Invalid top-level package manifest: one or more fields missing of name, version, description, title, format_version, release, owner"}' + '{"statusCode":400,"error":"Bad Request","message":"Invalid top-level package manifest: one or more fields missing of name, version, description, title, format_version, owner"}' ); }); diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/access/agent/stream/log.yml.hbs b/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/access/agent/stream/log.yml.hbs new file mode 100644 index 0000000000000..0146a6e9c63a6 --- /dev/null +++ b/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/access/agent/stream/log.yml.hbs @@ -0,0 +1,10 @@ +paths: +{{#each paths as |path i|}} + - {{path}} +{{/each}} +exclude_files: [".gz$"] +processors: + - add_fields: + target: '' + fields: + ecs.version: 1.5.0 \ No newline at end of file diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/access/elasticsearch/ingest_pipeline/default.yml b/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/access/elasticsearch/ingest_pipeline/default.yml new file mode 100644 index 0000000000000..9e0d5272bed9b --- /dev/null +++ b/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/access/elasticsearch/ingest_pipeline/default.yml @@ -0,0 +1,101 @@ +--- +description: "Pipeline for parsing Apache HTTP Server access logs. Requires the geoip and user_agent plugins." + +processors: +- grok: + field: message + patterns: + - '%{IPORHOST:destination.domain} %{IPORHOST:source.ip} - %{DATA:user.name} \[%{HTTPDATE:apache.access.time}\] + "(?:%{WORD:http.request.method} %{DATA:url.original} HTTP/%{NUMBER:http.version}|-)?" + %{NUMBER:http.response.status_code:long} (?:%{NUMBER:http.response.body.bytes:long}|-)( + "%{DATA:http.request.referrer}")?( "%{DATA:user_agent.original}")?' + - '%{IPORHOST:source.address} - %{DATA:user.name} \[%{HTTPDATE:apache.access.time}\] + "(?:%{WORD:http.request.method} %{DATA:url.original} HTTP/%{NUMBER:http.version}|-)?" + %{NUMBER:http.response.status_code:long} (?:%{NUMBER:http.response.body.bytes:long}|-)( + "%{DATA:http.request.referrer}")?( "%{DATA:user_agent.original}")?' + - '%{IPORHOST:source.address} - %{DATA:user.name} \[%{HTTPDATE:apache.access.time}\] + "-" %{NUMBER:http.response.status_code:long} -' + - \[%{HTTPDATE:apache.access.time}\] %{IPORHOST:source.address} %{DATA:apache.access.ssl.protocol} + %{DATA:apache.access.ssl.cipher} "%{WORD:http.request.method} %{DATA:url.original} + HTTP/%{NUMBER:http.version}" (-|%{NUMBER:http.response.body.bytes:long}) + ignore_missing: true +- remove: + field: message +- set: + field: event.kind + value: event +- set: + field: event.category + value: web +- set: + field: event.outcome + value: success + if: "ctx?.http?.response?.status_code != null && ctx.http.response.status_code < 400" +- set: + field: event.outcome + value: failure + if: "ctx?.http?.response?.status_code != null && ctx.http.response.status_code > 399" +- grok: + field: source.address + ignore_missing: true + patterns: + - ^(%{IP:source.ip}|%{HOSTNAME:source.domain})$ +- rename: + field: '@timestamp' + target_field: event.created +- date: + field: apache.access.time + target_field: '@timestamp' + formats: + - dd/MMM/yyyy:H:m:s Z + ignore_failure: true +- remove: + field: apache.access.time + ignore_failure: true +- user_agent: + field: user_agent.original + ignore_failure: true +- geoip: + field: source.ip + target_field: source.geo + ignore_missing: true +- geoip: + database_file: GeoLite2-ASN.mmdb + field: source.ip + target_field: source.as + properties: + - asn + - organization_name + ignore_missing: true +- rename: + field: source.as.asn + target_field: source.as.number + ignore_missing: true +- rename: + field: source.as.organization_name + target_field: source.as.organization.name + ignore_missing: true +- set: + field: tls.cipher + value: '{{apache.access.ssl.cipher}}' + if: ctx?.apache?.access?.ssl?.cipher != null + +- script: + lang: painless + if: ctx?.apache?.access?.ssl?.protocol != null + source: >- + def parts = ctx.apache.access.ssl.protocol.toLowerCase().splitOnToken("v"); + if (parts.length != 2) { + return; + } + if (parts[1].contains(".")) { + ctx.tls.version = parts[1]; + } else { + ctx.tls.version = parts[1] + ".0"; + } + ctx.tls.version_protocol = parts[0]; + +on_failure: +- set: + field: error.message + value: '{{ _ingest.on_failure_message }}' diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/access/fields/base-fields.yml b/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/access/fields/base-fields.yml new file mode 100644 index 0000000000000..5dab30cf9768c --- /dev/null +++ b/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/access/fields/base-fields.yml @@ -0,0 +1,13 @@ +- name: data_stream.type + type: constant_keyword + description: Data stream type. +- name: data_stream.dataset + type: constant_keyword + description: Data stream dataset. +- name: data_stream.namespace + type: constant_keyword + description: Data stream namespace. +- name: '@timestamp' + type: date + description: Event timestamp. + diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/access/fields/ecs.yml b/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/access/fields/ecs.yml new file mode 100644 index 0000000000000..710a5a1ad6540 --- /dev/null +++ b/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/access/fields/ecs.yml @@ -0,0 +1,187 @@ +- name: message + level: core + type: text + description: |- + For log events the message field contains the log message, optimized for viewing in a log viewer. + For structured logs without an original message field, other fields can be concatenated to form a human-readable summary of the event. + If multiple messages exist, they can be combined into one message. +- name: http + title: HTTP + group: 2 + type: group + fields: + - name: request.method + level: extended + type: keyword + description: |- + HTTP request method. + Prior to ECS 1.6.0 the following guidance was provided: + "The field value must be normalized to lowercase for querying." + As of ECS 1.6.0, the guidance is deprecated because the original case of the method may be useful in anomaly detection. Original case will be mandated in ECS 2.0.0 + ignore_above: 1024 + - name: request.referrer + level: extended + type: keyword + description: Referrer for this HTTP request. + ignore_above: 1024 + - name: response.body.bytes + level: extended + type: long + format: bytes + description: Size in bytes of the response body. + - name: response.status_code + level: extended + type: long + format: string + description: HTTP response status code. + - name: version + level: extended + type: keyword + description: HTTP version. + ignore_above: 1024 +- name: log + title: Log + group: 2 + type: group + fields: + - name: level + level: core + type: keyword + description: |- + Original log level of the log event. + If the source of the event provides a log level or textual severity, this is the one that goes in `log.level`. If your source doesn't specify one, you may put your event transport's severity here (e.g. Syslog severity). + Some examples are `warn`, `err`, `i`, `informational`. + ignore_above: 1024 +- name: process + title: Process + group: 2 + type: group + fields: + - name: pid + level: core + type: long + format: string + description: Process id. + - name: thread.id + level: extended + type: long + format: string + description: Thread ID. +- name: source + title: Source + group: 2 + type: group + fields: + - name: address + level: extended + type: keyword + description: |- + Some event source addresses are defined ambiguously. The event will sometimes list an IP, a domain or a unix socket. You should always store the raw address in the `.address` field. + Then it should be duplicated to `.ip` or `.domain`, depending on which one it is. + ignore_above: 1024 + - name: geo.city_name + level: core + type: keyword + description: City name. + ignore_above: 1024 + - name: geo.continent_name + level: core + type: keyword + description: Name of the continent. + ignore_above: 1024 + - name: geo.country_iso_code + level: core + type: keyword + description: Country ISO code. + ignore_above: 1024 + - name: geo.location + level: core + type: geo_point + description: Longitude and latitude. + - name: geo.region_iso_code + level: core + type: keyword + description: Region ISO code. + ignore_above: 1024 + - name: geo.region_name + level: core + type: keyword + description: Region name. + ignore_above: 1024 +- name: url + title: URL + group: 2 + type: group + fields: + - name: original + level: extended + type: keyword + description: |- + Unmodified original url as seen in the event source. + Note that in network monitoring, the observed URL may be a full URL, whereas in access logs, the URL is often just represented as a path. + This field is meant to represent the URL as it was observed, complete or not. + ignore_above: 1024 + multi_fields: + - name: text + type: text + norms: false + default_field: false +- name: user + title: User + group: 2 + type: group + fields: + - name: name + level: core + type: keyword + description: Short name or login of the user. + ignore_above: 1024 + multi_fields: + - name: text + type: text + norms: false + default_field: false +- name: user_agent + title: User agent + group: 2 + type: group + fields: + - name: device.name + level: extended + type: keyword + description: Name of the device. + ignore_above: 1024 + - name: name + level: extended + type: keyword + description: Name of the user agent. + ignore_above: 1024 + - name: original + level: extended + type: keyword + description: Unparsed user_agent string. + ignore_above: 1024 + multi_fields: + - name: text + type: text + norms: false + - name: os.name + level: extended + type: keyword + description: Operating system name, without the version. + ignore_above: 1024 + multi_fields: + - name: text + type: text + norms: false + default_field: false + - name: os.version + level: extended + type: keyword + ignore_above: 1024 + description: Operating system version as a raw string. + - name: version + level: extended + type: keyword + ignore_above: 1024 + description: Version of the user agent. diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/access/fields/fields.yml b/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/access/fields/fields.yml new file mode 100644 index 0000000000000..b39dc4e598f8b --- /dev/null +++ b/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/access/fields/fields.yml @@ -0,0 +1,11 @@ +- name: apache.access + type: group + fields: + - name: ssl.protocol + type: keyword + description: | + SSL protocol version. + - name: ssl.cipher + type: keyword + description: | + SSL cipher name. diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/access/manifest.yml b/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/access/manifest.yml new file mode 100644 index 0000000000000..e541241c979ba --- /dev/null +++ b/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/access/manifest.yml @@ -0,0 +1,19 @@ +title: Apache access logs +release: experimental +type: logs +streams: +- input: logfile + vars: + - name: paths + type: text + title: Paths + multi: true + required: true + show_user: true + default: + - /var/log/apache2/access.log* + - /var/log/apache2/other_vhosts_access.log* + - /var/log/httpd/access_log* + template_path: log.yml.hbs + title: Apache access logs + description: Collect Apache access logs diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/error/agent/stream/log.yml.hbs b/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/error/agent/stream/log.yml.hbs new file mode 100644 index 0000000000000..9a26f86f59763 --- /dev/null +++ b/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/error/agent/stream/log.yml.hbs @@ -0,0 +1,11 @@ +paths: +{{#each paths as |path i|}} + - {{path}} +{{/each}} +exclude_files: [".gz$"] +processors: + - add_locale: ~ + - add_fields: + target: '' + fields: + ecs.version: 1.5.0 \ No newline at end of file diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/error/elasticsearch/ingest_pipeline/default.yml b/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/error/elasticsearch/ingest_pipeline/default.yml new file mode 100644 index 0000000000000..a39c890f69836 --- /dev/null +++ b/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/error/elasticsearch/ingest_pipeline/default.yml @@ -0,0 +1,86 @@ +--- +description: Pipeline for parsing apache error logs +processors: +- grok: + field: message + patterns: + - \[%{APACHE_TIME:apache.error.timestamp}\] \[%{LOGLEVEL:log.level}\]( \[client + %{IPORHOST:source.address}(:%{POSINT:source.port})?\])? %{GREEDYDATA:message} + - \[%{APACHE_TIME:apache.error.timestamp}\] \[%{DATA:apache.error.module}:%{LOGLEVEL:log.level}\] + \[pid %{NUMBER:process.pid:long}(:tid %{NUMBER:process.thread.id:long})?\]( + \[client %{IPORHOST:source.address}(:%{POSINT:source.port})?\])? %{GREEDYDATA:message} + pattern_definitions: + APACHE_TIME: '%{DAY} %{MONTH} %{MONTHDAY} %{TIME} %{YEAR}' + ignore_missing: true +- date: + if: ctx.event.timezone == null + field: apache.error.timestamp + target_field: '@timestamp' + formats: + - EEE MMM dd H:m:s yyyy + - EEE MMM dd H:m:s.SSSSSS yyyy + on_failure: + - append: + field: error.message + value: '{{ _ingest.on_failure_message }}' +- date: + if: ctx.event.timezone != null + field: apache.error.timestamp + target_field: '@timestamp' + formats: + - EEE MMM dd H:m:s yyyy + - EEE MMM dd H:m:s.SSSSSS yyyy + timezone: '{{ event.timezone }}' + on_failure: + - append: + field: error.message + value: '{{ _ingest.on_failure_message }}' +- remove: + field: apache.error.timestamp + ignore_failure: true +- set: + field: event.kind + value: event +- set: + field: event.category + value: web +- script: + if: "ctx?.log?.level != null" + lang: painless + source: >- + def err_levels = ["emerg", "alert", "crit", "error", "warn"]; + if (err_levels.contains(ctx.log.level)) { + ctx.event.type = "error"; + } else { + ctx.event.type = "info"; + } + +- grok: + field: source.address + ignore_missing: true + patterns: + - ^(%{IP:source.ip}|%{HOSTNAME:source.domain})$ +- geoip: + field: source.ip + target_field: source.geo + ignore_missing: true +- geoip: + database_file: GeoLite2-ASN.mmdb + field: source.ip + target_field: source.as + properties: + - asn + - organization_name + ignore_missing: true +- rename: + field: source.as.asn + target_field: source.as.number + ignore_missing: true +- rename: + field: source.as.organization_name + target_field: source.as.organization.name + ignore_missing: true +on_failure: +- set: + field: error.message + value: '{{ _ingest.on_failure_message }}' diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/error/fields/base-fields.yml b/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/error/fields/base-fields.yml new file mode 100644 index 0000000000000..5dab30cf9768c --- /dev/null +++ b/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/error/fields/base-fields.yml @@ -0,0 +1,13 @@ +- name: data_stream.type + type: constant_keyword + description: Data stream type. +- name: data_stream.dataset + type: constant_keyword + description: Data stream dataset. +- name: data_stream.namespace + type: constant_keyword + description: Data stream namespace. +- name: '@timestamp' + type: date + description: Event timestamp. + diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/error/fields/ecs.yml b/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/error/fields/ecs.yml new file mode 100644 index 0000000000000..a96aabb70cbb6 --- /dev/null +++ b/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/error/fields/ecs.yml @@ -0,0 +1,177 @@ +- name: message + level: core + type: text + description: |- + For log events the message field contains the log message, optimized for viewing in a log viewer. + For structured logs without an original message field, other fields can be concatenated to form a human-readable summary of the event. + If multiple messages exist, they can be combined into one message. +- name: http + title: HTTP + group: 2 + type: group + fields: + - name: request.method + level: extended + type: keyword + description: |- + HTTP request method. + Prior to ECS 1.6.0 the following guidance was provided: + "The field value must be normalized to lowercase for querying." + As of ECS 1.6.0, the guidance is deprecated because the original case of the method may be useful in anomaly detection. Original case will be mandated in ECS 2.0.0 + ignore_above: 1024 + - name: request.referrer + level: extended + type: keyword + description: Referrer for this HTTP request. + ignore_above: 1024 + - name: response.body.bytes + level: extended + type: long + format: bytes + description: Size in bytes of the response body. + - name: response.status_code + level: extended + type: long + format: string + description: HTTP response status code. + - name: version + level: extended + type: keyword + description: HTTP version. + ignore_above: 1024 +- name: log + title: Log + group: 2 + type: group + fields: + - name: level + level: core + type: keyword + description: |- + Original log level of the log event. + If the source of the event provides a log level or textual severity, this is the one that goes in `log.level`. If your source doesn't specify one, you may put your event transport's severity here (e.g. Syslog severity). + Some examples are `warn`, `err`, `i`, `informational`. + ignore_above: 1024 +- name: process + title: Process + group: 2 + type: group + fields: + - name: pid + level: core + type: long + format: string + description: Process id. + - name: thread.id + level: extended + type: long + format: string + description: Thread ID. +- name: source + title: Source + group: 2 + type: group + fields: + - name: address + level: extended + type: keyword + description: |- + Some event source addresses are defined ambiguously. The event will sometimes list an IP, a domain or a unix socket. You should always store the raw address in the `.address` field. + Then it should be duplicated to `.ip` or `.domain`, depending on which one it is. + ignore_above: 1024 + - name: geo.city_name + level: core + type: keyword + description: City name. + ignore_above: 1024 + - name: geo.continent_name + level: core + type: keyword + description: Name of the continent. + ignore_above: 1024 + - name: geo.country_iso_code + level: core + type: keyword + description: Country ISO code. + ignore_above: 1024 + - name: geo.location + level: core + type: geo_point + description: Longitude and latitude. + - name: geo.region_iso_code + level: core + type: keyword + description: Region ISO code. + ignore_above: 1024 + - name: geo.region_name + level: core + type: keyword + description: Region name. + ignore_above: 1024 +- name: url + title: URL + group: 2 + type: group + fields: + - name: original + level: extended + type: keyword + description: |- + Unmodified original url as seen in the event source. + Note that in network monitoring, the observed URL may be a full URL, whereas in access logs, the URL is often just represented as a path. + This field is meant to represent the URL as it was observed, complete or not. + ignore_above: 1024 + multi_fields: + - name: text + type: text + norms: false + default_field: false +- name: user + title: User + group: 2 + type: group + fields: + - name: name + level: core + type: keyword + description: Short name or login of the user. + ignore_above: 1024 + multi_fields: + - name: text + type: text + norms: false + default_field: false +- name: user_agent + title: User agent + group: 2 + type: group + fields: + - name: device.name + level: extended + type: keyword + description: Name of the device. + ignore_above: 1024 + - name: name + level: extended + type: keyword + description: Name of the user agent. + ignore_above: 1024 + - name: original + level: extended + type: keyword + description: Unparsed user_agent string. + ignore_above: 1024 + multi_fields: + - name: text + type: text + norms: false + - name: os.name + level: extended + type: keyword + description: Operating system name, without the version. + ignore_above: 1024 + multi_fields: + - name: text + type: text + norms: false + default_field: false diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/error/fields/fields.yml b/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/error/fields/fields.yml new file mode 100644 index 0000000000000..a1c6712cadc64 --- /dev/null +++ b/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/error/fields/fields.yml @@ -0,0 +1,7 @@ +- name: apache.error + type: group + fields: + - name: module + type: keyword + description: | + The module producing the logged message. diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/error/manifest.yml b/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/error/manifest.yml new file mode 100644 index 0000000000000..96b15e7b2a230 --- /dev/null +++ b/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/error/manifest.yml @@ -0,0 +1,18 @@ +title: Apache error logs +release: experimental +type: logs +streams: +- input: logfile + vars: + - name: paths + type: text + title: Paths + multi: true + required: true + show_user: true + default: + - /var/log/apache2/error.log* + - /var/log/httpd/error_log* + template_path: log.yml.hbs + title: Apache error logs + description: Collect Apache error logs diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/status/agent/stream/stream.yml.hbs b/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/status/agent/stream/stream.yml.hbs new file mode 100644 index 0000000000000..9c7975244ba69 --- /dev/null +++ b/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/status/agent/stream/stream.yml.hbs @@ -0,0 +1,9 @@ +metricsets: ["status"] +hosts: +{{#each hosts}} + - {{this}} +{{/each}} +period: {{period}} +{{#if server_status_path}} +server_status_path: {{server_status_path}} +{{/if}} diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/status/fields/base-fields.yml b/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/status/fields/base-fields.yml new file mode 100644 index 0000000000000..5dab30cf9768c --- /dev/null +++ b/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/status/fields/base-fields.yml @@ -0,0 +1,13 @@ +- name: data_stream.type + type: constant_keyword + description: Data stream type. +- name: data_stream.dataset + type: constant_keyword + description: Data stream dataset. +- name: data_stream.namespace + type: constant_keyword + description: Data stream namespace. +- name: '@timestamp' + type: date + description: Event timestamp. + diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/status/fields/fields.yml b/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/status/fields/fields.yml new file mode 100644 index 0000000000000..473c7d97dfb74 --- /dev/null +++ b/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/status/fields/fields.yml @@ -0,0 +1,154 @@ +- name: apache.status + type: group + fields: + - name: hostname + type: keyword + description: | + Apache hostname. + - name: total_accesses + type: long + description: | + Total number of access requests. + - name: total_kbytes + type: long + description: | + Total number of kilobytes served. + - name: requests_per_sec + type: scaled_float + description: | + Requests per second. + - name: bytes_per_sec + type: scaled_float + description: | + Bytes per second. + - name: bytes_per_request + type: scaled_float + description: | + Bytes per request. + - name: workers.busy + type: long + description: | + Number of busy workers. + - name: workers.idle + type: long + description: | + Number of idle workers. + - name: uptime + type: group + fields: + - name: server_uptime + type: long + description: | + Server uptime in seconds. + - name: uptime + type: long + description: | + Server uptime. + - name: cpu + type: group + fields: + - name: load + type: scaled_float + description: | + CPU Load. + - name: user + type: scaled_float + description: | + CPU user load. + - name: system + type: scaled_float + description: | + System cpu. + - name: children_user + type: scaled_float + description: | + CPU of children user. + - name: children_system + type: scaled_float + description: | + CPU of children system. + - name: connections + type: group + fields: + - name: total + type: long + description: | + Total connections. + - name: async.writing + type: long + description: | + Async connection writing. + - name: async.keep_alive + type: long + description: | + Async keeped alive connections. + - name: async.closing + type: long + description: | + Async closed connections. + - name: load + type: group + fields: + - name: "1" + type: scaled_float + description: | + Load average for the last minute. + - name: "5" + type: scaled_float + description: | + Load average for the last 5 minutes. + - name: "15" + type: scaled_float + description: | + Load average for the last 15 minutes. + - name: scoreboard + type: group + fields: + - name: starting_up + type: long + description: | + Starting up. + - name: reading_request + type: long + description: | + Reading requests. + - name: sending_reply + type: long + description: | + Sending Reply. + - name: keepalive + type: long + description: | + Keep alive. + - name: dns_lookup + type: long + description: | + Dns Lookups. + - name: closing_connection + type: long + description: | + Closing connections. + - name: logging + type: long + description: | + Logging + - name: gracefully_finishing + type: long + description: | + Gracefully finishing. + - name: idle_cleanup + type: long + description: | + Idle cleanups. + - name: open_slot + type: long + description: | + Open slots. + - name: waiting_for_connection + type: long + description: | + Waiting for connections. + - name: total + type: long + description: | + Total. diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/status/manifest.yml b/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/status/manifest.yml new file mode 100644 index 0000000000000..e86342a6286d3 --- /dev/null +++ b/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/status/manifest.yml @@ -0,0 +1,22 @@ +title: Apache status metrics +release: experimental +type: metrics +streams: +- input: apache/metrics + vars: + - name: period + type: text + title: Period + multi: false + required: true + show_user: true + default: 10s + - name: server_status_path + type: text + title: Server Status Path + multi: false + required: true + show_user: false + default: /server-status + title: Apache status metrics + description: Collect Apache status metrics diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/status/sample_event.json b/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/status/sample_event.json new file mode 100644 index 0000000000000..c6fcf9584e5e0 --- /dev/null +++ b/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/dataset/status/sample_event.json @@ -0,0 +1,94 @@ +{ + "@timestamp": "2020-06-24T10:19:48.005Z", + "@metadata": { + "beat": "metricbeat", + "type": "_doc", + "version": "8.0.0", + "raw_index": "metrics-apache.status-default" + }, + "metricset": { + "name": "status", + "period": 10000 + }, + "apache": { + "status": { + "connections": { + "total": 0, + "async": { + "writing": 0, + "keep_alive": 0, + "closing": 0 + } + }, + "total_kbytes": 128, + "cpu": { + "children_user": 0, + "children_system": 0, + "load": 0.185185, + "user": 1.11, + "system": 1.79 + }, + "scoreboard": { + "logging": 0, + "idle_cleanup": 0, + "starting_up": 0, + "reading_request": 0, + "dns_lookup": 0, + "closing_connection": 0, + "gracefully_finishing": 0, + "sending_reply": 1, + "keepalive": 0, + "total": 400, + "open_slot": 325, + "waiting_for_connection": 74 + }, + "workers": { + "busy": 1, + "idle": 74 + }, + "bytes_per_sec": 83.6986, + "hostname": "127.0.0.1:8088", + "uptime": { + "server_uptime": 1566, + "uptime": 1566 + }, + "total_accesses": 1393, + "bytes_per_request": 94.0933, + "requests_per_sec": 0.889527, + "load": { + "1": 3.58, + "5": 3.54, + "15": 2.79 + } + } + }, + "service": { + "address": "127.0.0.1:8088", + "type": "apache" + }, + "event": { + "duration": 2381832, + "dataset": "apache.status", + "module": "apache" + }, + "dataset": { + "type": "metrics", + "name": "apache.status", + "namespace": "default" + }, + "stream": { + "dataset": "apache.status", + "namespace": "default", + "type": "metrics" + }, + "ecs": { + "version": "1.5.0" + }, + "agent": { + "type": "metricbeat", + "version": "8.0.0", + "ephemeral_id": "685f03e4-76e7-4d05-b398-8454b8964681", + "id": "a74466da-3ea4-44f9-aea0-11c5e4b920be", + "name": "MacBook-Elastic.local" + } +} \ No newline at end of file diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/docs/README.md b/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/docs/README.md new file mode 100644 index 0000000000000..0de86eb122b8b --- /dev/null +++ b/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/docs/README.md @@ -0,0 +1,238 @@ +# Apache Integration + +This integration periodically fetches metrics from [Apache](https://httpd.apache.org/) servers. It can parse access and error +logs created by the Apache server. + +## Compatibility + +The Apache datasets were tested with Apache 2.4.12 and 2.4.20 and are expected to work with +all versions >= 2.2.31 and >= 2.4.16. + +## Logs + +### Access Logs + +Access logs collects the Apache access logs. + +**Exported fields** + +| Field | Description | Type | +|---|---|---| +| @timestamp | Event timestamp. | date | +| apache.access.ssl.cipher | SSL cipher name. | keyword | +| apache.access.ssl.protocol | SSL protocol version. | keyword | +| data_stream.dataset | Data stream dataset. | constant_keyword | +| data_stream.namespace | Data stream namespace. | constant_keyword | +| data_stream.type | Data stream type. | constant_keyword | +| http.request.method | HTTP request method. Prior to ECS 1.6.0 the following guidance was provided: "The field value must be normalized to lowercase for querying." As of ECS 1.6.0, the guidance is deprecated because the original case of the method may be useful in anomaly detection. Original case will be mandated in ECS 2.0.0 | keyword | +| http.request.referrer | Referrer for this HTTP request. | keyword | +| http.response.body.bytes | Size in bytes of the response body. | long | +| http.response.status_code | HTTP response status code. | long | +| http.version | HTTP version. | keyword | +| log.level | Original log level of the log event. If the source of the event provides a log level or textual severity, this is the one that goes in `log.level`. If your source doesn't specify one, you may put your event transport's severity here (e.g. Syslog severity). Some examples are `warn`, `err`, `i`, `informational`. | keyword | +| message | For log events the message field contains the log message, optimized for viewing in a log viewer. For structured logs without an original message field, other fields can be concatenated to form a human-readable summary of the event. If multiple messages exist, they can be combined into one message. | text | +| process.pid | Process id. | long | +| process.thread.id | Thread ID. | long | +| source.address | Some event source addresses are defined ambiguously. The event will sometimes list an IP, a domain or a unix socket. You should always store the raw address in the `.address` field. Then it should be duplicated to `.ip` or `.domain`, depending on which one it is. | keyword | +| source.geo.city_name | City name. | keyword | +| source.geo.continent_name | Name of the continent. | keyword | +| source.geo.country_iso_code | Country ISO code. | keyword | +| source.geo.location | Longitude and latitude. | geo_point | +| source.geo.region_iso_code | Region ISO code. | keyword | +| source.geo.region_name | Region name. | keyword | +| url.original | Unmodified original url as seen in the event source. Note that in network monitoring, the observed URL may be a full URL, whereas in access logs, the URL is often just represented as a path. This field is meant to represent the URL as it was observed, complete or not. | keyword | +| user.name | Short name or login of the user. | keyword | +| user_agent.device.name | Name of the device. | keyword | +| user_agent.name | Name of the user agent. | keyword | +| user_agent.original | Unparsed user_agent string. | keyword | +| user_agent.os.name | Operating system name, without the version. | keyword | +| user_agent.os.version | Operating system version as a raw string. | keyword | +| user_agent.version | Version of the user agent. | keyword | + + +### Error Logs + +Error logs collects the Apache error logs. + +**Exported fields** + +| Field | Description | Type | +|---|---|---| +| @timestamp | Event timestamp. | date | +| apache.error.module | The module producing the logged message. | keyword | +| data_stream.dataset | Data stream dataset. | constant_keyword | +| data_stream.namespace | Data stream namespace. | constant_keyword | +| data_stream.type | Data stream type. | constant_keyword | +| http.request.method | HTTP request method. Prior to ECS 1.6.0 the following guidance was provided: "The field value must be normalized to lowercase for querying." As of ECS 1.6.0, the guidance is deprecated because the original case of the method may be useful in anomaly detection. Original case will be mandated in ECS 2.0.0 | keyword | +| http.request.referrer | Referrer for this HTTP request. | keyword | +| http.response.body.bytes | Size in bytes of the response body. | long | +| http.response.status_code | HTTP response status code. | long | +| http.version | HTTP version. | keyword | +| log.level | Original log level of the log event. If the source of the event provides a log level or textual severity, this is the one that goes in `log.level`. If your source doesn't specify one, you may put your event transport's severity here (e.g. Syslog severity). Some examples are `warn`, `err`, `i`, `informational`. | keyword | +| message | For log events the message field contains the log message, optimized for viewing in a log viewer. For structured logs without an original message field, other fields can be concatenated to form a human-readable summary of the event. If multiple messages exist, they can be combined into one message. | text | +| process.pid | Process id. | long | +| process.thread.id | Thread ID. | long | +| source.address | Some event source addresses are defined ambiguously. The event will sometimes list an IP, a domain or a unix socket. You should always store the raw address in the `.address` field. Then it should be duplicated to `.ip` or `.domain`, depending on which one it is. | keyword | +| source.geo.city_name | City name. | keyword | +| source.geo.continent_name | Name of the continent. | keyword | +| source.geo.country_iso_code | Country ISO code. | keyword | +| source.geo.location | Longitude and latitude. | geo_point | +| source.geo.region_iso_code | Region ISO code. | keyword | +| source.geo.region_name | Region name. | keyword | +| url.original | Unmodified original url as seen in the event source. Note that in network monitoring, the observed URL may be a full URL, whereas in access logs, the URL is often just represented as a path. This field is meant to represent the URL as it was observed, complete or not. | keyword | +| user.name | Short name or login of the user. | keyword | +| user_agent.device.name | Name of the device. | keyword | +| user_agent.name | Name of the user agent. | keyword | +| user_agent.original | Unparsed user_agent string. | keyword | +| user_agent.os.name | Operating system name, without the version. | keyword | + + +## Metrics + +### Status Metrics + +The server status stream collects data from the Apache Status module. It scrapes the status data from the web page +generated by the `mod_status` module. + +An example event for `status` looks as following: + +```$json +{ + "@metadata": { + "beat": "metricbeat", + "raw_index": "metrics-apache.status-default", + "type": "_doc", + "version": "8.0.0" + }, + "@timestamp": "2020-06-24T10:19:48.005Z", + "agent": { + "ephemeral_id": "685f03e4-76e7-4d05-b398-8454b8964681", + "id": "a74466da-3ea4-44f9-aea0-11c5e4b920be", + "name": "MacBook-Elastic.local", + "type": "metricbeat", + "version": "8.0.0" + }, + "apache": { + "status": { + "bytes_per_request": 94.0933, + "bytes_per_sec": 83.6986, + "connections": { + "async": { + "closing": 0, + "keep_alive": 0, + "writing": 0 + }, + "total": 0 + }, + "cpu": { + "children_system": 0, + "children_user": 0, + "load": 0.185185, + "system": 1.79, + "user": 1.11 + }, + "hostname": "127.0.0.1:8088", + "load": { + "1": 3.58, + "15": 2.79, + "5": 3.54 + }, + "requests_per_sec": 0.889527, + "scoreboard": { + "closing_connection": 0, + "dns_lookup": 0, + "gracefully_finishing": 0, + "idle_cleanup": 0, + "keepalive": 0, + "logging": 0, + "open_slot": 325, + "reading_request": 0, + "sending_reply": 1, + "starting_up": 0, + "total": 400, + "waiting_for_connection": 74 + }, + "total_accesses": 1393, + "total_kbytes": 128, + "uptime": { + "server_uptime": 1566, + "uptime": 1566 + }, + "workers": { + "busy": 1, + "idle": 74 + } + } + }, + "dataset": { + "name": "apache.status", + "namespace": "default", + "type": "metrics" + }, + "ecs": { + "version": "1.5.0" + }, + "event": { + "dataset": "apache.status", + "duration": 2381832, + "module": "apache" + }, + "metricset": { + "name": "status", + "period": 10000 + }, + "service": { + "address": "127.0.0.1:8088", + "type": "apache" + }, + "stream": { + "dataset": "apache.status", + "namespace": "default", + "type": "metrics" + } +} +``` + +**Exported fields** + +| Field | Description | Type | +|---|---|---| +| @timestamp | Event timestamp. | date | +| apache.status.bytes_per_request | Bytes per request. | scaled_float | +| apache.status.bytes_per_sec | Bytes per second. | scaled_float | +| apache.status.connections.async.closing | Async closed connections. | long | +| apache.status.connections.async.keep_alive | Async keeped alive connections. | long | +| apache.status.connections.async.writing | Async connection writing. | long | +| apache.status.connections.total | Total connections. | long | +| apache.status.cpu.children_system | CPU of children system. | scaled_float | +| apache.status.cpu.children_user | CPU of children user. | scaled_float | +| apache.status.cpu.load | CPU Load. | scaled_float | +| apache.status.cpu.system | System cpu. | scaled_float | +| apache.status.cpu.user | CPU user load. | scaled_float | +| apache.status.hostname | Apache hostname. | keyword | +| apache.status.load.1 | Load average for the last minute. | scaled_float | +| apache.status.load.15 | Load average for the last 15 minutes. | scaled_float | +| apache.status.load.5 | Load average for the last 5 minutes. | scaled_float | +| apache.status.requests_per_sec | Requests per second. | scaled_float | +| apache.status.scoreboard.closing_connection | Closing connections. | long | +| apache.status.scoreboard.dns_lookup | Dns Lookups. | long | +| apache.status.scoreboard.gracefully_finishing | Gracefully finishing. | long | +| apache.status.scoreboard.idle_cleanup | Idle cleanups. | long | +| apache.status.scoreboard.keepalive | Keep alive. | long | +| apache.status.scoreboard.logging | Logging | long | +| apache.status.scoreboard.open_slot | Open slots. | long | +| apache.status.scoreboard.reading_request | Reading requests. | long | +| apache.status.scoreboard.sending_reply | Sending Reply. | long | +| apache.status.scoreboard.starting_up | Starting up. | long | +| apache.status.scoreboard.total | Total. | long | +| apache.status.scoreboard.waiting_for_connection | Waiting for connections. | long | +| apache.status.total_accesses | Total number of access requests. | long | +| apache.status.total_kbytes | Total number of kilobytes served. | long | +| apache.status.uptime.server_uptime | Server uptime in seconds. | long | +| apache.status.uptime.uptime | Server uptime. | long | +| apache.status.workers.busy | Number of busy workers. | long | +| apache.status.workers.idle | Number of idle workers. | long | +| data_stream.dataset | Data stream dataset. | constant_keyword | +| data_stream.namespace | Data stream namespace. | constant_keyword | +| data_stream.type | Data stream type. | constant_keyword | + diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/img/apache_httpd_server_status.png b/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/img/apache_httpd_server_status.png new file mode 100644 index 0000000000000..b28bbecb34c46 Binary files /dev/null and b/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/img/apache_httpd_server_status.png differ diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/img/kibana-apache.png b/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/img/kibana-apache.png new file mode 100644 index 0000000000000..badfee933a5ea Binary files /dev/null and b/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/img/kibana-apache.png differ diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/img/logo_apache.svg b/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/img/logo_apache.svg new file mode 100644 index 0000000000000..384761f64108a --- /dev/null +++ b/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/img/logo_apache.svg @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/dashboard/apache-Logs-Apache-Dashboard-ecs.json b/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/dashboard/apache-Logs-Apache-Dashboard-ecs.json new file mode 100644 index 0000000000000..61339d46447e3 --- /dev/null +++ b/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/dashboard/apache-Logs-Apache-Dashboard-ecs.json @@ -0,0 +1,56 @@ +{ + "attributes": { + "description": "Logs Apache integration dashboard", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[],\"highlightAll\":true,\"query\":{\"language\":\"kuery\",\"query\":\"\"},\"version\":true}" + }, + "optionsJSON": "{\"darkTheme\":false}", + "panelsJSON": "[{\"embeddableConfig\":{\"mapBounds\":{\"bottom_right\":{\"lat\":-3.864254615721396,\"lon\":205.3125},\"top_left\":{\"lat\":67.7427590666639,\"lon\":-205.6640625}},\"mapCenter\":[40.713955826286046,-0.17578125],\"mapCollar\":{\"bottom_right\":{\"lat\":-39.667755,\"lon\":180},\"top_left\":{\"lat\":90,\"lon\":-180},\"zoom\":2},\"mapZoom\":2},\"gridData\":{\"h\":12,\"i\":\"1\",\"w\":48,\"x\":0,\"y\":0},\"panelIndex\":\"1\",\"panelRefName\":\"panel_0\",\"version\":\"7.3.0\"},{\"embeddableConfig\":{},\"gridData\":{\"h\":12,\"i\":\"2\",\"w\":32,\"x\":0,\"y\":20},\"panelIndex\":\"2\",\"panelRefName\":\"panel_1\",\"version\":\"7.3.0\"},{\"embeddableConfig\":{},\"gridData\":{\"h\":12,\"i\":\"3\",\"w\":16,\"x\":32,\"y\":20},\"panelIndex\":\"3\",\"panelRefName\":\"panel_2\",\"version\":\"7.3.0\"},{\"embeddableConfig\":{},\"gridData\":{\"h\":8,\"i\":\"4\",\"w\":8,\"x\":40,\"y\":12},\"panelIndex\":\"4\",\"panelRefName\":\"panel_3\",\"version\":\"7.3.0\"},{\"embeddableConfig\":{},\"gridData\":{\"h\":8,\"i\":\"5\",\"w\":48,\"x\":0,\"y\":32},\"panelIndex\":\"5\",\"panelRefName\":\"panel_4\",\"version\":\"7.3.0\"},{\"embeddableConfig\":{},\"gridData\":{\"h\":8,\"i\":\"6\",\"w\":40,\"x\":0,\"y\":12},\"panelIndex\":\"6\",\"panelRefName\":\"panel_5\",\"version\":\"7.3.0\"},{\"embeddableConfig\":{\"columns\":[\"source.address\",\"log.level\",\"apache2.error.integration\",\"message\"],\"sort\":[\"@timestamp\",\"desc\"]},\"gridData\":{\"h\":12,\"i\":\"7\",\"w\":48,\"x\":0,\"y\":40},\"panelIndex\":\"7\",\"panelRefName\":\"panel_6\",\"version\":\"7.3.0\"}]", + "timeRestore": false, + "title": "[Logs Apache] Access and error logs ECS", + "version": 1 + }, + "id": "apache-Logs-Apache-Dashboard-ecs", + "migrationVersion": { + "dashboard": "7.3.0" + }, + "references": [ + { + "id": "Apache-access-unique-IPs-map-ecs", + "name": "panel_0", + "type": "visualization" + }, + { + "id": "Apache-response-codes-of-top-URLs-ecs", + "name": "panel_1", + "type": "visualization" + }, + { + "id": "Apache-browsers-ecs", + "name": "panel_2", + "type": "visualization" + }, + { + "id": "Apache-operating-systems-ecs", + "name": "panel_3", + "type": "visualization" + }, + { + "id": "Apache-error-logs-over-time-ecs", + "name": "panel_4", + "type": "visualization" + }, + { + "id": "Apache-response-codes-over-time-ecs", + "name": "panel_5", + "type": "visualization" + }, + { + "id": "Apache-errors-log-ecs", + "name": "panel_6", + "type": "search" + } + ], + "type": "dashboard" +} \ No newline at end of file diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/dashboard/apache-Metrics-Apache-HTTPD-server-status-ecs.json b/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/dashboard/apache-Metrics-Apache-HTTPD-server-status-ecs.json new file mode 100644 index 0000000000000..92c4a5b3ee391 --- /dev/null +++ b/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/dashboard/apache-Metrics-Apache-HTTPD-server-status-ecs.json @@ -0,0 +1,56 @@ +{ + "attributes": { + "description": "Overview of Apache server status", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[],\"highlightAll\":true,\"query\":{\"language\":\"kuery\",\"query\":\"\"},\"version\":true}" + }, + "optionsJSON": "{\"darkTheme\":false}", + "panelsJSON": "[{\"embeddableConfig\":{},\"gridData\":{\"h\":12,\"i\":\"1\",\"w\":24,\"x\":24,\"y\":36},\"panelIndex\":\"1\",\"panelRefName\":\"panel_0\",\"version\":\"7.3.0\"},{\"embeddableConfig\":{\"vis\":{\"params\":{\"sort\":{\"columnIndex\":null,\"direction\":null}}}},\"gridData\":{\"h\":12,\"i\":\"2\",\"w\":12,\"x\":0,\"y\":0},\"panelIndex\":\"2\",\"panelRefName\":\"panel_1\",\"version\":\"7.3.0\"},{\"embeddableConfig\":{},\"gridData\":{\"h\":12,\"i\":\"3\",\"w\":24,\"x\":0,\"y\":36},\"panelIndex\":\"3\",\"panelRefName\":\"panel_2\",\"version\":\"7.3.0\"},{\"embeddableConfig\":{},\"gridData\":{\"h\":12,\"i\":\"4\",\"w\":48,\"x\":0,\"y\":24},\"panelIndex\":\"4\",\"panelRefName\":\"panel_3\",\"version\":\"7.3.0\"},{\"embeddableConfig\":{\"vis\":{\"defaultColors\":{\"0 - 100\":\"rgb(0,104,55)\"}}},\"gridData\":{\"h\":12,\"i\":\"5\",\"w\":24,\"x\":24,\"y\":0},\"panelIndex\":\"5\",\"panelRefName\":\"panel_4\",\"version\":\"7.3.0\"},{\"embeddableConfig\":{\"vis\":{\"defaultColors\":{\"0 - 100\":\"rgb(0,104,55)\"}}},\"gridData\":{\"h\":12,\"i\":\"6\",\"w\":12,\"x\":12,\"y\":0},\"panelIndex\":\"6\",\"panelRefName\":\"panel_5\",\"version\":\"7.3.0\"},{\"embeddableConfig\":{},\"gridData\":{\"h\":12,\"i\":\"7\",\"w\":48,\"x\":0,\"y\":12},\"panelIndex\":\"7\",\"panelRefName\":\"panel_6\",\"version\":\"7.3.0\"}]", + "timeRestore": false, + "title": "[Metrics Apache] Overview ECS", + "version": 1 + }, + "id": "apache-Metrics-Apache-HTTPD-server-status-ecs", + "migrationVersion": { + "dashboard": "7.3.0" + }, + "references": [ + { + "id": "Apache-HTTPD-CPU-ecs", + "name": "panel_0", + "type": "visualization" + }, + { + "id": "Apache-HTTPD-Hostname-list-ecs", + "name": "panel_1", + "type": "visualization" + }, + { + "id": "Apache-HTTPD-Load1-slash-5-slash-15-ecs", + "name": "panel_2", + "type": "visualization" + }, + { + "id": "Apache-HTTPD-Scoreboard-ecs", + "name": "panel_3", + "type": "visualization" + }, + { + "id": "Apache-HTTPD-Total-accesses-and-kbytes-ecs", + "name": "panel_4", + "type": "visualization" + }, + { + "id": "Apache-HTTPD-Uptime-ecs", + "name": "panel_5", + "type": "visualization" + }, + { + "id": "Apache-HTTPD-Workers-ecs", + "name": "panel_6", + "type": "visualization" + } + ], + "type": "dashboard" +} \ No newline at end of file diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/search/Apache-HTTPD-ecs.json b/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/search/Apache-HTTPD-ecs.json new file mode 100644 index 0000000000000..649a2669e6bd6 --- /dev/null +++ b/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/search/Apache-HTTPD-ecs.json @@ -0,0 +1,32 @@ +{ + "attributes": { + "columns": [ + "_source" + ], + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[],\"highlight\":{\"fields\":{\"*\":{}},\"fragment_size\":2147483647,\"post_tags\":[\"@/kibana-highlighted-field@\"],\"pre_tags\":[\"@kibana-highlighted-field@\"],\"require_field_match\":false},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\",\"query\":{\"language\":\"kuery\",\"query\":\"(data_stream.dataset:apache.status)\"}}" + }, + "sort": [ + [ + "@timestamp", + "desc" + ] + ], + "title": "Apache HTTPD ECS", + "version": 1 + }, + "id": "Apache-HTTPD-ecs", + "migrationVersion": { + "search": "7.4.0" + }, + "references": [ + { + "id": "metrics-*", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "type": "search" +} \ No newline at end of file diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/search/Apache-access-logs-ecs.json b/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/search/Apache-access-logs-ecs.json new file mode 100644 index 0000000000000..d91a350de171e --- /dev/null +++ b/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/search/Apache-access-logs-ecs.json @@ -0,0 +1,35 @@ +{ + "attributes": { + "columns": [ + "source.address", + "http.request.method", + "url.original", + "http.response.status_code" + ], + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[],\"highlight\":{\"fields\":{\"*\":{}},\"fragment_size\":2147483647,\"post_tags\":[\"@/kibana-highlighted-field@\"],\"pre_tags\":[\"@kibana-highlighted-field@\"],\"require_field_match\":false},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\",\"query\":{\"language\":\"kuery\",\"query\":\"data_stream.dataset:apache.access\"}}" + }, + "sort": [ + [ + "@timestamp", + "desc" + ] + ], + "title": "Apache access logs [Logs Apache] ECS", + "version": 1 + }, + "id": "Apache-access-logs-ecs", + "migrationVersion": { + "search": "7.4.0" + }, + "references": [ + { + "id": "logs-*", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "type": "search" +} \ No newline at end of file diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/search/Apache-errors-log-ecs.json b/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/search/Apache-errors-log-ecs.json new file mode 100644 index 0000000000000..a7244db0b8e93 --- /dev/null +++ b/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/search/Apache-errors-log-ecs.json @@ -0,0 +1,35 @@ +{ + "attributes": { + "columns": [ + "source.address", + "log.level", + "apache2.error.integration", + "message" + ], + "description": "", + "hits": 0, + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[],\"highlight\":{\"fields\":{\"*\":{}},\"fragment_size\":2147483647,\"post_tags\":[\"@/kibana-highlighted-field@\"],\"pre_tags\":[\"@kibana-highlighted-field@\"],\"require_field_match\":false},\"indexRefName\":\"kibanaSavedObjectMeta.searchSourceJSON.index\",\"query\":{\"language\":\"kuery\",\"query\":\"data_stream.dataset:apache.error\"}}" + }, + "sort": [ + [ + "@timestamp", + "desc" + ] + ], + "title": "Apache errors log [Logs Apache] ECS", + "version": 1 + }, + "id": "Apache-errors-log-ecs", + "migrationVersion": { + "search": "7.4.0" + }, + "references": [ + { + "id": "logs-*", + "name": "kibanaSavedObjectMeta.searchSourceJSON.index", + "type": "index-pattern" + } + ], + "type": "search" +} \ No newline at end of file diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-HTTPD-CPU-ecs.json b/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-HTTPD-CPU-ecs.json new file mode 100644 index 0000000000000..7200bffec0d0d --- /dev/null +++ b/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-HTTPD-CPU-ecs.json @@ -0,0 +1,25 @@ +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[]}" + }, + "savedSearchRefName": "search_0", + "title": "CPU usage [Metrics Apache] ECS", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"aggs\":[{\"id\":\"1\",\"params\":{\"customLabel\":\"CPU load\",\"field\":\"apache.status.cpu.load\"},\"schema\":\"metric\",\"type\":\"avg\"},{\"id\":\"2\",\"params\":{\"extended_bounds\":{},\"field\":\"@timestamp\",\"interval\":\"auto\",\"min_doc_count\":1},\"schema\":\"segment\",\"type\":\"date_histogram\"},{\"id\":\"3\",\"params\":{\"field\":\"apache.status.hostname\",\"order\":\"desc\",\"orderBy\":\"1\",\"size\":5},\"schema\":\"split\",\"type\":\"terms\"},{\"id\":\"4\",\"params\":{\"customLabel\":\"CPU user\",\"field\":\"apache.status.cpu.user\"},\"schema\":\"metric\",\"type\":\"avg\"},{\"id\":\"5\",\"params\":{\"customLabel\":\"CPU system\",\"field\":\"apache.status.cpu.system\"},\"schema\":\"metric\",\"type\":\"avg\"},{\"id\":\"6\",\"params\":{\"customLabel\":\"CPU children user\",\"field\":\"apache.status.cpu.children_user\"},\"schema\":\"metric\",\"type\":\"avg\"},{\"id\":\"7\",\"params\":{\"customLabel\":\"CPU children system\",\"field\":\"apache.status.cpu.children_system\"},\"schema\":\"metric\",\"type\":\"avg\"}],\"listeners\":{},\"params\":{\"addLegend\":true,\"addTimeMarker\":false,\"addTooltip\":true,\"defaultYExtents\":false,\"drawLinesBetweenPoints\":true,\"interpolate\":\"linear\",\"radiusRatio\":9,\"row\":true,\"scale\":\"linear\",\"setYExtents\":false,\"shareYAxis\":true,\"showCircles\":true,\"smoothLines\":false,\"times\":[],\"yAxis\":{}},\"title\":\"Apache HTTPD - CPU ECS\",\"type\":\"line\"}" + }, + "id": "Apache-HTTPD-CPU-ecs", + "migrationVersion": { + "visualization": "7.8.0" + }, + "references": [ + { + "id": "Apache-HTTPD-ecs", + "name": "search_0", + "type": "search" + } + ], + "type": "visualization" +} \ No newline at end of file diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-HTTPD-Hostname-list-ecs.json b/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-HTTPD-Hostname-list-ecs.json new file mode 100644 index 0000000000000..6cba780a2a121 --- /dev/null +++ b/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-HTTPD-Hostname-list-ecs.json @@ -0,0 +1,25 @@ +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[]}" + }, + "savedSearchRefName": "search_0", + "title": "Hostname list [Metrics Apache] ECS", + "uiStateJSON": "{\"vis\":{\"params\":{\"sort\":{\"columnIndex\":null,\"direction\":null}}}}", + "version": 1, + "visState": "{\"aggs\":[{\"id\":\"1\",\"params\":{\"customLabel\":\"Events count\"},\"schema\":\"metric\",\"type\":\"count\"},{\"id\":\"2\",\"params\":{\"customLabel\":\"Apache HTTD Hostname\",\"field\":\"apache.status.hostname\",\"order\":\"desc\",\"orderBy\":\"1\",\"size\":5},\"schema\":\"bucket\",\"type\":\"terms\"}],\"listeners\":{},\"params\":{\"perPage\":10,\"showMeticsAtAllLevels\":false,\"showPartialRows\":false,\"sort\":{\"columnIndex\":null,\"direction\":null}},\"title\":\"Apache HTTPD - Hostname list ECS\",\"type\":\"table\"}" + }, + "id": "Apache-HTTPD-Hostname-list-ecs", + "migrationVersion": { + "visualization": "7.8.0" + }, + "references": [ + { + "id": "Apache-HTTPD-ecs", + "name": "search_0", + "type": "search" + } + ], + "type": "visualization" +} \ No newline at end of file diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-HTTPD-Load1-slash-5-slash-15-ecs.json b/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-HTTPD-Load1-slash-5-slash-15-ecs.json new file mode 100644 index 0000000000000..1e6878e6c5cb1 --- /dev/null +++ b/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-HTTPD-Load1-slash-5-slash-15-ecs.json @@ -0,0 +1,25 @@ +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[]}" + }, + "savedSearchRefName": "search_0", + "title": "Load1/5/15 [Metrics Apache] ECS", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"aggs\":[{\"id\":\"1\",\"params\":{\"customLabel\":\"Load 5\",\"field\":\"apache.status.load.5\"},\"schema\":\"metric\",\"type\":\"avg\"},{\"id\":\"2\",\"params\":{\"extended_bounds\":{},\"field\":\"@timestamp\",\"interval\":\"auto\",\"min_doc_count\":1},\"schema\":\"segment\",\"type\":\"date_histogram\"},{\"id\":\"3\",\"params\":{\"customLabel\":\"Load 1\",\"field\":\"apache.status.load.1\"},\"schema\":\"metric\",\"type\":\"avg\"},{\"id\":\"4\",\"params\":{\"customLabel\":\"Load 15\",\"field\":\"apache.status.load.15\"},\"schema\":\"metric\",\"type\":\"avg\"},{\"id\":\"5\",\"params\":{\"customLabel\":\"Hostname\",\"field\":\"apache.status.hostname\",\"order\":\"desc\",\"orderBy\":\"1\",\"size\":5},\"schema\":\"split\",\"type\":\"terms\"}],\"listeners\":{},\"params\":{\"addLegend\":true,\"addTimeMarker\":false,\"addTooltip\":true,\"defaultYExtents\":false,\"drawLinesBetweenPoints\":true,\"interpolate\":\"linear\",\"radiusRatio\":9,\"row\":true,\"scale\":\"linear\",\"setYExtents\":false,\"shareYAxis\":true,\"showCircles\":true,\"smoothLines\":false,\"times\":[],\"yAxis\":{}},\"title\":\"Apache HTTPD - Load1/5/15 ECS\",\"type\":\"line\"}" + }, + "id": "Apache-HTTPD-Load1-slash-5-slash-15-ecs", + "migrationVersion": { + "visualization": "7.8.0" + }, + "references": [ + { + "id": "Apache-HTTPD-ecs", + "name": "search_0", + "type": "search" + } + ], + "type": "visualization" +} \ No newline at end of file diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-HTTPD-Scoreboard-ecs.json b/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-HTTPD-Scoreboard-ecs.json new file mode 100644 index 0000000000000..990e2610a6755 --- /dev/null +++ b/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-HTTPD-Scoreboard-ecs.json @@ -0,0 +1,25 @@ +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[]}" + }, + "savedSearchRefName": "search_0", + "title": "Scoreboard [Metrics Apache] ECS", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"aggs\":[{\"id\":\"1\",\"params\":{\"customLabel\":\"Closing connection\",\"field\":\"apache.status.scoreboard.closing_connection\"},\"schema\":\"metric\",\"type\":\"avg\"},{\"id\":\"2\",\"params\":{\"extended_bounds\":{},\"field\":\"@timestamp\",\"interval\":\"auto\",\"min_doc_count\":1},\"schema\":\"segment\",\"type\":\"date_histogram\"},{\"id\":\"3\",\"params\":{\"customLabel\":\"Hostname\",\"field\":\"apache.status.hostname\",\"order\":\"desc\",\"orderBy\":\"1\",\"size\":5},\"schema\":\"split\",\"type\":\"terms\"},{\"id\":\"4\",\"params\":{\"customLabel\":\"DNS lookup\",\"field\":\"apache.status.scoreboard.dns_lookup\"},\"schema\":\"metric\",\"type\":\"avg\"},{\"id\":\"5\",\"params\":{\"customLabel\":\"Gracefully finishing\",\"field\":\"apache.status.scoreboard.gracefully_finishing\"},\"schema\":\"metric\",\"type\":\"avg\"},{\"id\":\"6\",\"params\":{\"customLabel\":\"Idle cleanup\",\"field\":\"apache.status.scoreboard.idle_cleanup\"},\"schema\":\"metric\",\"type\":\"avg\"},{\"id\":\"7\",\"params\":{\"customLabel\":\"Keepalive\",\"field\":\"apache.status.scoreboard.keepalive\"},\"schema\":\"metric\",\"type\":\"avg\"},{\"id\":\"8\",\"params\":{\"customLabel\":\"Logging\",\"field\":\"apache.status.scoreboard.logging\"},\"schema\":\"metric\",\"type\":\"avg\"},{\"id\":\"9\",\"params\":{\"customLabel\":\"Open slot\",\"field\":\"apache.status.scoreboard.open_slot\"},\"schema\":\"metric\",\"type\":\"avg\"},{\"id\":\"10\",\"params\":{\"customLabel\":\"Reading request\",\"field\":\"apache.status.scoreboard.reading_request\"},\"schema\":\"metric\",\"type\":\"avg\"},{\"id\":\"11\",\"params\":{\"customLabel\":\"Sending reply\",\"field\":\"apache.status.scoreboard.sending_reply\"},\"schema\":\"metric\",\"type\":\"avg\"},{\"id\":\"12\",\"params\":{\"customLabel\":\"Starting up\",\"field\":\"apache.status.scoreboard.starting_up\"},\"schema\":\"metric\",\"type\":\"avg\"},{\"id\":\"13\",\"params\":{\"customLabel\":\"Total\",\"field\":\"apache.status.scoreboard.total\"},\"schema\":\"metric\",\"type\":\"avg\"},{\"id\":\"14\",\"params\":{\"customLabel\":\"Waiting for connection\",\"field\":\"apache.status.scoreboard.waiting_for_connection\"},\"schema\":\"metric\",\"type\":\"avg\"}],\"listeners\":{},\"params\":{\"addLegend\":true,\"addTimeMarker\":false,\"addTooltip\":true,\"defaultYExtents\":false,\"drawLinesBetweenPoints\":true,\"interpolate\":\"linear\",\"radiusRatio\":9,\"row\":true,\"scale\":\"linear\",\"setYExtents\":false,\"shareYAxis\":true,\"showCircles\":true,\"smoothLines\":false,\"times\":[],\"yAxis\":{}},\"title\":\"Apache HTTPD - Scoreboard ECS\",\"type\":\"line\"}" + }, + "id": "Apache-HTTPD-Scoreboard-ecs", + "migrationVersion": { + "visualization": "7.8.0" + }, + "references": [ + { + "id": "Apache-HTTPD-ecs", + "name": "search_0", + "type": "search" + } + ], + "type": "visualization" +} \ No newline at end of file diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-HTTPD-Total-accesses-and-kbytes-ecs.json b/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-HTTPD-Total-accesses-and-kbytes-ecs.json new file mode 100644 index 0000000000000..ad305d971b575 --- /dev/null +++ b/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-HTTPD-Total-accesses-and-kbytes-ecs.json @@ -0,0 +1,25 @@ +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[]}" + }, + "savedSearchRefName": "search_0", + "title": "Total accesses and kbytes [Metrics Apache] ECS", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"aggs\":[{\"id\":\"1\",\"params\":{\"customLabel\":\"Total kbytes\",\"field\":\"apache.status.total_kbytes\"},\"schema\":\"metric\",\"type\":\"max\"},{\"id\":\"2\",\"params\":{\"customLabel\":\"Total accesses\",\"field\":\"apache.status.total_accesses\"},\"schema\":\"metric\",\"type\":\"max\"}],\"listeners\":{},\"params\":{\"fontSize\":60,\"handleNoResults\":true},\"title\":\"Apache HTTPD - Total accesses and kbytes ECS\",\"type\":\"metric\"}" + }, + "id": "Apache-HTTPD-Total-accesses-and-kbytes-ecs", + "migrationVersion": { + "visualization": "7.8.0" + }, + "references": [ + { + "id": "Apache-HTTPD-ecs", + "name": "search_0", + "type": "search" + } + ], + "type": "visualization" +} \ No newline at end of file diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-HTTPD-Uptime-ecs.json b/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-HTTPD-Uptime-ecs.json new file mode 100644 index 0000000000000..734fdef3c040a --- /dev/null +++ b/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-HTTPD-Uptime-ecs.json @@ -0,0 +1,25 @@ +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[]}" + }, + "savedSearchRefName": "search_0", + "title": "Uptime [Metrics Apache] ECS", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"aggs\":[{\"id\":\"1\",\"params\":{\"customLabel\":\"Uptime\",\"field\":\"apache.status.uptime.uptime\"},\"schema\":\"metric\",\"type\":\"max\"},{\"id\":\"2\",\"params\":{\"customLabel\":\"Server uptime\",\"field\":\"apache.status.uptime.server_uptime\"},\"schema\":\"metric\",\"type\":\"max\"}],\"listeners\":{},\"params\":{\"fontSize\":60,\"handleNoResults\":true},\"title\":\"Apache HTTPD - Uptime ECS\",\"type\":\"metric\"}" + }, + "id": "Apache-HTTPD-Uptime-ecs", + "migrationVersion": { + "visualization": "7.8.0" + }, + "references": [ + { + "id": "Apache-HTTPD-ecs", + "name": "search_0", + "type": "search" + } + ], + "type": "visualization" +} \ No newline at end of file diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-HTTPD-Workers-ecs.json b/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-HTTPD-Workers-ecs.json new file mode 100644 index 0000000000000..15108d3dd95ce --- /dev/null +++ b/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-HTTPD-Workers-ecs.json @@ -0,0 +1,25 @@ +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[]}" + }, + "savedSearchRefName": "search_0", + "title": "Workers [Metrics Apache] ECS", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"aggs\":[{\"id\":\"1\",\"params\":{\"customLabel\":\"Busy workers\",\"field\":\"apache.status.workers.busy\"},\"schema\":\"metric\",\"type\":\"avg\"},{\"id\":\"2\",\"params\":{\"extended_bounds\":{},\"field\":\"@timestamp\",\"interval\":\"auto\",\"min_doc_count\":1},\"schema\":\"segment\",\"type\":\"date_histogram\"},{\"id\":\"3\",\"params\":{\"customLabel\":\"Hostname\",\"field\":\"apache.status.hostname\",\"order\":\"desc\",\"orderBy\":\"1\",\"size\":5},\"schema\":\"split\",\"type\":\"terms\"},{\"id\":\"4\",\"params\":{\"customLabel\":\"Idle workers\",\"field\":\"apache.status.workers.idle\"},\"schema\":\"metric\",\"type\":\"avg\"}],\"listeners\":{},\"params\":{\"addLegend\":true,\"addTimeMarker\":false,\"addTooltip\":true,\"defaultYExtents\":false,\"drawLinesBetweenPoints\":true,\"interpolate\":\"linear\",\"radiusRatio\":9,\"row\":true,\"scale\":\"linear\",\"setYExtents\":false,\"shareYAxis\":true,\"showCircles\":true,\"smoothLines\":false,\"times\":[],\"yAxis\":{}},\"title\":\"Apache HTTPD - Workers ECS\",\"type\":\"line\"}" + }, + "id": "Apache-HTTPD-Workers-ecs", + "migrationVersion": { + "visualization": "7.8.0" + }, + "references": [ + { + "id": "Apache-HTTPD-ecs", + "name": "search_0", + "type": "search" + } + ], + "type": "visualization" +} \ No newline at end of file diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-access-unique-IPs-map-ecs.json b/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-access-unique-IPs-map-ecs.json new file mode 100644 index 0000000000000..c14348f6fedce --- /dev/null +++ b/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-access-unique-IPs-map-ecs.json @@ -0,0 +1,25 @@ +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[]}" + }, + "savedSearchRefName": "search_0", + "title": "Unique IPs map [Logs Apache] ECS", + "uiStateJSON": "{\"mapCenter\":[14.944784875088372,5.09765625]}", + "version": 1, + "visState": "{\"aggs\":[{\"enabled\":true,\"id\":\"1\",\"params\":{\"field\":\"source.address\"},\"schema\":\"metric\",\"type\":\"cardinality\"},{\"enabled\":true,\"id\":\"2\",\"params\":{\"autoPrecision\":true,\"field\":\"source.geo.location\"},\"schema\":\"segment\",\"type\":\"geohash_grid\"}],\"listeners\":{},\"params\":{\"addTooltip\":true,\"heatBlur\":15,\"heatMaxZoom\":16,\"heatMinOpacity\":0.1,\"heatNormalizeData\":true,\"heatRadius\":25,\"isDesaturated\":true,\"legendPosition\":\"bottomright\",\"mapCenter\":[15,5],\"mapType\":\"Scaled Circle Markers\",\"mapZoom\":2,\"wms\":{\"enabled\":false,\"options\":{\"attribution\":\"Maps provided by USGS\",\"format\":\"image/png\",\"layers\":\"0\",\"styles\":\"\",\"transparent\":true,\"version\":\"1.3.0\"},\"url\":\"https://basemap.nationalmap.gov/arcgis/services/USGSTopo/MapServer/WMSServer\"}},\"title\":\"Apache access unique IPs map ECS\",\"type\":\"tile_map\"}" + }, + "id": "Apache-access-unique-IPs-map-ecs", + "migrationVersion": { + "visualization": "7.8.0" + }, + "references": [ + { + "id": "Apache-access-logs-ecs", + "name": "search_0", + "type": "search" + } + ], + "type": "visualization" +} \ No newline at end of file diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-browsers-ecs.json b/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-browsers-ecs.json new file mode 100644 index 0000000000000..75a9e7629a3c0 --- /dev/null +++ b/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-browsers-ecs.json @@ -0,0 +1,25 @@ +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[]}" + }, + "savedSearchRefName": "search_0", + "title": "Browsers breakdown [Logs Apache] ECS", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"aggs\":[{\"enabled\":true,\"id\":\"1\",\"params\":{\"field\":\"source.address\"},\"schema\":\"metric\",\"type\":\"cardinality\"},{\"enabled\":true,\"id\":\"2\",\"params\":{\"field\":\"user_agent.name\",\"order\":\"desc\",\"orderBy\":\"1\",\"size\":5},\"schema\":\"segment\",\"type\":\"terms\"},{\"enabled\":true,\"id\":\"3\",\"params\":{\"field\":\"user_agent.version\",\"order\":\"desc\",\"orderBy\":\"1\",\"size\":5},\"schema\":\"segment\",\"type\":\"terms\"}],\"listeners\":{},\"params\":{\"addLegend\":true,\"addTooltip\":true,\"isDonut\":true,\"legendPosition\":\"bottom\",\"shareYAxis\":true},\"title\":\"Apache browsers ECS\",\"type\":\"pie\"}" + }, + "id": "Apache-browsers-ecs", + "migrationVersion": { + "visualization": "7.8.0" + }, + "references": [ + { + "id": "Apache-access-logs-ecs", + "name": "search_0", + "type": "search" + } + ], + "type": "visualization" +} \ No newline at end of file diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-error-logs-over-time-ecs.json b/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-error-logs-over-time-ecs.json new file mode 100644 index 0000000000000..72a30c25079b5 --- /dev/null +++ b/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-error-logs-over-time-ecs.json @@ -0,0 +1,25 @@ +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[]}" + }, + "savedSearchRefName": "search_0", + "title": "Error logs over time [Logs Apache] ECS", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"aggs\":[{\"enabled\":true,\"id\":\"1\",\"params\":{},\"schema\":\"metric\",\"type\":\"count\"},{\"enabled\":true,\"id\":\"2\",\"params\":{\"extended_bounds\":{},\"field\":\"@timestamp\",\"interval\":\"auto\",\"min_doc_count\":1},\"schema\":\"segment\",\"type\":\"date_histogram\"},{\"enabled\":true,\"id\":\"3\",\"params\":{\"field\":\"log.level\",\"order\":\"desc\",\"orderBy\":\"1\",\"size\":5},\"schema\":\"group\",\"type\":\"terms\"}],\"listeners\":{},\"params\":{\"addLegend\":true,\"addTimeMarker\":false,\"addTooltip\":true,\"defaultYExtents\":false,\"legendPosition\":\"right\",\"mode\":\"stacked\",\"scale\":\"linear\",\"setYExtents\":false,\"shareYAxis\":true,\"times\":[],\"yAxis\":{}},\"title\":\"Apache error logs over time ECS\",\"type\":\"histogram\"}" + }, + "id": "Apache-error-logs-over-time-ecs", + "migrationVersion": { + "visualization": "7.8.0" + }, + "references": [ + { + "id": "Apache-errors-log-ecs", + "name": "search_0", + "type": "search" + } + ], + "type": "visualization" +} \ No newline at end of file diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-operating-systems-ecs.json b/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-operating-systems-ecs.json new file mode 100644 index 0000000000000..4c2e8ff803894 --- /dev/null +++ b/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-operating-systems-ecs.json @@ -0,0 +1,25 @@ +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[]}" + }, + "savedSearchRefName": "search_0", + "title": "Operating systems breakdown [Logs Apache] ECS", + "uiStateJSON": "{}", + "version": 1, + "visState": "{\"aggs\":[{\"enabled\":true,\"id\":\"1\",\"params\":{\"field\":\"source.address\"},\"schema\":\"metric\",\"type\":\"cardinality\"},{\"enabled\":true,\"id\":\"2\",\"params\":{\"field\":\"user_agent.os.name\",\"order\":\"desc\",\"orderBy\":\"1\",\"size\":5},\"schema\":\"segment\",\"type\":\"terms\"},{\"enabled\":true,\"id\":\"3\",\"params\":{\"field\":\"user_agent.os.version\",\"order\":\"desc\",\"orderBy\":\"1\",\"size\":5},\"schema\":\"segment\",\"type\":\"terms\"}],\"listeners\":{},\"params\":{\"addLegend\":true,\"addTooltip\":true,\"isDonut\":true,\"legendPosition\":\"bottom\",\"shareYAxis\":true},\"title\":\"Apache operating systems ECS\",\"type\":\"pie\"}" + }, + "id": "Apache-operating-systems-ecs", + "migrationVersion": { + "visualization": "7.8.0" + }, + "references": [ + { + "id": "Apache-access-logs-ecs", + "name": "search_0", + "type": "search" + } + ], + "type": "visualization" +} \ No newline at end of file diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-response-codes-of-top-URLs-ecs.json b/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-response-codes-of-top-URLs-ecs.json new file mode 100644 index 0000000000000..cc937358b547c --- /dev/null +++ b/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-response-codes-of-top-URLs-ecs.json @@ -0,0 +1,25 @@ +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[]}" + }, + "savedSearchRefName": "search_0", + "title": "Top URLs by response code [Logs Apache] ECS", + "uiStateJSON": "{\"vis\":{\"colors\":{\"200\":\"#7EB26D\",\"404\":\"#EF843C\"}}}", + "version": 1, + "visState": "{\"aggs\":[{\"enabled\":true,\"id\":\"1\",\"params\":{},\"schema\":\"metric\",\"type\":\"count\"},{\"enabled\":true,\"id\":\"3\",\"params\":{\"customLabel\":\"URL\",\"field\":\"url.original\",\"order\":\"desc\",\"orderBy\":\"1\",\"size\":5},\"schema\":\"split\",\"type\":\"terms\"},{\"enabled\":true,\"id\":\"2\",\"params\":{\"field\":\"http.response.status_code\",\"order\":\"desc\",\"orderBy\":\"1\",\"size\":5},\"schema\":\"segment\",\"type\":\"terms\"}],\"listeners\":{},\"params\":{\"addLegend\":true,\"addTooltip\":true,\"isDonut\":false,\"legendPosition\":\"right\",\"row\":false,\"shareYAxis\":true},\"title\":\"Apache response codes of top URLs ECS\",\"type\":\"pie\"}" + }, + "id": "Apache-response-codes-of-top-URLs-ecs", + "migrationVersion": { + "visualization": "7.8.0" + }, + "references": [ + { + "id": "Apache-access-logs-ecs", + "name": "search_0", + "type": "search" + } + ], + "type": "visualization" +} \ No newline at end of file diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-response-codes-over-time-ecs.json b/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-response-codes-over-time-ecs.json new file mode 100644 index 0000000000000..65e16c8633f6a --- /dev/null +++ b/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/kibana/visualization/Apache-response-codes-over-time-ecs.json @@ -0,0 +1,25 @@ +{ + "attributes": { + "description": "", + "kibanaSavedObjectMeta": { + "searchSourceJSON": "{\"filter\":[]}" + }, + "savedSearchRefName": "search_0", + "title": "Response codes over time [Logs Apache] ECS", + "uiStateJSON": "{\"vis\":{\"colors\":{\"200\":\"#629E51\",\"404\":\"#EF843C\"}}}", + "version": 1, + "visState": "{\"aggs\":[{\"enabled\":true,\"id\":\"1\",\"params\":{},\"schema\":\"metric\",\"type\":\"count\"},{\"enabled\":true,\"id\":\"2\",\"params\":{\"extended_bounds\":{},\"field\":\"@timestamp\",\"interval\":\"auto\",\"min_doc_count\":1},\"schema\":\"segment\",\"type\":\"date_histogram\"},{\"enabled\":true,\"id\":\"3\",\"params\":{\"field\":\"http.response.status_code\",\"order\":\"desc\",\"orderBy\":\"1\",\"size\":5},\"schema\":\"group\",\"type\":\"terms\"}],\"listeners\":{},\"params\":{\"addLegend\":true,\"addTimeMarker\":false,\"addTooltip\":true,\"defaultYExtents\":false,\"legendPosition\":\"right\",\"mode\":\"stacked\",\"scale\":\"linear\",\"setYExtents\":false,\"shareYAxis\":true,\"times\":[],\"yAxis\":{}},\"title\":\"Apache response codes over time ECS\",\"type\":\"histogram\"}" + }, + "id": "Apache-response-codes-over-time-ecs", + "migrationVersion": { + "visualization": "7.8.0" + }, + "references": [ + { + "id": "Apache-access-logs-ecs", + "name": "search_0", + "type": "search" + } + ], + "type": "visualization" +} \ No newline at end of file diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/manifest.yml b/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/manifest.yml new file mode 100644 index 0000000000000..9a98a9a907d20 --- /dev/null +++ b/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache-0.1.4/manifest.yml @@ -0,0 +1,48 @@ +format_version: 1.0.0 +name: apache +version: 0.1.4 +license: basic +description: Apache Integration +type: integration +categories: + - web +release: experimental +removable: true +conditions: + kibana.version: '^7.9.0' +screenshots: + - src: /img/kibana-apache.png + title: Apache Integration + size: 1215x1199 + type: image/png + - src: /img/apache_httpd_server_status.png + title: Apache HTTPD Server Status + size: 1919x1079 + type: image/png +icons: + - src: /img/logo_apache.svg + title: Apache Logo + size: 32x32 + type: image/svg+xml +config_templates: + - name: apache + title: Apache logs and metrics + description: Collect logs and metrics from Apache instances + inputs: + - type: logfile + title: Collect logs from Apache instances + description: Collecting Apache access and error logs + - type: apache/metrics + title: Collect metrics from Apache instances + description: Collecting Apache status metrics + vars: + - name: hosts + type: text + title: Hosts + multi: true + required: true + show_user: true + default: + - http://127.0.0.1 +owner: + github: elastic/integrations-services diff --git a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache_invalid_manifest_missing_field_0.1.4.zip b/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache_invalid_manifest_missing_field_0.1.4.zip index fa329e57ec44f..2796c0094ac1e 100644 Binary files a/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache_invalid_manifest_missing_field_0.1.4.zip and b/x-pack/test/fleet_api_integration/apis/fixtures/direct_upload_packages/apache_invalid_manifest_missing_field_0.1.4.zip differ