Skip to content

Commit

Permalink
add promtail reload changelog and doc (#7386)
Browse files Browse the repository at this point in the history
  • Loading branch information
liguozhong authored Oct 11, 2022
1 parent 74d206b commit fdbb06d
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@

##### Enhancements

* [7247](https://github.com/grafana/loki/pull/7247) **liguozhong**: Add config reload endpoint / signal to promtail.
* [6708](https://github.com/grafana/loki/pull/6708) **DylanGuedes**: Add compressed files support to Promtail.
* [5977](https://github.com/grafana/loki/pull/5977) **juissi-t** lambda-promtail: Add support for Kinesis data stream events
* [6828](https://github.com/grafana/loki/pull/6828) **alexandre1984rj** Add the BotScore and BotScoreSrc fields once the Cloudflare API returns those two fields on the list of all available log fields.
Expand Down
2 changes: 1 addition & 1 deletion clients/pkg/promtail/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func (cfg *Config) RegisterFlagsWithPrefix(prefix string, f *flag.FlagSet) {
cfg.Config.RegisterFlags(f)

f.BoolVar(&cfg.Disable, prefix+"server.disable", false, "Disable the http and grpc server.")
f.BoolVar(&cfg.Reload, prefix+"server.reload", false, "Enable reload via HTTP request.")
f.BoolVar(&cfg.Reload, prefix+"server.enable-runtime-reload", false, "Enable reload via HTTP request.")
}

// RegisterFlags adds the flags required to config this to the given FlagSet
Expand Down
3 changes: 3 additions & 0 deletions docs/sources/clients/promtail/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,9 @@ The `server` block configures Promtail's behavior as an HTTP server:
# Target managers check flag for Promtail readiness, if set to false the check is ignored
[health_check_target: <bool> | default = true]
# Enable reload via HTTP request.
[enable_runtime_reload: <bool> | default = false]
```

## clients
Expand Down
7 changes: 7 additions & 0 deletions docs/sources/configuration/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ is especially useful in making sure your config files and flags are being read a
`-log-config-reverse-order` is the flag we run Loki with in all our environments, the config entries are reversed so
that the order of configs reads correctly top to bottom when viewed in Grafana's Explore.

## Reload At Runtime

Promtail can reload its configuration at runtime. If the new configuration
is not well-formed, the changes will not be applied.
A configuration reload is triggered by sending a `SIGHUP` to the Promtail process or
sending a HTTP POST request to the `/reload` endpoint (when the `--server.enable-runtime-reload` flag is enabled).

## Configuration File Reference

To specify which configuration file to load, pass the `-config.file` flag at the
Expand Down

0 comments on commit fdbb06d

Please sign in to comment.