Skip to main content

Docker Quick Start

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.

Create a log stream

Parseable uses log streams to organize log data. You can create a log stream with a PUT call to the log stream endpoint. For example, the below command creates a log stream called demo (note the demo in the URL).

curl --location --request PUT \
'http://localhost:8000/api/v1/logstream/demo' \
--header 'Authorization: Basic YWRtaW46YWRtaW4='

Ingest log data

You can post log data to the log stream demo using a POST call to the log stream endpoint.

Add Metadata and Tags

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.

To add metadata and tags to a log event, add X-P-META- and X-P-TAG- headers to 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.

curl --location --request POST \
'http://localhost:8000/api/v1/logstream/demo' \
--header 'X-P-META-meta1: value1' \
--header 'X-P-TAG-tag1: value1' \
--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/"
}
]'

Query log data

You can query the data via the Parseable Console or API. To query the data via UI, login at http://localhost:8000 and select the log stream demo and correct time stamp.

To query the data via API, use the command given below. Before using the command make sure to update the startTime and endTime fields with the correct time in UTC.

curl --location --request POST 'http://localhost:8000/api/v1/query' \
--header 'Authorization: Basic YWRtaW46YWRtaW4=' \
--header 'Content-Type: application/json' \
--data-raw '{
"query": "select * from demo",
"startTime": "2022-09-10T08:20:00+00:00",
"endTime": "2022-09-10T08:20:31+00:00"
}'

For complete Parseable API documentation, refer to Parseable API Ref Docs.

Get Updates from Parseable

Subscribe to keep up with latest news, updates and new features on Parseable