Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enable_syslog=false does nothing. #20825

Open
EugenKon opened this issue Mar 11, 2024 · 0 comments
Open

enable_syslog=false does nothing. #20825

EugenKon opened this issue Mar 11, 2024 · 0 comments

Comments

@EugenKon
Copy link

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant