Syslog commands

Published: 2018-09-13, Updated: 2023-01-28

Links

...

Mandar logs de um script ou comando para o syslog

echo 'dasda' 2>1 |  logger -t mycmd

Checando logs

tail -n1000 /var/log/syslog | grep "Hello"

Padrao de logs syslog

RFC 3164

<134>2018-06-14T08:07:39+00:00 typerpc-3 alpine-02.1.vj6qhqulxkkojb9uatd3v08ar[1015]: mg 2 - Thu Jun 14 08:07:39 UTC 2018


RFC 5424

<134>1 2018-06-14T08:07:39+00:00 typerpc-3 alpine-02.1.vj6qhqulxkkojb9uatd3v08ar[1015]: mg 2 - Thu Jun 14 08:07:39 UTC 2018

with no STRUCTURED-DATA
<165>1 2003-08-24T05:14:15.000003-07:00 192.0.2.1 myproc 8710 - - %% It's time to make the do-nuts.

with STRUCTURED-DATA
<165>1 2003-10-11T22:14:15.003Z mymachine.example.com evntslog - ID47 [exampleSDID@32473 iut="3" eventSource="Application" eventID="1011"] BOMAn application event log entry...

STRUCTURED-DATA Only
<165>1 2003-10-11T22:14:15.003Z mymachine.example.com evntslog - ID47 [exampleSDID@32473 iut="3" eventSource="Application" eventID="1011"][examplePriority@32473 class="high"]

<$PRI>$VERSION $TIMESTAMP $HOSTNAME $APP_NAME $PROCID $MSGID $STRUCTURED_DATA $MSG

Qualquer campo que nao tiver dados coloque - no lugar

Configurar rsyslog

commands

syslog commands


Duplicity Commands Particionamento / Partitioning No Postgres

Comments