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

is https supported? #12

Open
foxgst opened this issue Apr 16, 2022 · 1 comment
Open

is https supported? #12

foxgst opened this issue Apr 16, 2022 · 1 comment

Comments

@foxgst
Copy link

foxgst commented Apr 16, 2022

The output config is

Output:
    ElasticSearch:
      Hosts:
        - https://127.0.0.1:9200
      Index: "{.event}-{{yyyy-MM-dd}}"
      Username: elastic
      Password: XXXXXXYYYYYY

and i get

➜  stash git:(master) ✗ ./stash -f etc/config.yaml                                 
2022/04/17 01:28:31 stash.go:58 health check timeout: Head "https://127.0.0.1:9200": x509: “Elasticsearch security auto-configuration HTTP CA” certificate is not trusted: no Elasticsearch node available
2022/04/17 01:28:31 {"@timestamp":"2022-04-17T01:28:31.581+08:00","level":"fatal","content":"stash.go:58 health check timeout: Head \"https://127.0.0.1:9200\": x509: “Elasticsearch security auto-configuration HTTP CA” certificate is not trusted: no Elasticsearch node available"}

the official guide is

➜  es curl --cacert http_ca.crt -u elastic https://127.0.0.1:9200            
Enter host password for user 'elastic':
{
  "name" : "34bb1b121a60",
  "cluster_name" : "docker-cluster",
  "cluster_uuid" : "Y4pyYI5rSg-JzEVphE8ZqA",
  "version" : {
    "number" : "8.1.2",
    "build_flavor" : "default",
    "build_type" : "docker",
    "build_hash" : "31df9689e80bad366ac20176aa7f2371ea5eb4c1",
    "build_date" : "2022-03-29T21:18:59.991429448Z",
    "build_snapshot" : false,
    "lucene_version" : "9.0.0",
    "minimum_wire_compatibility_version" : "7.17.0",
    "minimum_index_compatibility_version" : "7.0.0"
  },
  "tagline" : "You Know, for Search"
}

The ca cert which named http_ca.crt is copied from the docker container.

for go-stash is a competitor to logstash, i find filebeat and logstash's configuration from kibana.

output.elasticsearch:
  hosts: ["<es_url>"]
  username: "elastic"
  password: "<password>"
  # If using Elasticsearch's default certificate 
  ssl.ca_trusted_fingerprint: "<es cert fingerprint>" 
setup.kibana:
  host: "<kibana_url>"

there is a property named "ssl.ca_trusted_fingerprint", maybe helpful ?

@kevwan
Copy link
Owner

kevwan commented Apr 17, 2022

At the moment, only username/password are supported.

I'll support https later.

@foxgst foxgst changed the title is it support https Apr 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants