Skip to content

Commit

Permalink
update for detect schema sample body
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhilsinhaparseable committed Oct 27, 2024
1 parent d823ee5 commit a1264f1
Showing 1 changed file with 8 additions and 176 deletions.
184 changes: 8 additions & 176 deletions model.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,179 +133,7 @@ const SchemaPayload string = `{
}`

const SampleJson string = `
[
{
"device_id": 1855,
"host": "192.168.1.100",
"level": "error",
"message": "Application started",
"os": "macOS",
"p_metadata": "containername=log-generator^namespace=go-apasdp^host=10.116.0.3^source=quest-test^podlabels=app=go-app,pod-template-hash=6c87bc9cc9^containerimage=ghcr.io/parseablehq/quest",
"p_tags": "",
"p_timestamp": "2024-10-27T05:13:26.744",
"process_id": 279,
"response_time": 34,
"session_id": "xyz",
"source_time": "2024-10-27T05:13:26.743",
"status_code": 400,
"timezone": "qtv",
"user_id": 46008,
"uuid": "8d01b3cb-825a-4988-92db-96b5493db772",
"version": "1.2.0"
},
{
"device_id": 4499,
"host": "192.168.1.100",
"level": "info",
"message": "Application started",
"os": "Linux",
"p_metadata": "containername=log-generator^namespace=go-apasdp^host=10.116.0.3^source=quest-test^podlabels=app=go-app,pod-template-hash=6c87bc9cc9^containerimage=ghcr.io/parseablehq/quest",
"p_tags": "",
"p_timestamp": "2024-10-27T05:13:26.744",
"request_body": "npcftnmxcdrydlsvcwotlzbokmqwacnoitaezoddrvmtzeszjdpliukklzoxdkewimglolofpdedyutvsaobebojjokzflcdmlvu",
"response_time": 34,
"runtime": "bfa",
"session_id": "abc",
"source_time": "2024-10-27T05:13:26.743",
"timezone": "hzr",
"user_id": 76351,
"uuid": "cf33d641-ffab-4523-989c-58dd02a011b7",
"version": "1.0.0"
},
{
"device_id": 2733,
"host": "192.168.1.100",
"level": "info",
"message": "Application started",
"os": "Linux",
"p_metadata": "containername=log-generator^namespace=go-apasdp^host=10.116.0.3^source=quest-test^podlabels=app=go-app,pod-template-hash=6c87bc9cc9^containerimage=ghcr.io/parseablehq/quest",
"p_tags": "",
"p_timestamp": "2024-10-27T05:13:26.744",
"process_id": 975,
"session_id": "pqr",
"source_time": "2024-10-27T05:13:26.743",
"status_code": 500,
"timezone": "cut",
"user_agent": "PineApple",
"user_id": 69023,
"uuid": "2daf065d-ecff-4a3e-a5e1-7b4a9e404bc1",
"version": "1.1.0"
},
{
"device_id": 150,
"host": "112.168.1.110",
"level": "error",
"location": "wukxvqjlqdxjjpvy",
"message": "Application is failing",
"os": "Windows",
"p_metadata": "containername=log-generator^namespace=go-apasdp^host=10.116.0.3^source=quest-test^podlabels=app=go-app,pod-template-hash=6c87bc9cc9^containerimage=ghcr.io/parseablehq/quest",
"p_tags": "",
"p_timestamp": "2024-10-27T05:13:26.744",
"request_body": "jrdjsnssrmemqdphdabrmukpsguddyifqthxockkaqxccainkyywqohuefynnxlofpgvdsoijnqavipzbkcoxegfurbxehsbnftc",
"response_time": 22,
"session_id": "pqr",
"source_time": "2024-10-27T05:13:26.742",
"timezone": "wxu",
"user_id": 88506,
"uuid": "050a043a-83f3-4f2a-81be-8d7b68f081e9",
"version": "1.2.0"
},
{
"device_id": 4489,
"host": "112.168.1.110",
"level": "warn",
"location": "vnudttwllunegitb",
"message": "Logging a request",
"os": "Windows",
"p_metadata": "containername=log-generator^namespace=go-apasdp^host=10.116.0.3^source=quest-test^podlabels=app=go-app,pod-template-hash=6c87bc9cc9^containerimage=ghcr.io/parseablehq/quest",
"p_tags": "",
"p_timestamp": "2024-10-27T05:13:26.744",
"process_id": 258,
"runtime": "nsz",
"session_id": "xyz",
"source_time": "2024-10-27T05:13:26.742",
"user_agent": "PearOS",
"user_id": 87865,
"uuid": "9f33b8e3-b875-4736-8c86-355a5dfc95a0",
"version": "1.1.0"
},
{
"device_id": 780,
"host": "112.168.1.110",
"level": "info",
"message": "Application started",
"os": "Linux",
"p_metadata": "containername=log-generator^namespace=go-apasdp^host=10.116.0.3^source=quest-test^podlabels=app=go-app,pod-template-hash=6c87bc9cc9^containerimage=ghcr.io/parseablehq/quest",
"p_tags": "",
"p_timestamp": "2024-10-27T05:13:26.744",
"process_id": 365,
"response_time": 34,
"runtime": "qld",
"session_id": "xyz",
"source_time": "2024-10-27T05:13:26.742",
"status_code": 200,
"user_id": 71218,
"uuid": "54438529-5ad1-480f-b44b-f871e96afd39",
"version": "1.0.0"
},
{
"device_id": 2772,
"host": "112.168.1.110",
"level": "warn",
"message": "Logging a request",
"os": "macOS",
"p_metadata": "containername=log-generator^namespace=go-apasdp^host=10.116.0.3^source=quest-test^podlabels=app=go-app,pod-template-hash=6c87bc9cc9^containerimage=ghcr.io/parseablehq/quest",
"p_tags": "",
"p_timestamp": "2024-10-27T05:13:26.744",
"process_id": 885,
"request_body": "wuoaqbuldmizuoxtjcohvytpjgcfkgrvqjmipzlhespctmmmmxszpjeadpurgeiifgcryqzqjxngohdyssxfkqzmyftqtlwikkrp",
"session_id": "pqr",
"source_time": "2024-10-27T05:13:26.742",
"timezone": "nhw",
"user_agent": "OrangeOS",
"user_id": 83057,
"uuid": "a93337df-0ca4-4d46-9b94-7a4ea3490a27",
"version": "1.0.0"
},
{
"device_id": 2925,
"host": "112.168.1.110",
"level": "warn",
"message": "Logging a request",
"os": "Linux",
"p_metadata": "containername=log-generator^namespace=go-apasdp^host=10.116.0.3^source=quest-test^podlabels=app=go-app,pod-template-hash=6c87bc9cc9^containerimage=ghcr.io/parseablehq/quest",
"p_tags": "",
"p_timestamp": "2024-10-27T05:13:26.744",
"process_id": 563,
"request_body": "dihfniynpucmgxhcknzxazlqbglzoygxmdpnnaabfgksxnirzwaojampaobiqxbcolgutjyvyuffkasvwqvtmazlzxdstjhszztf",
"response_time": 70,
"session_id": "abc",
"source_time": "2024-10-27T05:13:26.742",
"timezone": "ftj",
"user_id": 57348,
"uuid": "b816bf5d-3d26-4a9e-a7ae-51aac1662e06",
"version": "1.2.0"
},
{
"app_meta": "qraspufqzwdvgafcmcmxkqmp",
"device_id": 1627,
"host": "172.162.1.120",
"level": "error",
"message": "Application started",
"os": "Windows",
"p_metadata": "containername=log-generator^namespace=go-apasdp^host=10.116.0.3^source=quest-test^podlabels=app=go-app,pod-template-hash=6c87bc9cc9^containerimage=ghcr.io/parseablehq/quest",
"p_tags": "",
"p_timestamp": "2024-10-27T05:13:26.744",
"runtime": "ptp",
"session_id": "xyz",
"source_time": "2024-10-27T05:13:26.742",
"timezone": "tol",
"user_agent": "OrangeOS",
"user_id": 94706,
"uuid": "10048586-da52-41fb-889b-54a377ab6a9f",
"version": "1.2.0"
},
{
{
"app_meta": "bkfmqbmmjzbhkxdjzzlaebqp",
"device_id": 42,
"host": "112.168.1.110",
Expand All @@ -315,16 +143,20 @@ const SampleJson string = `
"os": "Linux",
"p_metadata": "containername=log-generator^namespace=go-apasdp^host=10.116.0.3^source=quest-test^podlabels=app=go-app,pod-template-hash=6c87bc9cc9^containerimage=ghcr.io/parseablehq/quest",
"p_tags": "",
"p_timestamp": "2024-10-27T05:13:26.744",
"p_timestamp": "2024-10-27T05:13:26.744Z",
"process_id": 123,
"request_body": "ffywhsbtsgvraxjuixlsxtrgotcahkicyxnaermtqmfgzlwbqkxqmonrwojmawsyxsovcjlbkbvjsesfznpukicdtghnvvirtauo",
"response_time": 100,
"runtime": "qld",
"session_id": "pqr",
"source_time": "2024-10-27T05:13:26.742",
"source_time": "2024-10-27T05:13:26.742Z",
"status_code": 300,
"timezone": "ftj",
"user_agent":"OrangeOS",
"user_id": 72278,
"uuid": "d679e104-778d-4bbe-b9b6-e6f2b48922ad",
"version": "1.1.0"
}
]
`

const FlogJsonSchema string = `{
Expand Down

0 comments on commit a1264f1

Please sign in to comment.