Skip to content

Commit

Permalink
Update readme about how to connect to riemann server using TLS.
Browse files Browse the repository at this point in the history
  • Loading branch information
tendant committed May 17, 2014
1 parent 3ae16ce commit c8746b3
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,23 @@ Download from clojars: https://clojars.org/riemann-clojure-client
(query c "state = \"ok\"")
```

To connect to Riemann server using TLS, please refer to https://github.com/aphyr/less-awful-ssl for getting the CA certificate, signed key and cert.

``` clojure
(use 'riemann.client)
(def c (tcp-client {:host "1.2.3.4"
:port 5554
:tls? true
:key "client.pkcs8"
:cert "client.crt"
:ca-cert "ca.crt"}))
(send-event c {:service "foo" :state "ok"})
(query c "state = \"ok\"")

```

:key, :cert and :ca-cert could be any type of File, URI, URL, Socket, byte array, and String arguments. If the argument is a String, it tries to resolve it first as a URI, then as a local file name. URIs with a 'file' protocol are converted to local file names. (Check clojure.java.io/input-stream for more information.)

## License

Copyright © 2012 Kyle Kingsbury
Expand Down
2 changes: 1 addition & 1 deletion src/riemann/client.clj
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
:port The port to connect to
:tls? Whether to use TLS when connecting
:key A PKCS8 key file
:key A PKCS8 key
:cert A PEM certificate
:ca-cert The signing cert for our certificate and the server's
Expand Down

0 comments on commit c8746b3

Please sign in to comment.