Skip to content

Instantly share code, notes, and snippets.

@realpdm
Created July 24, 2017 14:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save realpdm/70765ec5fcc4a0c947b09ad2eb37e440 to your computer and use it in GitHub Desktop.
Save realpdm/70765ec5fcc4a0c947b09ad2eb37e440 to your computer and use it in GitHub Desktop.
remove_healthcheck = filter.reject('%<cquup> MATCH /healthcheck')
json_fmt = format {
Format = '{\"chi\":\"%<chi>\",\"chp\":\"%<chp>\",\"hii\":\"%<hii>\",\"caun\":\"%<caun>\",\"cqtn\":\"%<cqtn>\",\"cqhm\":\"%<cqhm>\",\"cquuc\":\"%<cquuc>\",\"cqtx\":\"%<cqtx>\",\"shi\":\"%<shi>\",\"php\":\"%<php>\",\"pqsi\":\"%<pqsi>\",\"pqsp\":\"%<pqsp>\",\"pssc\":\"%<pssc>\",\"pscl\":%<pscl>,\"sssc\":\"%<sssc>\",\"sscl\":%<sscl>,\"cqbl\":%<cqbl>,\"pqbl\":%<pqbl>,\"cqhl\":%<cqhl>,\"pshl\":%<pshl>,\"pqhl\":%<pqhl>,\"sshl\":%<sshl>,\"ttms\":%<ttms>,\"phr\":\"%<phr>\",\"cfsc\":\"%<cfsc>\",\"pfsc\":\"%<pfsc>\",\"crc\":\"%<crc>\",\"cquuh\":\"%<cquuh>\",\"sshcl\":\"%<{Content-Length}ssh>\",\"pshce\":\"%<{Content-Encoding}psh>\",\"cqhcl\":\"%<{Content-Length}cqh>\",\"via\":\"%<{Via}ssh>\"}'
}
log.ascii {
Format = json_fmt,
Filename = 'json.log' ,
Filters = { remove_healthcheck } ,
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment