Skip to content

Commit

Permalink
Merge pull request #777 from google/addres-doc
Browse files Browse the repository at this point in the history
doc: Document the `--address` commandline flag.
  • Loading branch information
jaqx0r authored Oct 21, 2023
2 parents d31b0ed + 6fab2eb commit 82500c9
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions docs/Deploying.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ The `--help` flag will print a list of flags for configuring `mtail`.

(Flags may be prefixed with either `-` or `--`)

## Quickstart

Basic flags necessary to start `mtail`:

* `--logs` is a comma separated list of filenames to extract from, but can also be used multiple times, and each filename can be a [glob pattern](http://godoc.org/path/filepath#Match). Named pipes can be read from when passed as a filename to this flag.
Expand Down Expand Up @@ -127,6 +129,18 @@ Point your collection tool at `localhost:3903/json` for JSON format metrics.

Prometheus can be directed to the /metrics endpoint for Prometheus text-based format.

### Changing the listen address

The default port is `3903`, and can be changed with the `--port` commandline flag.

The default address is `""` on the TCP protocol, which means it will bind to all IP addresses on the system. This can be changed with the `--address` commandline flag.

```
mtail --address=127.0.0.1 --port=8080`
```

Depending on your version of Go, the address "0.0.0.0" is treated by Go as dual-stack; see https://github.com/golang/go/issues/17615 and https://pkg.go.dev/net#Listen

### Push based collection

Use the `collectd_socketpath` or `graphite_host_port` flags to enable pushing to a collectd or graphite instance.
Expand Down

0 comments on commit 82500c9

Please sign in to comment.