diff --git a/README.md b/README.md index 3a2903a6..29666a72 100644 --- a/README.md +++ b/README.md @@ -92,6 +92,20 @@ $ ./tile38-cli > help ``` +#### Prometheus Metrics +Tile38 can natively export Prometheus metrics by setting the `--metrics-addr` command line flag (disabled by default). This example exposes the HTTP metrics server on port 4321: +``` +# start server and enable Prometheus metrics, listen on local interface only +./tile38-server --metrics-addr=127.0.0.1:4321 + +# access metrics +curl http://127.0.0.1:4321/metrics +``` +If you need to access the `/metrics` endpoint from a different host you'll have to set the flag accordingly, e.g. set it to `0.0.0.0:<>` to listen on all interfaces. + +Use the [redis_exporter](https://github.com/oliver006/redis_exporter) for more advanced use cases like extracting key values or running a lua script. + + ## Playing with Tile38 Basic operations: @@ -275,7 +289,6 @@ Check out [maptiler.org](http://www.maptiler.org/google-maps-coordinates-tile-bo #### QuadKey A QuadKey used the same coordinate system as an XYZ tile except that the string representation is a string characters composed of 0, 1, 2, or 3. For a detailed explanation checkout [The Bing Maps Tile System](https://msdn.microsoft.com/en-us/library/bb259689.aspx). - ## Network protocols It's recommended to use a [client library](#tile38-client-libraries) or the [Tile38 CLI](#running), but there are times when only HTTP is available or when you need to test from a remote terminal. In those cases we provide an HTTP and telnet options.