|
postgresql 11 как добавить логи субд в syslog
|
|||
---|---|---|---|
#18+
День добрый! Имею субд postgresql 11 подскажите как добавить логи в syslog ? Нашёл конфигурационный файл rsyslog.conf Что тут нужно добавить чтобы собирать лог postgresql который лежит тут /home/postgresql/data/log/ ? В этой директории лежат файлы лога по дням недели в количестве 7 штук ... |
|||
:
Нравится:
Не нравится:
|
|||
21.11.2019, 11:35 |
|
postgresql 11 как добавить логи субд в syslog
|
|||
---|---|---|---|
#18+
alltox, чтобы логи постгреса были в syslog, надо править конфиг постгреса (в postgresql.conf поставить log_destination= syslog, ну и syslog_facility = 'LOCAL0' #syslog_ident = 'postgres' #syslog_sequence_numbers = on #syslog_split_messages = on тоже можно настроить) ... |
|||
:
Нравится:
Не нравится:
|
|||
21.11.2019, 14:28 |
|
postgresql 11 как добавить логи субд в syslog
|
|||
---|---|---|---|
#18+
Morruth, а почему #syslog_ident = 'postgres' #syslog_sequence_numbers = on #syslog_split_messages = on закоментил эти параметры? ... |
|||
:
Нравится:
Не нравится:
|
|||
22.11.2019, 05:35 |
|
postgresql 11 как добавить логи субд в syslog
|
|||
---|---|---|---|
#18+
сделал вот так #------------------------------------------------------------------------------ # REPORTING AND LOGGING #------------------------------------------------------------------------------ # - Where to Log - log_destination = 'syslog' # Valid values are combinations of # stderr, csvlog, syslog, and eventlog, # depending on platform. csvlog # requires logging_collector to be on. # This is used when logging to stderr: logging_collector = on # Enable capturing of stderr and csvlog # into log files. Required to be on for # csvlogs. # (change requires restart) # These are only used if logging_collector is on: log_directory = 'log' # directory where log files are written, # can be absolute or relative to PGDATA log_filename = 'postgresql-%a.log' # log file name pattern, # can include strftime() escapes #log_file_mode = 0600 # creation mode for log files, # begin with 0 to use octal notation log_truncate_on_rotation = on # If on, an existing log file with the # same name as the new log file will be # truncated rather than appended to. # But such truncation only occurs on # time-driven rotation, not on restarts # or size-driven rotation. Default is # off, meaning append to existing files # in all cases. log_rotation_age = 1d # Automatic rotation of logfiles will # happen after that time. 0 disables. log_rotation_size = 0 # Automatic rotation of logfiles will # happen after that much log output. # 0 disables. # These are relevant when logging to syslog: syslog_facility = 'LOCAL0' #syslog_ident = 'postgres' #syslog_sequence_numbers = on #syslog_split_messages = on верно? ... |
|||
:
Нравится:
Не нравится:
|
|||
22.11.2019, 06:00 |
|
|
start [/forum/topic.php?fid=53&msg=39892647&tid=1994927]: |
0ms |
get settings: |
11ms |
get forum list: |
13ms |
check forum access: |
4ms |
check topic access: |
4ms |
track hit: |
35ms |
get topic data: |
12ms |
get forum data: |
3ms |
get page messages: |
37ms |
get tp. blocked users: |
1ms |
others: | 17ms |
total: | 137ms |
0 / 0 |