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

Kinesis output plugin does not work in govcloud #2911

Closed
skroll opened this issue Jun 12, 2017 · 9 comments · Fixed by #2912
Closed

Kinesis output plugin does not work in govcloud #2911

skroll opened this issue Jun 12, 2017 · 9 comments · Fixed by #2912
Assignees
Labels
bug unexpected problem or unintended behavior
Milestone

Comments

@skroll
Copy link

skroll commented Jun 12, 2017

Bug report

Relevant telegraf.conf:

[[outputs.kinesis]]
  region = "us-gov-west-1"
  streamname = "my-metrics-stream"
  partitionkey = "public"
  use_random_partitionkey = false
  data_format = "influx"
  debug = false

System info:

Telegraf v1.3.0
Amazon Linux

Steps to reproduce:

  1. Set an kinesis output to write telegraf metrics.
  2. Start telegraf.

Expected behavior:

Telegraf to start and write metrics to the stream.

Actual behavior:

Telegraf fails to start, prints out that the 'Endpoint' configuration is required since it cannot resolve it automatically.

Additional info:

2017-06-12T15:27:19Z E! kinesis: Error in ListSteams API call : MissingEndpoint: 'Endpoint' configuration is required for this service
2017-06-12T15:27:19Z E! kinesis : You have configured a StreamName my-metrics-stream which does not exist. exiting.
@danielnelson
Copy link
Contributor

Do you know if it works outside of the govcloud?

@skroll
Copy link
Author

skroll commented Jun 12, 2017

Yes it works fine. It appears that the go AWS SDK can't resolve the endpoint correctly when it's in govcloud, since they do not obey the same naming convention for the URLs.

@skroll
Copy link
Author

skroll commented Jun 12, 2017

All that really needs to be done is exposing a configuration value for the endpoint to be set in the AWS service configuration. I did something like:

var svc *kinesis.Kinesis
if k.Endpoint != "" {
	svc = kinesis.New(configProvider, aws.NewConfig().WithEndpoint(k.Endpoint))
} else {
	svc = kinesis.New(configProvider)
}

This is definitely something I can contribute, I'm just not sure about the go style conventions used by telegraf.

@danielnelson
Copy link
Contributor

That looks good.

@skroll
Copy link
Author

skroll commented Jun 12, 2017

Ok, actually, it's due to the version of the aws-sdk-go dependency.

The commit listed in Godeps was before Kinesis was added to govcloud, so it doesn't have a resolver for kinesis when in us-gov-west-1.

Newer versions of the SDK resolve this endpoint automatically.

@danielnelson
Copy link
Contributor

Thanks, I'll update the dependency.

@danielnelson danielnelson added this to the 1.4.0 milestone Jun 12, 2017
@danielnelson danielnelson added the bug unexpected problem or unintended behavior label Jun 12, 2017
@danielnelson
Copy link
Contributor

I updated the dependency, give it a spin if you can.

@skroll
Copy link
Author

skroll commented Jun 13, 2017

I'll fire it up tomorrow and report back.

@skroll
Copy link
Author

skroll commented Jun 13, 2017

Confirming that this works now, with the exact same config file I was using before.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants