mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-07-15 01:24:29 +02:00
add schema docs
This commit is contained in:
@ -33,7 +33,25 @@ Usage (module):
|
|||||||
Schema:
|
Schema:
|
||||||
|
|
||||||
{
|
{
|
||||||
"foo": string,
|
"priority": integer,
|
||||||
|
"version": integer,
|
||||||
|
"timestamp": string,
|
||||||
|
"timestamp_epoch": integer, # [0]
|
||||||
|
"timestamp_epoch_utc": integer, # [1]
|
||||||
|
"hostname": string,
|
||||||
|
"appname": string,
|
||||||
|
"proc_id": integer,
|
||||||
|
"msg_id": string,
|
||||||
|
"structured_data": [
|
||||||
|
{
|
||||||
|
"identity": string,
|
||||||
|
"parameters": {
|
||||||
|
"<key>": string
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"message": string,
|
||||||
|
"unparsable": string # [2]
|
||||||
|
|
||||||
# below object only exists if using -qq or ignore_exceptions=True
|
# below object only exists if using -qq or ignore_exceptions=True
|
||||||
"_jc_meta": {
|
"_jc_meta": {
|
||||||
@ -43,6 +61,11 @@ Schema:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[0] naive timestamp if "timestamp" field is parsable, else null
|
||||||
|
[1] timezone aware timestamp availabe for UTC, else null
|
||||||
|
[2] this field exists if the syslog line is not parsable. The value
|
||||||
|
is the original syslog line.
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
$ cat syslog.txt | jc --syslog-s -p
|
$ cat syslog.txt | jc --syslog-s -p
|
||||||
|
@ -28,7 +28,25 @@ Usage (module):
|
|||||||
Schema:
|
Schema:
|
||||||
|
|
||||||
{
|
{
|
||||||
"foo": string,
|
"priority": integer,
|
||||||
|
"version": integer,
|
||||||
|
"timestamp": string,
|
||||||
|
"timestamp_epoch": integer, # [0]
|
||||||
|
"timestamp_epoch_utc": integer, # [1]
|
||||||
|
"hostname": string,
|
||||||
|
"appname": string,
|
||||||
|
"proc_id": integer,
|
||||||
|
"msg_id": string,
|
||||||
|
"structured_data": [
|
||||||
|
{
|
||||||
|
"identity": string,
|
||||||
|
"parameters": {
|
||||||
|
"<key>": string
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"message": string,
|
||||||
|
"unparsable": string # [2]
|
||||||
|
|
||||||
# below object only exists if using -qq or ignore_exceptions=True
|
# below object only exists if using -qq or ignore_exceptions=True
|
||||||
"_jc_meta": {
|
"_jc_meta": {
|
||||||
@ -38,6 +56,11 @@ Schema:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[0] naive timestamp if "timestamp" field is parsable, else null
|
||||||
|
[1] timezone aware timestamp availabe for UTC, else null
|
||||||
|
[2] this field exists if the syslog line is not parsable. The value
|
||||||
|
is the original syslog line.
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
$ cat syslog.txt | jc --syslog-s -p
|
$ cat syslog.txt | jc --syslog-s -p
|
||||||
|
Reference in New Issue
Block a user