Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Rename google-pubsub Filebeat input to gcp-pubsub #22213

Merged
merged 6 commits into from
Nov 9, 2020
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d
- Add SSL option to checkpoint module {pull}19560[19560]
- Add max_number_of_messages config into s3 input. {pull}21993[21993]
- Update Okta documentation for new stateful restarts. {pull}22091[22091]
- Rename google-pubsub input to gcp-pubsub. {pull}22213[22213]

*Heartbeat*

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

#---------------------------- Google Cloud Pub/Sub Input -----------------------
# Input for reading messages from a Google Cloud Pub/Sub topic subscription.
- type: google-pubsub
- type: gcp-pubsub
enabled: false

# Google Cloud project ID. Required.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
[role="xpack"]

:type: google-pubsub
:type: gcp-pubsub

[id="{beatname_lc}-input-{type}"]
=== Google Cloud Pub/Sub input
=== GCP Pub/Sub input

++++
<titleabbrev>Google Pub/Sub</titleabbrev>
<titleabbrev>GCP Pub/Sub</titleabbrev>
++++

Use the `google-pubsub` input to read messages from a Google Cloud Pub/Sub topic
Use the `gcp-pubsub` input to read messages from a Google Cloud Pub/Sub topic
subscription.

This input can, for example, be used to receive Stackdriver logs that have been
Expand All @@ -23,7 +23,7 @@ Example configuration:
["source","yaml",subs="attributes"]
----
{beatname_lc}.inputs:
- type: google-pubsub
- type: gcp-pubsub
project_id: my-gcp-project-id
topic: vpc-firewall-logs-topic
subscription.name: filebeat-vpc-firewall-logs-sub
Expand All @@ -33,7 +33,7 @@ Example configuration:

==== Configuration options

The `google-pubsub` input supports the following configuration options plus the
The `gcp-pubsub` input supports the following configuration options plus the
<<{beatname_lc}-input-{type}-common-options>> described later.

[float]
Expand Down
2 changes: 1 addition & 1 deletion x-pack/filebeat/filebeat.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2373,7 +2373,7 @@ filebeat.inputs:

#---------------------------- Google Cloud Pub/Sub Input -----------------------
# Input for reading messages from a Google Cloud Pub/Sub topic subscription.
- type: google-pubsub
- type: gcp-pubsub
enabled: false

# Google Cloud project ID. Required.
Expand Down
2 changes: 1 addition & 1 deletion x-pack/filebeat/include/list.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// or more contributor license agreements. Licensed under the Elastic License;
// you may not use this file except in compliance with the Elastic License.

package googlepubsub
package gcppubsub

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// or more contributor license agreements. Licensed under the Elastic License;
// you may not use this file except in compliance with the Elastic License.

package googlepubsub
package gcppubsub

import (
"os"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// or more contributor license agreements. Licensed under the Elastic License;
// you may not use this file except in compliance with the Elastic License.

package googlepubsub
package gcppubsub

import (
"context"
Expand All @@ -26,14 +26,20 @@ import (
)

const (
inputName = "google-pubsub"
inputName = "gcp-pubsub"
oldInputName = "google-pubsub"
)

func init() {
err := input.Register(inputName, NewInput)
if err != nil {
panic(errors.Wrapf(err, "failed to register %v input", inputName))
}

err = input.Register(oldInputName, NewInput)
if err != nil {
panic(errors.Wrapf(err, "failed to register %v input", oldInputName))
}
}

type pubsubInput struct {
Expand Down Expand Up @@ -81,7 +87,7 @@ func NewInput(

in := &pubsubInput{
config: conf,
log: logp.NewLogger("google.pubsub").With(
log: logp.NewLogger("gcp.pubsub").With(
"pubsub_project", conf.ProjectID,
"pubsub_topic", conf.Topic,
"pubsub_subscription", conf.Subscription),
Expand Down Expand Up @@ -109,7 +115,7 @@ func NewInput(
if err != nil {
return nil, err
}
kaiyan-sheng marked this conversation as resolved.
Show resolved Hide resolved
in.log.Info("Initialized Google Pub/Sub input.")
in.log.Info("Initialized GCP Pub/Sub input.")
return in, nil
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// or more contributor license agreements. Licensed under the Elastic License;
// you may not use this file except in compliance with the Elastic License.

package googlepubsub
package gcppubsub

import (
"context"
Expand Down
4 changes: 2 additions & 2 deletions x-pack/filebeat/module/googlecloud/audit/config/input.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{ if eq .input "google-pubsub" }}
{{ if eq .input "gcp-pubsub" }}

type: google-pubsub
type: gcp-pubsub
project_id: {{ .project_id }}
topic: {{ .topic }}
subscription.name: {{ .subscription_name }}
Expand Down
2 changes: 1 addition & 1 deletion x-pack/filebeat/module/googlecloud/audit/manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module_version: "1.0"

var:
- name: input
default: google-pubsub
default: gcp-pubsub
- name: project_id
default: SET_PROJECT_NAME
- name: topic
Expand Down
4 changes: 2 additions & 2 deletions x-pack/filebeat/module/googlecloud/firewall/config/input.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{ if eq .input "google-pubsub" }}
{{ if eq .input "gcp-pubsub" }}

type: google-pubsub
type: gcp-pubsub
project_id: {{ .project_id }}
topic: {{ .topic }}
subscription.name: {{ .subscription_name }}
Expand Down
2 changes: 1 addition & 1 deletion x-pack/filebeat/module/googlecloud/firewall/manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module_version: "1.0"

var:
- name: input
default: google-pubsub
default: gcp-pubsub
- name: project_id
default: SET_PROJECT_NAME
- name: topic
Expand Down
4 changes: 2 additions & 2 deletions x-pack/filebeat/module/googlecloud/vpcflow/config/input.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{ if eq .input "google-pubsub" }}
{{ if eq .input "gcp-pubsub" }}

type: google-pubsub
type: gcp-pubsub
project_id: {{ .project_id }}
topic: {{ .topic }}
subscription.name: {{ .subscription_name }}
Expand Down