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

rsyslog %syslogseverity-text% crit => critical #91

Open
oshamin opened this issue Oct 27, 2016 · 1 comment
Open

rsyslog %syslogseverity-text% crit => critical #91

oshamin opened this issue Oct 27, 2016 · 1 comment
Assignees

Comments

@oshamin
Copy link

oshamin commented Oct 27, 2016

I discovered issue with rsyslog default name for critical severity.
Rsyslog use "crit" (%syslogseverity-text%) priority name for critical events.

But fluent-plugin-google-cloud can not recognize this.

` # Values permitted by the API for 'severity' (which is an enum).
VALID_SEVERITIES = Set.new(
%w(DEFAULT DEBUG INFO NOTICE WARNING ERROR CRITICAL ALERT EMERGENCY))

# Translates other severity strings to one of the valid values above.
SEVERITY_TRANSLATIONS = {
  # log4j levels (both current and obsolete).
  'WARN' => 'WARNING',
  'FATAL' => 'CRITICAL',
  'TRACE' => 'DEBUG',
  'TRACE_INT' => 'DEBUG',
  'FINE' => 'DEBUG',
  'FINER' => 'DEBUG',
  'FINEST' => 'DEBUG',
  # single-letter levels.  Note E->ERROR and D->DEBUG.
  'D' => 'DEBUG',
  'I' => 'INFO',
  'N' => 'NOTICE',
  'W' => 'WARNING',
  'E' => 'ERROR',
  'C' => 'CRITICAL',
  'A' => 'ALERT',
  # other misc. translations.
  'ERR' => 'ERROR',
  'F' => 'CRITICAL'
}

`

Here is my syslogd template:
$template format_local, "%timegenerated:::date-rfc3339% %syslogseverity-text% %msg%\n"

here is cut from log file
2016-10-27T16:36:05.175063+00:00 crit MESSSAGE

As a result, google logs viewer does not mark "crit" events as critical.

@jkohen
Copy link
Contributor

jkohen commented Jul 31, 2019

@igorpeshansky can you triage? On the surface it seems related to #51

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants