`enable_syslog=false` does nothing.
- Dominant language
- Go
- Stars
- 30.1k
- Forks
- 4.6k
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 39
Description
I turned off logging via syslog, but it still logs via it
https://developer.hashicorp.com/consul/docs/agent/config/config-files#enable_syslog
It is not clear how to reconfigure logging via files.
config file
```
$ cat /etc/consul.d/consul.hcl
# https://developer.hashicorp.com/consul/docs/agent#configuring-consul-agents
datacenter = "dc1"
data_dir = "/opt/consul/data"
server = true # Agent mode
bootstrap_expect = SERVER_COUNT # Ignored in client mode
retry_join = ["RETRY_JOIN"] # The default value comes from `aws/variables.tf` file
# DNS
domain = "prd.plntr.ca"
# recursors = [ "8.8.8.8" ]
client_addr = "0.0.0.0"
# addresses = { }
bind_addr = "0.0.0.0"
advertise_addr = "IP_ADDRESS"
acl {
enabled = false
default_policy = "allow"
down_policy = "extend-cache"
}
# Logging
# https://developer.hashicorp.com/consul/commands/monitor
enable_debug = true
log_level = "trace"
enable_syslog = false
log_rotate_max_files = 30
log_rotate_duration = "24h"
ui_config {
enabled = true
}
# server_name =
tls {
defaults {
tls_min_version = "TLSv1_3"
# TODO: Improve the SECURITY
}
}
# TODO: Improve the SECURITY
# grpc =
# https =
# internal_rpc =
ports {
dns = 8600
grpc = 8502
# TODO: !SECURITY
# https://developer.hashicorp.com/consul/docs/agent/config/config-files#grpc_tls_port
# grpc_tls = 8503
# http = -1
# https = 8501
}
# Service Mesh related
# https://developer.hashicorp.com/consul/docs/connect/configuration#agent-configuration
connect {
enabled = true
# TODO: Improve the SECURITY
# ca_provider =
}
service {
name = "consul"
}
$ cat /etc/systemd/system/consul.service
[Unit]
Description=Consul Agent
Requires=network-online.target
After=network-online.target
[Service]
Restart=on-failure
Environment=CONSUL_ALLOW_PRIVILEGED_PORTS=true
ExecStart=/usr/local/bin/consul agent -config-dir="/etc/consul.d" -dns-port="8600"
ExecReload=/bin/kill -HUP $MAINPID
KillSignal=SIGTERM
User=root
Group=root
[Install]
WantedBy=multi-user.target
```
Contributor guide
Research direction
Start with the `/etc/consul.d/consul.hcl` configuration and the `/etc/systemd/system/consul.service` entry point, then reproduce the behavior using `consul agent -config-dir="/etc/consul.d"`. Compare the documented `enable_syslog` setting with the agent's logging behavior; done means disabling it either stops syslog output or produces clear documentation of the required configuration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- devops, observability
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100