This page shows you how to quickly get started with Parseable. You'll start Parseable server in local-store
mode, and then insert and read some sample data using SQL.
Start Parseable
Parseable Docker image is the fastest way to get started. If you don't have the Docker installed already, refer to this doc to install Docker on your machine.
docker run -p 8000:8000 \
-p 8001:8001 \
-p 8002:8002 \
-v /tmp/parseable/data:/parseable/data \
-v /tmp/parseable/staging:/parseable/staging \
-e P_FS_DIR=/parseable/data \
-e P_STAGING_DIR=/parseable/staging \
containers.parseable.com/parseable/parseable:latest \
parseable local-store
Important
Parseable listens on the port 8000. You can access Parseable UI at http://localhost:8000. The default credentials are admin
and admin
.
Ingest log data
You can post log data to the log stream demo
using a POST call to the log stream endpoint.
curl --location --request POST \
'http://localhost:8000/api/v1/ingest' \
--header 'X-P-META-meta1: value1' \
--header 'X-P-TAG-tag1: value1' \
--header 'X-P-Stream: demo' \
--header 'Authorization: Basic YWRtaW46YWRtaW4=' \
--header 'Content-Type: application/json' \
--data-raw '[
{
"id": "434a5f5e-2f5f-11ed-a261-0242ac120002",
"datetime": "2023-01-05T07:20:50.52Z",
"host": "153.10.110.81",
"user-identifier": "Mozilla/5.0 (Windows NT 6.1; Win64; x64) Firefox/64.0",
"method": "PUT",
"status": 500,
"referrer": "http://www.google.com/"
}
]'
Parseable uses log streams to organize log data. Here we posted a sample log data to the log stream demo
, by adding the header X-P-Stream: demo
in the request.
We also added metadata and tags to the log event with X-P-META-
and X-P-TAG-
headers in the request. For example, the below command adds meta1=value1
and tag1=value1
to the log event. It also posts a sample log data to the log stream demo
.
Metadata is primarily used for defining extra information for a log event, while tags are used for organizing events. For example, severity=warn
and severity=error
are good examples of metadata, while environment=prod
and environment=dev
are good examples of tags.
Query log data
To query the data via Console, login at http://localhost:8000 and select the log stream demo
and correct time stamp.
For complete Parseable API documentation, refer to Parseable API Ref Docs.