From 298d786fc67301f429c0fe619fa06787093a6751 Mon Sep 17 00:00:00 2001 From: Alex K <8418476+fearful-symmetry@users.noreply.github.com> Date: Tue, 19 Oct 2021 13:36:16 -0700 Subject: [PATCH] Get metricbeat to compile on AIX (#27954) * first pass at getting AIX to build * make notice * format libbeat files * fix newer pgsql lib quoting * fix build tags * try to move around docker stat files * add diskio targets * remove cloudfoundry from aix * forgot formatting, again * get filebeat to build * mage fmt * fix bad import * fix merge * changelog * fmt * fix filebeat * fix broken headers, again * see if list_docker is fixed * fix CI * go mod tidy --- CHANGELOG.next.asciidoc | 1 + NOTICE.txt | 227 +++++++++++++++++- filebeat/autodiscover/defaults.go | 3 + go.mod | 8 +- go.sum | 15 +- libbeat/autodiscover/providers/docker/doc.go | 18 ++ .../autodiscover/providers/kubernetes/doc.go | 18 ++ .../autodiscover/providers/kubernetes/node.go | 3 + .../autodiscover/providers/kubernetes/pod.go | 3 + .../providers/kubernetes/service.go | 3 + libbeat/metric/system/diskio/diskstat.go | 4 +- libbeat/metric/system/diskio/doc.go | 18 ++ .../statestore/backend/memlog/util_other.go | 4 +- metricbeat/module/docker/docker.go | 9 - metricbeat/module/docker/stat.go | 32 +++ metricbeat/module/linux/iostat/doc.go | 18 ++ metricbeat/module/linux/iostat/iostat.go | 3 + .../module/postgresql/postgresql_test.go | 18 +- metricbeat/module/system/service/data.go | 4 +- metricbeat/module/system/service/dbus.go | 4 +- metricbeat/module/system/service/service.go | 4 +- .../module/system/service/service_test.go | 4 +- .../composable/providers/kubernetes/config.go | 4 - .../kubernetesleaderelection/config.go | 4 - .../providers/kubernetessecrets/config.go | 4 - .../azureeventhub_integration_test.go | 4 +- x-pack/filebeat/input/azureeventhub/config.go | 3 + .../input/azureeventhub/config_test.go | 3 + x-pack/filebeat/input/azureeventhub/doc.go | 5 + x-pack/filebeat/input/azureeventhub/eph.go | 3 + .../filebeat/input/azureeventhub/eph_test.go | 3 + .../azureeventhub/file_persister_test.go | 3 + x-pack/filebeat/input/azureeventhub/input.go | 3 + .../input/azureeventhub/input_test.go | 3 + x-pack/filebeat/input/cloudfoundry/doc.go | 5 + x-pack/filebeat/input/cloudfoundry/input.go | 3 + x-pack/filebeat/input/cloudfoundry/v1.go | 3 + x-pack/filebeat/input/cloudfoundry/v2.go | 3 + .../filebeat/input/default-inputs/inputs.go | 15 -- .../input/default-inputs/inputs_aix.go | 25 ++ .../input/default-inputs/inputs_other.go | 30 +++ .../cloudfoundry/cache_integration_test.go | 4 +- .../add_cloudfoundry_metadata.go | 3 + .../add_cloudfoundry_metadata_test.go | 3 + .../add_cloudfoundry_metadata/doc.go | 5 + .../module/cloudfoundry/cloudfoundry.go | 3 + .../cloudfoundry/container/container.go | 3 + .../container/container_integration_test.go | 4 +- .../cloudfoundry/container/container_test.go | 4 +- .../module/cloudfoundry/container/doc.go | 5 + .../module/cloudfoundry/counter/counter.go | 3 + .../counter/counter_integration_test.go | 4 +- .../cloudfoundry/counter/counter_test.go | 4 +- .../module/cloudfoundry/counter/doc.go | 5 + x-pack/metricbeat/module/cloudfoundry/hub.go | 3 + .../module/cloudfoundry/mtest/config.go | 3 + .../module/cloudfoundry/mtest/modulemock.go | 3 + x-pack/metricbeat/module/cloudfoundry/v1.go | 3 + .../metricbeat/module/cloudfoundry/v1_test.go | 3 + x-pack/metricbeat/module/cloudfoundry/v2.go | 3 + .../module/cloudfoundry/value/doc.go | 5 + .../module/cloudfoundry/value/value.go | 3 + .../value/value_integration_test.go | 4 +- .../module/cloudfoundry/value/value_test.go | 4 +- 64 files changed, 535 insertions(+), 96 deletions(-) create mode 100644 libbeat/autodiscover/providers/docker/doc.go create mode 100644 libbeat/autodiscover/providers/kubernetes/doc.go create mode 100644 libbeat/metric/system/diskio/doc.go create mode 100644 metricbeat/module/docker/stat.go create mode 100644 metricbeat/module/linux/iostat/doc.go create mode 100644 x-pack/filebeat/input/azureeventhub/doc.go create mode 100644 x-pack/filebeat/input/cloudfoundry/doc.go create mode 100644 x-pack/filebeat/input/default-inputs/inputs_aix.go create mode 100644 x-pack/filebeat/input/default-inputs/inputs_other.go create mode 100644 x-pack/libbeat/processors/add_cloudfoundry_metadata/doc.go create mode 100644 x-pack/metricbeat/module/cloudfoundry/container/doc.go create mode 100644 x-pack/metricbeat/module/cloudfoundry/counter/doc.go create mode 100644 x-pack/metricbeat/module/cloudfoundry/value/doc.go diff --git a/CHANGELOG.next.asciidoc b/CHANGELOG.next.asciidoc index 34bad6a219e0..cf3d5d36c929 100644 --- a/CHANGELOG.next.asciidoc +++ b/CHANGELOG.next.asciidoc @@ -910,6 +910,7 @@ for a few releases. Please use other tools provided by Elastic to fetch data fro - Move openmetrics module to oss. {pull}26561[26561] - Add `gke` metricset collection to `gcp` module {pull}26824[26824] - Added a new beta `enterprisesearch` module for Elastic Enterprise Search {pull}27549[27549] +- Preliminary AIX support {pull}27954[27954] - Register additional name for `storage` metricset in the azure module. {pull}28447[28447] *Packetbeat* diff --git a/NOTICE.txt b/NOTICE.txt index ddc10b0209fb..433ebe4832de 100644 --- a/NOTICE.txt +++ b/NOTICE.txt @@ -7634,11 +7634,11 @@ Contents of probable licence file $GOMODCACHE/github.com/elastic/go-sysinfo@v1.7 -------------------------------------------------------------------------------- Dependency : github.com/elastic/go-txfile -Version: v0.0.7 +Version: v0.0.8 Licence type (autodetected): Apache-2.0 -------------------------------------------------------------------------------- -Contents of probable licence file $GOMODCACHE/github.com/elastic/go-txfile@v0.0.7/LICENSE: +Contents of probable licence file $GOMODCACHE/github.com/elastic/go-txfile@v0.0.8/LICENSE: Apache License Version 2.0, January 2004 @@ -9303,13 +9303,13 @@ END OF TERMS AND CONDITIONS -------------------------------------------------------------------------------- Dependency : github.com/gofrs/flock -Version: v0.7.2-0.20190320160742-5135e617513b +Version: v0.8.1 Licence type (autodetected): BSD-3-Clause -------------------------------------------------------------------------------- -Contents of probable licence file $GOMODCACHE/github.com/gofrs/flock@v0.7.2-0.20190320160742-5135e617513b/LICENSE: +Contents of probable licence file $GOMODCACHE/github.com/gofrs/flock@v0.8.1/LICENSE: -Copyright (c) 2015, Tim Heckman +Copyright (c) 2015-2020, Tim Heckman All rights reserved. Redistribution and use in source and binary forms, with or without @@ -9322,9 +9322,9 @@ modification, are permitted provided that the following conditions are met: this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -* Neither the name of linode-netint nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. +* Neither the name of gofrs nor the names of its contributors may be used + to endorse or promote products derived from this software without + specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE @@ -12401,11 +12401,11 @@ freely, subject to the following restrictions: -------------------------------------------------------------------------------- Dependency : github.com/lib/pq -Version: v1.1.2-0.20190507191818-2ff3cb3adc01 +Version: v1.10.3 Licence type (autodetected): MIT -------------------------------------------------------------------------------- -Contents of probable licence file $GOMODCACHE/github.com/lib/pq@v1.1.2-0.20190507191818-2ff3cb3adc01/LICENSE.md: +Contents of probable licence file $GOMODCACHE/github.com/lib/pq@v1.10.3/LICENSE.md: Copyright (c) 2011-2013, 'pq' Contributors Portions Copyright (C) 2011 Blake Mizerany @@ -33572,11 +33572,214 @@ Contents of probable licence file $GOMODCACHE/github.com/urso/go-bin@v0.0.0-2018 -------------------------------------------------------------------------------- Dependency : github.com/urso/magetools -Version: v0.0.0-20190919040553-290c89e0c230 +Version: v0.0.0-20200125210132-c2e338f92f3a Licence type (autodetected): Apache-2.0 -------------------------------------------------------------------------------- -No licence file provided. +Contents of probable licence file $GOMODCACHE/github.com/urso/magetools@v0.0.0-20200125210132-c2e338f92f3a/LICENSE: + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + -------------------------------------------------------------------------------- Dependency : github.com/urso/qcgen diff --git a/filebeat/autodiscover/defaults.go b/filebeat/autodiscover/defaults.go index 701241ba6253..606bf042dc4a 100644 --- a/filebeat/autodiscover/defaults.go +++ b/filebeat/autodiscover/defaults.go @@ -15,6 +15,9 @@ // specific language governing permissions and limitations // under the License. +//go:build !aix +// +build !aix + package autodiscover import ( diff --git a/go.mod b/go.mod index 7fadb08595e7..4cabf2326e83 100644 --- a/go.mod +++ b/go.mod @@ -71,7 +71,7 @@ require ( github.com/elastic/go-seccomp-bpf v1.2.0 github.com/elastic/go-structform v0.0.9 github.com/elastic/go-sysinfo v1.7.1 - github.com/elastic/go-txfile v0.0.7 + github.com/elastic/go-txfile v0.0.8 github.com/elastic/go-ucfg v0.8.3 github.com/elastic/go-windows v1.0.1 github.com/elastic/gosigar v0.14.1 @@ -85,7 +85,7 @@ require ( github.com/gocarina/gocsv v0.0.0-20170324095351-ffef3ffc77be github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e github.com/godror/godror v0.10.4 - github.com/gofrs/flock v0.7.2-0.20190320160742-5135e617513b + github.com/gofrs/flock v0.8.1 github.com/gofrs/uuid v3.3.0+incompatible github.com/gogo/protobuf v1.3.2 github.com/golang/mock v1.6.0 @@ -114,7 +114,7 @@ require ( github.com/jpillora/backoff v1.0.0 // indirect github.com/kardianos/service v1.2.1-0.20210728001519-a323c3813bc7 github.com/konsorten/go-windows-terminal-sequences v1.0.2 // indirect - github.com/lib/pq v1.1.2-0.20190507191818-2ff3cb3adc01 + github.com/lib/pq v1.10.3 github.com/magefile/mage v1.11.0 github.com/mailru/easyjson v0.7.1 // indirect github.com/mattn/go-colorable v0.1.6 @@ -151,6 +151,7 @@ require ( github.com/tsg/go-daemon v0.0.0-20200207173439-e704b93fd89b github.com/tsg/gopacket v0.0.0-20200626092518-2ab8e397a786 github.com/ugorji/go/codec v1.1.8 + github.com/urso/magetools v0.0.0-20200125210132-c2e338f92f3a // indirect github.com/urso/sderr v0.0.0-20210525210834-52b04e8f5c71 github.com/vmware/govmomi v0.0.0-20170802214208-2cad15190b41 github.com/xdg/scram v1.0.3 @@ -269,7 +270,6 @@ require ( github.com/stretchr/objx v0.2.0 // indirect github.com/urso/diag v0.0.0-20200210123136-21b3cc8eb797 // indirect github.com/urso/go-bin v0.0.0-20180220135811-781c575c9f0e // indirect - github.com/urso/magetools v0.0.0-20190919040553-290c89e0c230 // indirect github.com/xdg/stringprep v1.0.3 // indirect go.elastic.co/fastjson v1.1.0 // indirect go.opencensus.io v0.23.0 // indirect diff --git a/go.sum b/go.sum index e1afe5b80ca1..947b10faa0e8 100644 --- a/go.sum +++ b/go.sum @@ -306,10 +306,10 @@ github.com/elastic/go-seccomp-bpf v1.2.0/go.mod h1:l+89Vy5BzjVcaX8USZRMOwmwwDScE github.com/elastic/go-structform v0.0.9 h1:HpcS7xljL4kSyUfDJ8cXTJC6rU5ChL1wYb6cx3HLD+o= github.com/elastic/go-structform v0.0.9/go.mod h1:CZWf9aIRYY5SuKSmOhtXScE5uQiLZNqAFnwKR4OrIM4= github.com/elastic/go-sysinfo v1.1.1/go.mod h1:i1ZYdU10oLNfRzq4vq62BEwD2fH8KaWh6eh0ikPT9F0= +github.com/elastic/go-txfile v0.0.8 h1:hqFMmLM+UCDMJeSyuCWe8YwS+HtoX7F+cz5fhPYRTn4= +github.com/elastic/go-txfile v0.0.8/go.mod h1:H0nCoFae0a4ga57apgxFsgmRjevNCsEaT6g56JoeKAE= github.com/elastic/go-sysinfo v1.7.1 h1:Wx4DSARcKLllpKT2TnFVdSUJOsybqMYCNQZq1/wO+s0= github.com/elastic/go-sysinfo v1.7.1/go.mod h1:i1ZYdU10oLNfRzq4vq62BEwD2fH8KaWh6eh0ikPT9F0= -github.com/elastic/go-txfile v0.0.7 h1:Yn28gclW7X0Qy09nSMSsx0uOAvAGMsp6XHydbiLVe2s= -github.com/elastic/go-txfile v0.0.7/go.mod h1:H0nCoFae0a4ga57apgxFsgmRjevNCsEaT6g56JoeKAE= github.com/elastic/go-ucfg v0.7.0/go.mod h1:iaiY0NBIYeasNgycLyTvhJftQlQEUO2hpF+FX0JKxzo= github.com/elastic/go-ucfg v0.8.3 h1:leywnFjzr2QneZZWhE6uWd+QN/UpP0sdJRHYyuFvkeo= github.com/elastic/go-ucfg v0.8.3/go.mod h1:iaiY0NBIYeasNgycLyTvhJftQlQEUO2hpF+FX0JKxzo= @@ -382,8 +382,8 @@ github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5x github.com/godror/godror v0.10.4 h1:44FcfzDPp/PJZzen5Hm59SZQBhgrbR6E1KwCjg6gnJo= github.com/godror/godror v0.10.4/go.mod h1:9MVLtu25FBJBMHkPs0m3Ngf/VmwGcLpM2HS8PlNGw9U= github.com/gofrs/flock v0.7.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= -github.com/gofrs/flock v0.7.2-0.20190320160742-5135e617513b h1:3QNh5Xo2pmr2nZXENtnztfpjej8XY8EPmvYxF5SzY9M= -github.com/gofrs/flock v0.7.2-0.20190320160742-5135e617513b/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= +github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= +github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= github.com/gofrs/uuid v3.3.0+incompatible h1:8K4tyRfvU1CYPgJsveYFQMhpFd/wXNM7iK6rR7UHz84= github.com/gofrs/uuid v3.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= @@ -603,8 +603,8 @@ github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/lib/pq v1.1.2-0.20190507191818-2ff3cb3adc01 h1:EPw7R3OAyxHBCyl0oqh3lUZqS5lu3KSxzzGasE0opXQ= -github.com/lib/pq v1.1.2-0.20190507191818-2ff3cb3adc01/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/lib/pq v1.10.3 h1:v9QZf2Sn6AmjXtQeFpdoq/eaNtYP6IN+7lcrygsIAtg= +github.com/lib/pq v1.10.3/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/magefile/mage v1.9.0/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A= github.com/magefile/mage v1.11.0 h1:C/55Ywp9BpgVVclD3lRnSYCwXTYxmSppIgLeDYlNuls= github.com/magefile/mage v1.11.0/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A= @@ -817,8 +817,9 @@ github.com/urso/diag v0.0.0-20200210123136-21b3cc8eb797 h1:OHNw/6pXODJAB32NujjdQ github.com/urso/diag v0.0.0-20200210123136-21b3cc8eb797/go.mod h1:pNWFTeQ+V1OYT/TzWpnWb6eQBdoXpdx+H+lrH97/Oyo= github.com/urso/go-bin v0.0.0-20180220135811-781c575c9f0e h1:NiofbjIUI5gR+ybDsGSVH1fWyjSeDYiYVJHT1+kcsak= github.com/urso/go-bin v0.0.0-20180220135811-781c575c9f0e/go.mod h1:6GfHrdWBQYjFRIznu7XuQH4lYB2w8nO4bnImVKkzPOM= -github.com/urso/magetools v0.0.0-20190919040553-290c89e0c230 h1:Ft1EJ6JL0F/RV6o2qJ1Be+wYxjYUSfRA3srfHgSgojc= github.com/urso/magetools v0.0.0-20190919040553-290c89e0c230/go.mod h1:DFxTNgS/ExCGmmjVjSOgS2WjtfjKXgCyDzAFgbtovSA= +github.com/urso/magetools v0.0.0-20200125210132-c2e338f92f3a h1:jWAaRFnay3H2e6S0GGCl5nKrkgQNlarCE/kvcutzBmw= +github.com/urso/magetools v0.0.0-20200125210132-c2e338f92f3a/go.mod h1:DbaJnRzkGaWrMWm5Hz6QVnUj//x9/zjrfx8bF3J+GJY= github.com/urso/qcgen v0.0.0-20180131103024-0b059e7db4f4 h1:hhA8EBThzz9PztawVTycKvfETVuBqxAQ5keFlAVtbAw= github.com/urso/qcgen v0.0.0-20180131103024-0b059e7db4f4/go.mod h1:RspW+E2Yb7Fs7HclB2tiDaiu6Rp41BiIG4Wo1YaoXGc= github.com/urso/sderr v0.0.0-20210525210834-52b04e8f5c71 h1:CehQeKbysHV8J2V7AD0w8NL2x1h04kmmo/Ft5su4lU0= diff --git a/libbeat/autodiscover/providers/docker/doc.go b/libbeat/autodiscover/providers/docker/doc.go new file mode 100644 index 000000000000..252d2fdeaf19 --- /dev/null +++ b/libbeat/autodiscover/providers/docker/doc.go @@ -0,0 +1,18 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +package docker diff --git a/libbeat/autodiscover/providers/kubernetes/doc.go b/libbeat/autodiscover/providers/kubernetes/doc.go new file mode 100644 index 000000000000..ed7b00a5bc73 --- /dev/null +++ b/libbeat/autodiscover/providers/kubernetes/doc.go @@ -0,0 +1,18 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +package kubernetes diff --git a/libbeat/autodiscover/providers/kubernetes/node.go b/libbeat/autodiscover/providers/kubernetes/node.go index 728370f248a1..f52b9d9040d5 100644 --- a/libbeat/autodiscover/providers/kubernetes/node.go +++ b/libbeat/autodiscover/providers/kubernetes/node.go @@ -15,6 +15,9 @@ // specific language governing permissions and limitations // under the License. +//go:build !aix +// +build !aix + package kubernetes import ( diff --git a/libbeat/autodiscover/providers/kubernetes/pod.go b/libbeat/autodiscover/providers/kubernetes/pod.go index 65b64ccdc484..e19f19b2ad18 100644 --- a/libbeat/autodiscover/providers/kubernetes/pod.go +++ b/libbeat/autodiscover/providers/kubernetes/pod.go @@ -15,6 +15,9 @@ // specific language governing permissions and limitations // under the License. +//go:build !aix +// +build !aix + package kubernetes import ( diff --git a/libbeat/autodiscover/providers/kubernetes/service.go b/libbeat/autodiscover/providers/kubernetes/service.go index d8e800fe85e5..eec528a7df60 100644 --- a/libbeat/autodiscover/providers/kubernetes/service.go +++ b/libbeat/autodiscover/providers/kubernetes/service.go @@ -15,6 +15,9 @@ // specific language governing permissions and limitations // under the License. +//go:build !aix +// +build !aix + package kubernetes import ( diff --git a/libbeat/metric/system/diskio/diskstat.go b/libbeat/metric/system/diskio/diskstat.go index 001f0725da10..b10b14bfdcab 100644 --- a/libbeat/metric/system/diskio/diskstat.go +++ b/libbeat/metric/system/diskio/diskstat.go @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -//go:build darwin || freebsd || linux || windows -// +build darwin freebsd linux windows +//go:build darwin || freebsd || linux || windows || aix +// +build darwin freebsd linux windows aix package diskio diff --git a/libbeat/metric/system/diskio/doc.go b/libbeat/metric/system/diskio/doc.go new file mode 100644 index 000000000000..53b3bc0ecf5d --- /dev/null +++ b/libbeat/metric/system/diskio/doc.go @@ -0,0 +1,18 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +package diskio diff --git a/libbeat/statestore/backend/memlog/util_other.go b/libbeat/statestore/backend/memlog/util_other.go index 48049bfe5077..0f397929fac7 100644 --- a/libbeat/statestore/backend/memlog/util_other.go +++ b/libbeat/statestore/backend/memlog/util_other.go @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -//go:build linux || dragonfly || freebsd || netbsd || openbsd || solaris -// +build linux dragonfly freebsd netbsd openbsd solaris +//go:build linux || dragonfly || freebsd || netbsd || openbsd || solaris || aix +// +build linux dragonfly freebsd netbsd openbsd solaris aix package memlog diff --git a/metricbeat/module/docker/docker.go b/metricbeat/module/docker/docker.go index 2f12650e5879..3d0856477bcf 100644 --- a/metricbeat/module/docker/docker.go +++ b/metricbeat/module/docker/docker.go @@ -36,9 +36,6 @@ import ( "github.com/elastic/beats/v7/metricbeat/mb/parse" ) -// Select Docker API version -const dockerAPIVersion = "1.22" - // HostParser is a TCP host parser function for docker tcp host addresses var HostParser = parse.URLHostParserBuilder{DefaultScheme: "tcp"}.Build() @@ -62,12 +59,6 @@ func NewModule(base mb.BaseModule) (mb.Module, error) { return &base, nil } -// Stat contains container and statistics information -type Stat struct { - Container *types.Container - Stats types.StatsJSON -} - // NewDockerClient initializes and returns a new Docker client func NewDockerClient(endpoint string, config Config) (*client.Client, error) { var httpClient *http.Client diff --git a/metricbeat/module/docker/stat.go b/metricbeat/module/docker/stat.go new file mode 100644 index 000000000000..826d2c958f52 --- /dev/null +++ b/metricbeat/module/docker/stat.go @@ -0,0 +1,32 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +package docker + +import "github.com/docker/docker/api/types" + +// Types don't need build constraints, unlike the docker.Client code, which is linux-only. +// Put this here for client code that's importing it on non-linux systems + +// Select Docker API version +const dockerAPIVersion = "1.22" + +// Stat contains container and statistics information +type Stat struct { + Container *types.Container + Stats types.StatsJSON +} diff --git a/metricbeat/module/linux/iostat/doc.go b/metricbeat/module/linux/iostat/doc.go new file mode 100644 index 000000000000..6b64442ea1e5 --- /dev/null +++ b/metricbeat/module/linux/iostat/doc.go @@ -0,0 +1,18 @@ +// Licensed to Elasticsearch B.V. under one or more contributor +// license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright +// ownership. Elasticsearch B.V. licenses this file to you under +// the Apache License, Version 2.0 (the "License"); you may +// not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +package iostat diff --git a/metricbeat/module/linux/iostat/iostat.go b/metricbeat/module/linux/iostat/iostat.go index 049b4daadf79..9f40b260cbec 100644 --- a/metricbeat/module/linux/iostat/iostat.go +++ b/metricbeat/module/linux/iostat/iostat.go @@ -15,6 +15,9 @@ // specific language governing permissions and limitations // under the License. +//go:build linux +// +build linux + package iostat import ( diff --git a/metricbeat/module/postgresql/postgresql_test.go b/metricbeat/module/postgresql/postgresql_test.go index 85e3c7a332ee..ea9e2d928fd8 100644 --- a/metricbeat/module/postgresql/postgresql_test.go +++ b/metricbeat/module/postgresql/postgresql_test.go @@ -38,42 +38,42 @@ func TestParseUrl(t *testing.T) { { Name: "simple test", URL: "postgres://host1:5432", - Expected: "host=host1 port=5432", + Expected: "host='host1' port='5432'", }, { Name: "no port", URL: "postgres://host1", - Expected: "host=host1", + Expected: "host='host1'", }, { Name: "user/pass in URL", URL: "postgres://user:pass@host1:5432", - Expected: "host=host1 password=pass port=5432 user=user", + Expected: "host='host1' password='pass' port='5432' user='user'", }, { Name: "user/pass in params", URL: "postgres://host1:5432", Username: "user", Password: "secret", - Expected: "host=host1 password=secret port=5432 user=user", + Expected: "host='host1' password='secret' port='5432' user='user'", }, { Name: "user/pass in URL take precedence", URL: "postgres://user1:pass@host1:5432", Username: "user", Password: "secret", - Expected: "host=host1 password=pass port=5432 user=user1", + Expected: "host='host1' password='pass' port='5432' user='user1'", }, { Name: "timeout no override", URL: "postgres://host1:5432?connect_timeout=2", - Expected: "connect_timeout=2 host=host1 port=5432", + Expected: "connect_timeout='2' host='host1' port='5432'", }, { Name: "timeout from param", URL: "postgres://host1:5432", Timeout: 3 * time.Second, - Expected: "connect_timeout=3 host=host1 port=5432", + Expected: "connect_timeout='3' host='host1' port='5432'", }, { Name: "user/pass in URL take precedence, and timeout override", @@ -81,12 +81,12 @@ func TestParseUrl(t *testing.T) { Username: "user", Password: "secret", Timeout: 3 * time.Second, - Expected: "connect_timeout=3 host=host1 password=pass port=5432 user=user1", + Expected: "connect_timeout='3' host='host1' password='pass' port='5432' user='user1'", }, { Name: "unix socket", URL: "postgresql:///dbname?host=/var/lib/postgresql", - Expected: "dbname=dbname host=/var/lib/postgresql", + Expected: "dbname='dbname' host='/var/lib/postgresql'", }, } diff --git a/metricbeat/module/system/service/data.go b/metricbeat/module/system/service/data.go index 28ce962f329e..bbb753b1271f 100644 --- a/metricbeat/module/system/service/data.go +++ b/metricbeat/module/system/service/data.go @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -//go:build !netbsd -// +build !netbsd +//go:build linux +// +build linux package service diff --git a/metricbeat/module/system/service/dbus.go b/metricbeat/module/system/service/dbus.go index c795864bd556..aa2350dd8863 100644 --- a/metricbeat/module/system/service/dbus.go +++ b/metricbeat/module/system/service/dbus.go @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -//go:build !netbsd -// +build !netbsd +//go:build linux +// +build linux package service diff --git a/metricbeat/module/system/service/service.go b/metricbeat/module/system/service/service.go index 772fad74acdb..89018fb038db 100644 --- a/metricbeat/module/system/service/service.go +++ b/metricbeat/module/system/service/service.go @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -//go:build !netbsd -// +build !netbsd +//go:build linux +// +build linux package service diff --git a/metricbeat/module/system/service/service_test.go b/metricbeat/module/system/service/service_test.go index bfa2ad6a3195..1875b4f87374 100644 --- a/metricbeat/module/system/service/service_test.go +++ b/metricbeat/module/system/service/service_test.go @@ -15,8 +15,8 @@ // specific language governing permissions and limitations // under the License. -//go:build !netbsd -// +build !netbsd +//go:build linux +// +build linux package service diff --git a/x-pack/elastic-agent/pkg/composable/providers/kubernetes/config.go b/x-pack/elastic-agent/pkg/composable/providers/kubernetes/config.go index a721e7c6b075..e40e91abfc19 100644 --- a/x-pack/elastic-agent/pkg/composable/providers/kubernetes/config.go +++ b/x-pack/elastic-agent/pkg/composable/providers/kubernetes/config.go @@ -2,10 +2,6 @@ // or more contributor license agreements. Licensed under the Elastic License; // you may not use this file except in compliance with the Elastic License. -// TODO review the need for this -//go:build linux || darwin || windows -// +build linux darwin windows - package kubernetes import ( diff --git a/x-pack/elastic-agent/pkg/composable/providers/kubernetesleaderelection/config.go b/x-pack/elastic-agent/pkg/composable/providers/kubernetesleaderelection/config.go index 5e63a5ea309b..cc8ebd66fae1 100644 --- a/x-pack/elastic-agent/pkg/composable/providers/kubernetesleaderelection/config.go +++ b/x-pack/elastic-agent/pkg/composable/providers/kubernetesleaderelection/config.go @@ -2,10 +2,6 @@ // or more contributor license agreements. Licensed under the Elastic License; // you may not use this file except in compliance with the Elastic License. -// TODO review the need for this -//go:build linux || darwin || windows -// +build linux darwin windows - package kubernetesleaderelection // Config for kubernetes_leaderelection provider diff --git a/x-pack/elastic-agent/pkg/composable/providers/kubernetessecrets/config.go b/x-pack/elastic-agent/pkg/composable/providers/kubernetessecrets/config.go index dd25b79b762d..c7947977ec4f 100644 --- a/x-pack/elastic-agent/pkg/composable/providers/kubernetessecrets/config.go +++ b/x-pack/elastic-agent/pkg/composable/providers/kubernetessecrets/config.go @@ -2,10 +2,6 @@ // or more contributor license agreements. Licensed under the Elastic License; // you may not use this file except in compliance with the Elastic License. -// TODO review the need for this -//go:build linux || darwin || windows -// +build linux darwin windows - package kubernetessecrets // Config for kubernetes provider diff --git a/x-pack/filebeat/input/azureeventhub/azureeventhub_integration_test.go b/x-pack/filebeat/input/azureeventhub/azureeventhub_integration_test.go index 99fd3c728f2d..68ed2996731a 100644 --- a/x-pack/filebeat/input/azureeventhub/azureeventhub_integration_test.go +++ b/x-pack/filebeat/input/azureeventhub/azureeventhub_integration_test.go @@ -2,8 +2,8 @@ // or more contributor license agreements. Licensed under the Elastic License; // you may not use this file except in compliance with the Elastic License. -//go:build integration && azure -// +build integration,azure +//go:build integration && azure && !aix +// +build integration,azure,!aix package azureeventhub diff --git a/x-pack/filebeat/input/azureeventhub/config.go b/x-pack/filebeat/input/azureeventhub/config.go index e24f3f2b0f6d..354b2cfb0b5b 100644 --- a/x-pack/filebeat/input/azureeventhub/config.go +++ b/x-pack/filebeat/input/azureeventhub/config.go @@ -2,6 +2,9 @@ // or more contributor license agreements. Licensed under the Elastic License; // you may not use this file except in compliance with the Elastic License. +//go:build !aix +// +build !aix + package azureeventhub import ( diff --git a/x-pack/filebeat/input/azureeventhub/config_test.go b/x-pack/filebeat/input/azureeventhub/config_test.go index b6f264911d8d..8ba1b9f2aae1 100644 --- a/x-pack/filebeat/input/azureeventhub/config_test.go +++ b/x-pack/filebeat/input/azureeventhub/config_test.go @@ -2,6 +2,9 @@ // or more contributor license agreements. Licensed under the Elastic License; // you may not use this file except in compliance with the Elastic License. +//go:build !aix +// +build !aix + package azureeventhub import ( diff --git a/x-pack/filebeat/input/azureeventhub/doc.go b/x-pack/filebeat/input/azureeventhub/doc.go new file mode 100644 index 000000000000..e807f6a41c8d --- /dev/null +++ b/x-pack/filebeat/input/azureeventhub/doc.go @@ -0,0 +1,5 @@ +// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one +// or more contributor license agreements. Licensed under the Elastic License; +// you may not use this file except in compliance with the Elastic License. + +package azureeventhub diff --git a/x-pack/filebeat/input/azureeventhub/eph.go b/x-pack/filebeat/input/azureeventhub/eph.go index 8fa976b63458..d9584952dbe1 100644 --- a/x-pack/filebeat/input/azureeventhub/eph.go +++ b/x-pack/filebeat/input/azureeventhub/eph.go @@ -2,6 +2,9 @@ // or more contributor license agreements. Licensed under the Elastic License; // you may not use this file except in compliance with the Elastic License. +//go:build !aix +// +build !aix + package azureeventhub import ( diff --git a/x-pack/filebeat/input/azureeventhub/eph_test.go b/x-pack/filebeat/input/azureeventhub/eph_test.go index a803a29ebf1c..946e85c710a8 100644 --- a/x-pack/filebeat/input/azureeventhub/eph_test.go +++ b/x-pack/filebeat/input/azureeventhub/eph_test.go @@ -2,6 +2,9 @@ // or more contributor license agreements. Licensed under the Elastic License; // you may not use this file except in compliance with the Elastic License. +//go:build !aix +// +build !aix + package azureeventhub import ( diff --git a/x-pack/filebeat/input/azureeventhub/file_persister_test.go b/x-pack/filebeat/input/azureeventhub/file_persister_test.go index ed055d75d3c8..68aee200475e 100644 --- a/x-pack/filebeat/input/azureeventhub/file_persister_test.go +++ b/x-pack/filebeat/input/azureeventhub/file_persister_test.go @@ -2,6 +2,9 @@ // or more contributor license agreements. Licensed under the Elastic License; // you may not use this file except in compliance with the Elastic License. +//go:build !aix +// +build !aix + package azureeventhub import ( diff --git a/x-pack/filebeat/input/azureeventhub/input.go b/x-pack/filebeat/input/azureeventhub/input.go index 5f0d1b3df5ee..2b60a8a1abe7 100644 --- a/x-pack/filebeat/input/azureeventhub/input.go +++ b/x-pack/filebeat/input/azureeventhub/input.go @@ -2,6 +2,9 @@ // or more contributor license agreements. Licensed under the Elastic License; // you may not use this file except in compliance with the Elastic License. +//go:build !aix +// +build !aix + package azureeventhub import ( diff --git a/x-pack/filebeat/input/azureeventhub/input_test.go b/x-pack/filebeat/input/azureeventhub/input_test.go index d4268d9d96a4..797a54876d4f 100644 --- a/x-pack/filebeat/input/azureeventhub/input_test.go +++ b/x-pack/filebeat/input/azureeventhub/input_test.go @@ -2,6 +2,9 @@ // or more contributor license agreements. Licensed under the Elastic License; // you may not use this file except in compliance with the Elastic License. +//go:build !aix +// +build !aix + package azureeventhub import ( diff --git a/x-pack/filebeat/input/cloudfoundry/doc.go b/x-pack/filebeat/input/cloudfoundry/doc.go new file mode 100644 index 000000000000..de397ce22eb7 --- /dev/null +++ b/x-pack/filebeat/input/cloudfoundry/doc.go @@ -0,0 +1,5 @@ +// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one +// or more contributor license agreements. Licensed under the Elastic License; +// you may not use this file except in compliance with the Elastic License. + +package cloudfoundry diff --git a/x-pack/filebeat/input/cloudfoundry/input.go b/x-pack/filebeat/input/cloudfoundry/input.go index 3d2b9b34e598..4931cb035caa 100644 --- a/x-pack/filebeat/input/cloudfoundry/input.go +++ b/x-pack/filebeat/input/cloudfoundry/input.go @@ -2,6 +2,9 @@ // or more contributor license agreements. Licensed under the Elastic License; // you may not use this file except in compliance with the Elastic License. +//go:build !aix +// +build !aix + package cloudfoundry import ( diff --git a/x-pack/filebeat/input/cloudfoundry/v1.go b/x-pack/filebeat/input/cloudfoundry/v1.go index 100fb9443191..6b0b5077b135 100644 --- a/x-pack/filebeat/input/cloudfoundry/v1.go +++ b/x-pack/filebeat/input/cloudfoundry/v1.go @@ -2,6 +2,9 @@ // or more contributor license agreements. Licensed under the Elastic License; // you may not use this file except in compliance with the Elastic License. +//go:build !aix +// +build !aix + package cloudfoundry import ( diff --git a/x-pack/filebeat/input/cloudfoundry/v2.go b/x-pack/filebeat/input/cloudfoundry/v2.go index a8257e29a761..229da01dd741 100644 --- a/x-pack/filebeat/input/cloudfoundry/v2.go +++ b/x-pack/filebeat/input/cloudfoundry/v2.go @@ -2,6 +2,9 @@ // or more contributor license agreements. Licensed under the Elastic License; // you may not use this file except in compliance with the Elastic License. +//go:build !aix +// +build !aix + package cloudfoundry import ( diff --git a/x-pack/filebeat/input/default-inputs/inputs.go b/x-pack/filebeat/input/default-inputs/inputs.go index 7fc3737e37da..a426c65e530e 100644 --- a/x-pack/filebeat/input/default-inputs/inputs.go +++ b/x-pack/filebeat/input/default-inputs/inputs.go @@ -10,11 +10,6 @@ import ( v2 "github.com/elastic/beats/v7/filebeat/input/v2" "github.com/elastic/beats/v7/libbeat/beat" "github.com/elastic/beats/v7/libbeat/logp" - "github.com/elastic/beats/v7/x-pack/filebeat/input/awss3" - "github.com/elastic/beats/v7/x-pack/filebeat/input/cloudfoundry" - "github.com/elastic/beats/v7/x-pack/filebeat/input/http_endpoint" - "github.com/elastic/beats/v7/x-pack/filebeat/input/httpjson" - "github.com/elastic/beats/v7/x-pack/filebeat/input/o365audit" ) func Init(info beat.Info, log *logp.Logger, store beater.StateStore) []v2.Plugin { @@ -23,13 +18,3 @@ func Init(info beat.Info, log *logp.Logger, store beater.StateStore) []v2.Plugin ossinputs.Init(info, log, store)..., ) } - -func xpackInputs(info beat.Info, log *logp.Logger, store beater.StateStore) []v2.Plugin { - return []v2.Plugin{ - cloudfoundry.Plugin(), - http_endpoint.Plugin(), - httpjson.Plugin(log, store), - o365audit.Plugin(log, store), - awss3.Plugin(store), - } -} diff --git a/x-pack/filebeat/input/default-inputs/inputs_aix.go b/x-pack/filebeat/input/default-inputs/inputs_aix.go new file mode 100644 index 000000000000..930c005b1975 --- /dev/null +++ b/x-pack/filebeat/input/default-inputs/inputs_aix.go @@ -0,0 +1,25 @@ +// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one +// or more contributor license agreements. Licensed under the Elastic License; +// you may not use this file except in compliance with the Elastic License. + +package inputs + +import ( + "github.com/elastic/beats/v7/filebeat/beater" + v2 "github.com/elastic/beats/v7/filebeat/input/v2" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/x-pack/filebeat/input/awss3" + "github.com/elastic/beats/v7/x-pack/filebeat/input/http_endpoint" + "github.com/elastic/beats/v7/x-pack/filebeat/input/httpjson" + "github.com/elastic/beats/v7/x-pack/filebeat/input/o365audit" +) + +func xpackInputs(info beat.Info, log *logp.Logger, store beater.StateStore) []v2.Plugin { + return []v2.Plugin{ + http_endpoint.Plugin(), + httpjson.Plugin(log, store), + o365audit.Plugin(log, store), + awss3.Plugin(store), + } +} diff --git a/x-pack/filebeat/input/default-inputs/inputs_other.go b/x-pack/filebeat/input/default-inputs/inputs_other.go new file mode 100644 index 000000000000..c31106c3baa2 --- /dev/null +++ b/x-pack/filebeat/input/default-inputs/inputs_other.go @@ -0,0 +1,30 @@ +// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one +// or more contributor license agreements. Licensed under the Elastic License; +// you may not use this file except in compliance with the Elastic License. + +//go:build !aix +// +build !aix + +package inputs + +import ( + "github.com/elastic/beats/v7/filebeat/beater" + v2 "github.com/elastic/beats/v7/filebeat/input/v2" + "github.com/elastic/beats/v7/libbeat/beat" + "github.com/elastic/beats/v7/libbeat/logp" + "github.com/elastic/beats/v7/x-pack/filebeat/input/awss3" + "github.com/elastic/beats/v7/x-pack/filebeat/input/cloudfoundry" + "github.com/elastic/beats/v7/x-pack/filebeat/input/http_endpoint" + "github.com/elastic/beats/v7/x-pack/filebeat/input/httpjson" + "github.com/elastic/beats/v7/x-pack/filebeat/input/o365audit" +) + +func xpackInputs(info beat.Info, log *logp.Logger, store beater.StateStore) []v2.Plugin { + return []v2.Plugin{ + cloudfoundry.Plugin(), + http_endpoint.Plugin(), + httpjson.Plugin(log, store), + o365audit.Plugin(log, store), + awss3.Plugin(store), + } +} diff --git a/x-pack/libbeat/common/cloudfoundry/cache_integration_test.go b/x-pack/libbeat/common/cloudfoundry/cache_integration_test.go index dd117213466d..a09c12b8a5a8 100644 --- a/x-pack/libbeat/common/cloudfoundry/cache_integration_test.go +++ b/x-pack/libbeat/common/cloudfoundry/cache_integration_test.go @@ -2,8 +2,8 @@ // or more contributor license agreements. Licensed under the Elastic License; // you may not use this file except in compliance with the Elastic License. -//go:build integration && cloudfoundry -// +build integration,cloudfoundry +//go:build integration && cloudfoundry && !aix +// +build integration,cloudfoundry,!aix package cloudfoundry diff --git a/x-pack/libbeat/processors/add_cloudfoundry_metadata/add_cloudfoundry_metadata.go b/x-pack/libbeat/processors/add_cloudfoundry_metadata/add_cloudfoundry_metadata.go index 50f551af9699..e4d459d2a143 100644 --- a/x-pack/libbeat/processors/add_cloudfoundry_metadata/add_cloudfoundry_metadata.go +++ b/x-pack/libbeat/processors/add_cloudfoundry_metadata/add_cloudfoundry_metadata.go @@ -2,6 +2,9 @@ // or more contributor license agreements. Licensed under the Elastic License; // you may not use this file except in compliance with the Elastic License. +//go:build !aix +// +build !aix + package add_cloudfoundry_metadata import ( diff --git a/x-pack/libbeat/processors/add_cloudfoundry_metadata/add_cloudfoundry_metadata_test.go b/x-pack/libbeat/processors/add_cloudfoundry_metadata/add_cloudfoundry_metadata_test.go index 34fe866104db..a5dfa7e95584 100644 --- a/x-pack/libbeat/processors/add_cloudfoundry_metadata/add_cloudfoundry_metadata_test.go +++ b/x-pack/libbeat/processors/add_cloudfoundry_metadata/add_cloudfoundry_metadata_test.go @@ -2,6 +2,9 @@ // or more contributor license agreements. Licensed under the Elastic License; // you may not use this file except in compliance with the Elastic License. +//go:build !aix +// +build !aix + package add_cloudfoundry_metadata import ( diff --git a/x-pack/libbeat/processors/add_cloudfoundry_metadata/doc.go b/x-pack/libbeat/processors/add_cloudfoundry_metadata/doc.go new file mode 100644 index 000000000000..af83eda43f03 --- /dev/null +++ b/x-pack/libbeat/processors/add_cloudfoundry_metadata/doc.go @@ -0,0 +1,5 @@ +// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one +// or more contributor license agreements. Licensed under the Elastic License; +// you may not use this file except in compliance with the Elastic License. + +package add_cloudfoundry_metadata diff --git a/x-pack/metricbeat/module/cloudfoundry/cloudfoundry.go b/x-pack/metricbeat/module/cloudfoundry/cloudfoundry.go index 1486c9b14c0e..06fee26c16f3 100644 --- a/x-pack/metricbeat/module/cloudfoundry/cloudfoundry.go +++ b/x-pack/metricbeat/module/cloudfoundry/cloudfoundry.go @@ -2,6 +2,9 @@ // or more contributor license agreements. Licensed under the Elastic License; // you may not use this file except in compliance with the Elastic License. +//go:build !aix +// +build !aix + package cloudfoundry import ( diff --git a/x-pack/metricbeat/module/cloudfoundry/container/container.go b/x-pack/metricbeat/module/cloudfoundry/container/container.go index a6f8d18191e4..5e6793556df0 100644 --- a/x-pack/metricbeat/module/cloudfoundry/container/container.go +++ b/x-pack/metricbeat/module/cloudfoundry/container/container.go @@ -2,6 +2,9 @@ // or more contributor license agreements. Licensed under the Elastic License; // you may not use this file except in compliance with the Elastic License. +//go:build !aix +// +build !aix + package container import ( diff --git a/x-pack/metricbeat/module/cloudfoundry/container/container_integration_test.go b/x-pack/metricbeat/module/cloudfoundry/container/container_integration_test.go index f58e876580e8..c0178c058823 100644 --- a/x-pack/metricbeat/module/cloudfoundry/container/container_integration_test.go +++ b/x-pack/metricbeat/module/cloudfoundry/container/container_integration_test.go @@ -2,8 +2,8 @@ // or more contributor license agreements. Licensed under the Elastic License; // you may not use this file except in compliance with the Elastic License. -//go:build integration && cloudfoundry -// +build integration,cloudfoundry +//go:build integration && cloudfoundry && !aix +// +build integration,cloudfoundry,!aix package container diff --git a/x-pack/metricbeat/module/cloudfoundry/container/container_test.go b/x-pack/metricbeat/module/cloudfoundry/container/container_test.go index 5970204c680f..67b5ca5227af 100644 --- a/x-pack/metricbeat/module/cloudfoundry/container/container_test.go +++ b/x-pack/metricbeat/module/cloudfoundry/container/container_test.go @@ -2,8 +2,8 @@ // or more contributor license agreements. Licensed under the Elastic License; // you may not use this file except in compliance with the Elastic License. -//go:build !integration -// +build !integration +//go:build !aix +// +build !aix package container diff --git a/x-pack/metricbeat/module/cloudfoundry/container/doc.go b/x-pack/metricbeat/module/cloudfoundry/container/doc.go new file mode 100644 index 000000000000..3551ddfa76c9 --- /dev/null +++ b/x-pack/metricbeat/module/cloudfoundry/container/doc.go @@ -0,0 +1,5 @@ +// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one +// or more contributor license agreements. Licensed under the Elastic License; +// you may not use this file except in compliance with the Elastic License. + +package container diff --git a/x-pack/metricbeat/module/cloudfoundry/counter/counter.go b/x-pack/metricbeat/module/cloudfoundry/counter/counter.go index 53d3833d810a..5828a0ba1b73 100644 --- a/x-pack/metricbeat/module/cloudfoundry/counter/counter.go +++ b/x-pack/metricbeat/module/cloudfoundry/counter/counter.go @@ -2,6 +2,9 @@ // or more contributor license agreements. Licensed under the Elastic License; // you may not use this file except in compliance with the Elastic License. +//go:build !aix +// +build !aix + package counter import ( diff --git a/x-pack/metricbeat/module/cloudfoundry/counter/counter_integration_test.go b/x-pack/metricbeat/module/cloudfoundry/counter/counter_integration_test.go index 49194a61174a..c9cf053a1160 100644 --- a/x-pack/metricbeat/module/cloudfoundry/counter/counter_integration_test.go +++ b/x-pack/metricbeat/module/cloudfoundry/counter/counter_integration_test.go @@ -2,8 +2,8 @@ // or more contributor license agreements. Licensed under the Elastic License; // you may not use this file except in compliance with the Elastic License. -//go:build integration && cloudfoundry -// +build integration,cloudfoundry +//go:build integration && cloudfoundry && !aix +// +build integration,cloudfoundry,!aix package counter diff --git a/x-pack/metricbeat/module/cloudfoundry/counter/counter_test.go b/x-pack/metricbeat/module/cloudfoundry/counter/counter_test.go index 0a00cbd226a6..76e95ca40780 100644 --- a/x-pack/metricbeat/module/cloudfoundry/counter/counter_test.go +++ b/x-pack/metricbeat/module/cloudfoundry/counter/counter_test.go @@ -2,8 +2,8 @@ // or more contributor license agreements. Licensed under the Elastic License; // you may not use this file except in compliance with the Elastic License. -//go:build !integration -// +build !integration +//go:build !aix +// +build !aix package counter diff --git a/x-pack/metricbeat/module/cloudfoundry/counter/doc.go b/x-pack/metricbeat/module/cloudfoundry/counter/doc.go new file mode 100644 index 000000000000..d61d1e47b82e --- /dev/null +++ b/x-pack/metricbeat/module/cloudfoundry/counter/doc.go @@ -0,0 +1,5 @@ +// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one +// or more contributor license agreements. Licensed under the Elastic License; +// you may not use this file except in compliance with the Elastic License. + +package counter diff --git a/x-pack/metricbeat/module/cloudfoundry/hub.go b/x-pack/metricbeat/module/cloudfoundry/hub.go index 5057a7bdbc55..13b593495a3c 100644 --- a/x-pack/metricbeat/module/cloudfoundry/hub.go +++ b/x-pack/metricbeat/module/cloudfoundry/hub.go @@ -2,6 +2,9 @@ // or more contributor license agreements. Licensed under the Elastic License; // you may not use this file except in compliance with the Elastic License. +//go:build !aix +// +build !aix + package cloudfoundry import ( diff --git a/x-pack/metricbeat/module/cloudfoundry/mtest/config.go b/x-pack/metricbeat/module/cloudfoundry/mtest/config.go index 8f98d528f586..b93a57901dcf 100644 --- a/x-pack/metricbeat/module/cloudfoundry/mtest/config.go +++ b/x-pack/metricbeat/module/cloudfoundry/mtest/config.go @@ -2,6 +2,9 @@ // or more contributor license agreements. Licensed under the Elastic License; // you may not use this file except in compliance with the Elastic License. +//go:build !aix +// +build !aix + package mtest import ( diff --git a/x-pack/metricbeat/module/cloudfoundry/mtest/modulemock.go b/x-pack/metricbeat/module/cloudfoundry/mtest/modulemock.go index 22b5260fd663..6662f5f547fb 100644 --- a/x-pack/metricbeat/module/cloudfoundry/mtest/modulemock.go +++ b/x-pack/metricbeat/module/cloudfoundry/mtest/modulemock.go @@ -2,6 +2,9 @@ // or more contributor license agreements. Licensed under the Elastic License; // you may not use this file except in compliance with the Elastic License. +//go:build !aix +// +build !aix + package mtest import ( diff --git a/x-pack/metricbeat/module/cloudfoundry/v1.go b/x-pack/metricbeat/module/cloudfoundry/v1.go index 8ad2e1e6e2ac..b76ad1ad8316 100644 --- a/x-pack/metricbeat/module/cloudfoundry/v1.go +++ b/x-pack/metricbeat/module/cloudfoundry/v1.go @@ -2,6 +2,9 @@ // or more contributor license agreements. Licensed under the Elastic License; // you may not use this file except in compliance with the Elastic License. +//go:build !aix +// +build !aix + package cloudfoundry import ( diff --git a/x-pack/metricbeat/module/cloudfoundry/v1_test.go b/x-pack/metricbeat/module/cloudfoundry/v1_test.go index b30952a91895..17f315d287d4 100644 --- a/x-pack/metricbeat/module/cloudfoundry/v1_test.go +++ b/x-pack/metricbeat/module/cloudfoundry/v1_test.go @@ -2,6 +2,9 @@ // or more contributor license agreements. Licensed under the Elastic License; // you may not use this file except in compliance with the Elastic License. +//go:build !aix +// +build !aix + package cloudfoundry import ( diff --git a/x-pack/metricbeat/module/cloudfoundry/v2.go b/x-pack/metricbeat/module/cloudfoundry/v2.go index d2987f3c4013..7e35c2ddb7df 100644 --- a/x-pack/metricbeat/module/cloudfoundry/v2.go +++ b/x-pack/metricbeat/module/cloudfoundry/v2.go @@ -2,6 +2,9 @@ // or more contributor license agreements. Licensed under the Elastic License; // you may not use this file except in compliance with the Elastic License. +//go:build !aix +// +build !aix + package cloudfoundry import ( diff --git a/x-pack/metricbeat/module/cloudfoundry/value/doc.go b/x-pack/metricbeat/module/cloudfoundry/value/doc.go new file mode 100644 index 000000000000..b69492763d6c --- /dev/null +++ b/x-pack/metricbeat/module/cloudfoundry/value/doc.go @@ -0,0 +1,5 @@ +// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one +// or more contributor license agreements. Licensed under the Elastic License; +// you may not use this file except in compliance with the Elastic License. + +package value diff --git a/x-pack/metricbeat/module/cloudfoundry/value/value.go b/x-pack/metricbeat/module/cloudfoundry/value/value.go index 62fb02f5e39e..397fdafae371 100644 --- a/x-pack/metricbeat/module/cloudfoundry/value/value.go +++ b/x-pack/metricbeat/module/cloudfoundry/value/value.go @@ -2,6 +2,9 @@ // or more contributor license agreements. Licensed under the Elastic License; // you may not use this file except in compliance with the Elastic License. +//go:build !aix +// +build !aix + package value import ( diff --git a/x-pack/metricbeat/module/cloudfoundry/value/value_integration_test.go b/x-pack/metricbeat/module/cloudfoundry/value/value_integration_test.go index 2fb9abfc2195..1db4026a2652 100644 --- a/x-pack/metricbeat/module/cloudfoundry/value/value_integration_test.go +++ b/x-pack/metricbeat/module/cloudfoundry/value/value_integration_test.go @@ -2,8 +2,8 @@ // or more contributor license agreements. Licensed under the Elastic License; // you may not use this file except in compliance with the Elastic License. -//go:build integration && cloudfoundry -// +build integration,cloudfoundry +//go:build integration && cloudfoundry && !aix +// +build integration,cloudfoundry,!aix package value diff --git a/x-pack/metricbeat/module/cloudfoundry/value/value_test.go b/x-pack/metricbeat/module/cloudfoundry/value/value_test.go index 097f3d37fb2f..1ea448cca777 100644 --- a/x-pack/metricbeat/module/cloudfoundry/value/value_test.go +++ b/x-pack/metricbeat/module/cloudfoundry/value/value_test.go @@ -2,8 +2,8 @@ // or more contributor license agreements. Licensed under the Elastic License; // you may not use this file except in compliance with the Elastic License. -//go:build !integration -// +build !integration +//go:build !aix +// +build !aix package value