Skip to content

Commit

Permalink
Update README.
Browse files Browse the repository at this point in the history
  • Loading branch information
woblerr committed Oct 26, 2023
1 parent f70a37d commit 93525fd
Showing 1 changed file with 23 additions and 18 deletions.
41 changes: 23 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,41 +67,46 @@ make build
./authlog_exporter <flags>
```

By default, metrics will be collecting from `/var/log/auth.log` and will be available at http://localhost:9991/metrics. This means that the user who runs `authlog_exporter` should have read permission to file `/var/log/auth.log`. You can changed log file location, port and endpoint by using the`--auth.log`, `--prom.port` and `--prom.endpoint` flags.
By default, metrics will be collecting from `/var/log/auth.log` and will be available at http://localhost:9991/metrics.
This means that the user who runs `authlog_exporter` should have read permission to file `/var/log/auth.log`.
You can changed log file location by using the`--auth.log` flag.

For geoIP analyze you need to specify `--geo.type` flag:
* `db` - for local geoIP database file,
* `url` - for geoIP database API.

For local geoIP database usage you also need specify `--geo.db` flag (path to geoIP database file).

The flag `--prom.web-config` allows to specify the path to the configuration for TLS and/or basic authentication.<br>
The description of TLS configuration and basic authentication can be found at [exporter-toolkit/web](https://github.com/prometheus/exporter-toolkit/blob/v0.7.1/docs/web-configuration.md).
The flag `--web.config.file` allows to specify the path to the configuration for TLS and/or basic authentication.<br>
The description of TLS configuration and basic authentication can be found at [exporter-toolkit/web](https://github.com/prometheus/exporter-toolkit/blob/v0.9.1/docs/web-configuration.md).

Available configuration flags:

```bash
./authlog_exporter --help
usage: authlog_exporter [<flags>]


Flags:
-h, --help Show context-sensitive help (also try --help-long and --help-man).
-h, --[no-]help Show context-sensitive help (also try --help-long and --help-man).
--auth.log="/var/log/auth.log"
Path to auth.log.
--prom.endpoint="/metrics"
Endpoint used for metrics.
--prom.port="9991" Port for prometheus metrics to listen on.
--prom.web-config="" [EXPERIMENTAL] Path to config yaml file that can enable TLS or authentication.
--geo.db="" Path to geoIP database file.
--geo.lang="en" Output language format.
--geo.timeout=2 Timeout in seconds for waiting response from geoIP database API.
--geo.type="" Type of geoIP database: db, url.
Path to auth.log.
--web.endpoint="/metrics" Endpoint used for metrics.
--web.listen-address=:9991 ...
Addresses on which to expose metrics and web interface. Repeatable for multiple addresses.
--web.config.file="" [EXPERIMENTAL] Path to configuration file that can enable TLS or authentication.
--geo.db="" Path to geoIP database file.
--geo.lang="en" Output language format.
--geo.timeout=2 Timeout in seconds for waiting response from geoIP database API.
--geo.type="" Type of geoIP database: db, url.
--geo.url="https://reallyfreegeoip.org/json/"
URL for geoIP database API.
--metric.hideip Set this flag to hide IPs in the output and therefore drastically reduce the amount of metrics published.
--metric.hideuser Set this flag to hide user accounts in the output and therefore drastically reduce the amount of metrics published.
--log.level=info Only log messages with the given severity or above. One of: [debug, info, warn, error]
--log.format=logfmt Output format of log messages. One of: [logfmt, json]
URL for geoIP database API.
--[no-]metric.hideip Set this flag to hide IPs in the output and therefore drastically reduce the amount of metrics
published.
--[no-]metric.hideuser Set this flag to hide user accounts in the output and therefore drastically reduce the amount of metrics
published.
--log.level=info Only log messages with the given severity or above. One of: [debug, info, warn, error]
--log.format=logfmt Output format of log messages. One of: [logfmt, json]
```

### geoIP
Expand Down

0 comments on commit 93525fd

Please sign in to comment.