openzipkin / zipkin-aws

Reporters and collectors for use in Amazon's cloud
Apache License 2.0
69 stars 34 forks source link

Zipkin AWS ES add VPC Support #92

Closed coreyshaw closed 6 years ago

coreyshaw commented 6 years ago

Hello,

Would you guys be able to add functionality in for an VPC with ElasticSearch?

In this file you are referencing the DomainStatus.Endpoint but when a VPC is in use it returns DomainStatus.Endpoints.vpc

https://github.com/openzipkin/zipkin-aws/blob/master/autoconfigure/storage-elasticsearch-aws/src/main/java/zipkin/autoconfigure/storage/elasticsearch/aws/ElasticsearchDomainEndpoint.java#L60-L66

Thanks

codefromthecrypt commented 6 years ago

sure! mind giving us a json api response? you can mangle the hostname etc

On Thu, Jun 28, 2018 at 3:06 AM, Corey Shaw notifications@github.com wrote:

Hello,

Would you guys be able to add functionality in for an VPC with ElasticSearch?

In this file you are referencing the DomainStatus.Endpoint but when a VPC is in use it returns DomainStatus.Endpoints.vpc

https://github.com/openzipkin/zipkin-aws/blob/master/ autoconfigure/storage-elasticsearch-aws/src/main/ java/zipkin/autoconfigure/storage/elasticsearch/aws/ ElasticsearchDomainEndpoint.java#L60-L66

Thanks

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/openzipkin/zipkin-aws/issues/92, or mute the thread https://github.com/notifications/unsubscribe-auth/AAD61zLGJkaLl9FE_V9svGNkftKXwPGlks5uA9fCgaJpZM4U6OvE .

coreyshaw commented 6 years ago

Sure thing!

{
  "DomainStatus":{
    "ARN":"",
    "AccessPolicies":"",
    "AdvancedOptions":{
      "rest.action.multi.allow_explicit_index":"true"
    },
    "CognitoOptions":{
      "Enabled":false,
      "IdentityPoolId":null,
      "RoleArn":null,
      "UserPoolId":null
    },
    "Created":true,
    "Deleted":false,
    "DomainId":"",
    "DomainName":"dns-es-development",
    "EBSOptions":{
      "EBSEnabled":true,
      "Iops":null,
      "VolumeSize":10,
      "VolumeType":"gp2"
    },
    "ElasticsearchClusterConfig":{
      "DedicatedMasterCount":3,
      "DedicatedMasterEnabled":true,
      "DedicatedMasterType":"m4.large.elasticsearch",
      "InstanceCount":2,
      "InstanceType":"m4.large.elasticsearch",
      "ZoneAwarenessEnabled":true
    },
    "ElasticsearchVersion":"6.2",
    "EncryptionAtRestOptions":{
      "Enabled":true,
      "KmsKeyId":""
    },
    "Endpoint":null,
    "Endpoints":{
      "vpc":"<hostname>"
    },
    "LogPublishingOptions":null,
    "Processing":false,
    "ServiceSoftwareOptions":{
      "AutomatedUpdateDate":0.0,
      "Cancellable":false,
      "CurrentVersion":"LEGACY",
      "Description":"There is no software update available for this domain.",
      "NewVersion":"",
      "UpdateAvailable":false,
      "UpdateStatus":"COMPLETED"
    },
    "SnapshotOptions":{
      "AutomatedSnapshotStartHour":1
    }
  }
}

Maybe some logic around if Endpoints.vpc is set if not use Endpoint.

Thanks

coreyshaw commented 6 years ago

Hello,

I just wanted to checkin on this? If its easier we can make the change and PR it?

Let me know your thoughts.

Thanks

codefromthecrypt commented 6 years ago

We have a workshop on something else right now, and trying to take advantage of focus towards that https://docs.google.com/document/d/1QulozaBhJemNgy4Db8uIc_1ycSLZufLfNeGW8QQ42vg/edit

A pull request with tests would indeed move this! thanks for the offer

codefromthecrypt commented 6 years ago

I can work this in today