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

Problem: nginx logs settings need improve when using syslog #328

Open
mamedin opened this issue Mar 17, 2021 · 1 comment
Open

Problem: nginx logs settings need improve when using syslog #328

mamedin opened this issue Mar 17, 2021 · 1 comment
Assignees
Labels
Status: in progress Issue that is currently being worked on. Waffle label. Type: enhancement

Comments

@mamedin
Copy link
Contributor

mamedin commented Mar 17, 2021

The current behavior adds to nginx files when archivematica_src_syslog_enabled=true :

    {% if archivematica_src_syslog_enabled|bool %}
    error_log syslog:server={{ archivematica_src_syslog_server }},tag=dashboard info;
    access_log syslog:server={{ archivematica_src_syslog_server }},tag=dashboard combined;
    {% endif %}

    {% if archivematica_src_syslog_enabled|bool %}
    error_log syslog:server={{ archivematica_src_syslog_server }},tag=storage info;
    access_log syslog:server={{ archivematica_src_syslog_server }},tag=storage combined;
    {% endif %}

There's no way to difference from rsyslog when the message is error or access because they are using same programname and severity (info).

We should add more variables, to make configurable:

  • programname
  • severity
  • log_format
  • don't use syslog with nginx
  • etc
@mamedin
Copy link
Contributor Author

mamedin commented Mar 17, 2021

rsyslog config file example when severity=error for error_log and severity=info for access_log:

root@archivematica-stage:/etc/rsyslog.d# cat nginx-archivematica.conf
#Create templates
$template NGINXAMLOG,"/mnt/admin/logs/nginx-archivematica/%$YEAR%/%$MONTH%/%$DAY%/%programname%-access.log"
$template NGINXAMLOGERROR,"/mnt/admin/logs/nginx-archivematica/%$YEAR%/%$MONTH%/%$DAY%/%programname%-error.log"

if (re_match($programname, '(dashboard|storage)') and $syslogseverity-text == 'error') then {
  ?NGINXAMLOGERROR
  stop
}

if (re_match($programname, '(dashboard|storage)')) then {
  ?NGINXAMLOG
  stop
}

@mamedin mamedin self-assigned this Mar 17, 2021
@sevein sevein added the Status: refining The issue needs additional details to ensure that requirements are clear. Waffle label. label Mar 18, 2021
@sromkey sromkey added this to the 1.13 milestone Mar 19, 2021
@sevein sevein modified the milestones: 1.13, 1.13.0 Mar 22, 2021
@sevein sevein added Status: in progress Issue that is currently being worked on. Waffle label. and removed Status: refining The issue needs additional details to ensure that requirements are clear. Waffle label. labels May 13, 2021
@sevein sevein self-assigned this May 13, 2021
@sevein sevein added Status: ready The issue is sufficiently described/scoped to be picked up by a developer. Waffle label. and removed Status: in progress Issue that is currently being worked on. Waffle label. labels May 21, 2021
@sevein sevein added Status: in progress Issue that is currently being worked on. Waffle label. and removed Status: ready The issue is sufficiently described/scoped to be picked up by a developer. Waffle label. labels Jun 23, 2021
@sromkey sromkey modified the milestones: 1.13.0, 1.13.1 Sep 20, 2021
@sevein sevein added Status: ready The issue is sufficiently described/scoped to be picked up by a developer. Waffle label. and removed Status: in progress Issue that is currently being worked on. Waffle label. labels Sep 28, 2021
@replaceafill replaceafill added Status: in progress Issue that is currently being worked on. Waffle label. and removed Status: ready The issue is sufficiently described/scoped to be picked up by a developer. Waffle label. labels Oct 13, 2021
@sevein sevein removed this from the 1.13.1 milestone Oct 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: in progress Issue that is currently being worked on. Waffle label. Type: enhancement
Projects
None yet
Development

No branches or pull requests

4 participants