syslog patterndb for cmangos
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
crito aff4a26467 add README.md 10 months ago
applications/cmangos add cmangos patterndb for realmd and mangosd 10 months ago
LICENSE add MIT license file 10 months ago
README.md add README.md 10 months ago

README.md

syslog-ng patterndb

patterndb is a fast method to parse unstructured logs.

validate

pdbtool test --validate /etc/syslog-ng/patterndb.d/cmangos-realmd.pdb
Testing message: program='cmangos-realmd' message='2018-11-20 21:36:39 [AuthChallenge] account FOO tried to login with wrong password from 127.0.0.1'
Testing message: program='cmangos-realmd' message='2018-11-20 21:36:39 [AuthChallenge] account FOO successfully authenticated from 127.0.0.1'
Testing message: program='cmangos-realmd' message='2018-11-20 21:36:39 [AuthChallenge] account FOO is using 'enUS' locale (0) from 127.0.0.1'

pdbtool test --validate /etc/syslog-ng/patterndb.d/cmangos-mangosd.pdb
Testing message: program='cmangos-mangosd' message='2018-11-20 21:36:39 Account: 5 (IP: 127.0.0.1) Delete Character:[Foo] (guid: 1)'
Testing message: program='cmangos-mangosd' message='2018-11-20 21:36:39 Account: 5 (IP: 127.0.0.1) Logout Character:[Foo] (guid: 1)'
Testing message: program='cmangos-mangosd' message='2018-11-20 21:36:39 Account: 5 (IP: 127.0.0.1) Login Character:[Foo] (guid: 1)'
Testing message: program='cmangos-mangosd' message='2018-11-20 21:36:39 Account: 5 (IP: 127.0.0.1) Create Character:[Foo] (guid: 1)'

configure syslog

source s_realmd {
  file("/var/log/cmangos-vanilla/Realmd.log"
  flags(no-parse)
  program-override("cmangos-realmd"));
};

parser p_realmd {
  db_parser(file("/etc/syslog-ng/patterndb.d/cmangos-realmd.pdb"));
};

rewrite r_realmd {
  set("${cmangos.realmd.locale}" value(".SDATA.locale@12345"));
};

log {
  source(s_realmd);
  parser(p_realmd);
  rewrite(r_realmd);
  destination(d_whatever);
};