# Axiom documentation --- # Changelog Source: https://axiom.co/docs/changelog Axiom ships continuously. Read the latest release notes on the [Axiom changelog](https://axiom.co/changelog). This section will become the first-party home for product updates as the changelog publishing workflow moves into the documentation platform. --- # Quickstart Source: https://axiom.co/docs/getting-started This guide takes you from foundational knowledge to advanced proficiency with Axiom. The sections are structured to build upon one another but can also serve as standalone references. By the end, you can independently query data, diagnose performance, derive insights, and set up proactive alerting. ## Axiom fundamentals [#axiom-fundamentals] Axiom is the modern machine data platform. Machine data is any record a system produces: logs, distributed traces, metrics, and events like product analytics, marketing attribution, or security audit trails. Axiom stores and queries all of it through one engine. **Datasets** store related machine data, similar to a table in a traditional database. For example, the Axiom Playground includes datasets like `sample-http-logs` for HTTP request logs and `github-push-event` for GitHub activity. **Fields** are named pieces of data on each record, like columns in a spreadsheet. Fields have a name (for example, `status`, `resp_body_size_bytes`, `geo.city`) and a value. Axiom supports various data types including strings, numbers, booleans, and complex JSON objects. * **Single dataset:** Use one dataset when events share many common fields and you often query them together. * **Multiple datasets:** Split into multiple datasets when the data is structurally different or serves entirely different use cases. This prevents a single dataset from accumulating fields that are only relevant to a small subset of its events. ## Send data to Axiom [#send-data-to-axiom] You can send your first event with a single HTTP request: ```shell wrap curl -X 'POST' 'https://AXIOM_DOMAIN/v1/ingest/DATASET_NAME' \ -H 'Authorization: Bearer API_TOKEN' \ -H 'Content-Type: application/x-ndjson' \ -d '{ "http": { "request": { "method": "GET", "duration_ms": 231 }, "response": { "body": { "size": 3012 } } }, "url": { "path": "/download" } }' ``` To send events continuously, Axiom supports a wide range of tools and libraries: * **[OpenTelemetry](/send-data/opentelemetry)** for industry-standard instrumentation of traces, logs, and metrics. * **[Axiom API](/restapi/ingest)** for direct HTTP ingestion from any language or platform. * **Language libraries** for [JavaScript](/guides/javascript), [Python](/guides/python), [Go](/guides/go), [Rust](/guides/rust), [.NET](/guides/send-logs-from-dotnet), and more. * **Log shippers** like [Vector](/send-data/vector), [Fluent Bit](/send-data/fluent-bit), and [Logstash](/send-data/logstash). * **Platform integrations** for [AWS](/send-data/cloudwatch), [Kubernetes](/send-data/kubernetes), [Vercel](/apps/vercel), and [Cloudflare Logpush](/apps/cloudflare-logpush). For the full list, see [Methods for sending data](/send-data/methods). ## Explore your data [#explore-your-data] Start by identifying the correct dataset in the [Datasets tab](https://app.axiom.co/datasets). You can explore the fields within a dataset to find relevant information. For example, in `sample-http-logs` you might look at `resp_header_size_bytes` (response size), `status` (HTTP status code), and `geo.country` (geographic origin). Pay attention to field data types. A field stored as a number behaves differently than one stored as a string. The schema view in the Datasets tab shows the type for each field. ## Build your first queries [#build-your-first-queries] You typically interact with this data by creating queries using one of the following interfaces: * **[Builder](/query-data/explore):** A point-and-click interface that helps you build filters and aggregations without writing code. It's excellent for simple, quick-look analyses. * **[Editor](/query-data/query-editor)**: An interface where you can write queries using powerful, text-based query languages for sophisticated analysis. Use [APL (Axiom Processing Language)](/apl/introduction) for logs, traces, and events, and [MPL (Metrics Processing Language)](/mpl/introduction) for metrics. * **[Axiom API](/restapi/query)**: Query your data programmatically. * **[AI-assisted query building](/query-data/query-editor#generate-query-using-natural-language)**: Generate APL queries from natural language descriptions after pressing Cmd+K (macOS) or Ctrl+K (Windows/Linux) in the Query tab. * **[MCP Server](/console/intelligence/mcp-server) and [Skills](/console/intelligence/skills)**: Enable AI agents to query your data. Agents without an existing organization can [provision their own temporary organization](/console/intelligence/agent-created-orgs). An APL query starts with a data source, followed by operators connected by the pipe `|` character. Each pipe takes the output of the previous line and uses it as input for the next, allowing you to chain operations. A common pattern is dataset, filter (`where`), transform (`extend`), analyze (`summarize`). This example counts distinct users per day, grouped by HTTP method: ```kusto ['sample-http-logs'] | summarize dcount(id) by bin(_time, 1d), method ``` [Run in Playground](https://play.axiom.co/axiom-play-qf1k/query?initForm=%7B%22apl%22%3A%22%5B'sample-http-logs'%5D%5Cn%7C%20summarize%20dcount\(id\)%20by%20bin\(_time%2C%201d\)%2C%20method%22%2C%22queryOptions%22%3A%7B%22quickRange%22%3A%2230d%22%7D%7D) * `['sample-http-logs']` selects the dataset. * `|` passes the data to the next operator. * `summarize` groups rows that share values in the `by` clause. * `dcount(id)` calculates the distinct count of the `id` field. This is a probabilistic function that provides a highly accurate approximation and runs faster than an exact count. * `by bin(_time, 1d), method` groups by time binned into 1-day intervals and by HTTP method. * Start with Builder to understand the basic structure of a query, then switch to Editor to refine it. * Use the AI assistant as a learning tool. Generate a query and then study its structure to understand the APL. * Use the `where` operator early to narrow down events. This is important for performance. * Review your team's saved queries in Axiom to learn from real-world examples. * The full list of functions and operators is available in the [Query reference](/apl/overview). ## Set up monitors [#set-up-monitors] [Monitors](/monitor-data/monitors) run queries on a schedule and trigger notifications when conditions are met. This moves you from reactive investigation to proactive awareness. * **[Threshold monitors](/monitor-data/threshold-monitors)** trigger when an aggregated value crosses a threshold (for example, error counts above 100 in 5 minutes). This is the most common type. * **[Match monitors](/monitor-data/match-monitors)** trigger for each individual event that matches a specific pattern (for example, a critical error message). Use these sparingly for high-volume events. * **[Anomaly monitors](/monitor-data/anomaly-monitors)** use machine learning to detect unexpected deviations from a historical baseline, without a static threshold. This example creates a threshold monitor to get a notification if the number of server errors exceeds a threshold. 1. Write and test the query: ```kusto ['sample-http-logs'] | where status >= 500 | summarize error_count = count() ``` 2. Go to **Monitors** tab and create a new threshold monitor. 3. Paste your query and set the trigger condition, for example, `When error_count is above 50`. 4. Set the schedule, for example, evaluate every 5 minutes. 5. Select or create a [notifier](/monitor-data/notifiers-overview) (Slack, PagerDuty, email, and more). * Customize the notifier description to include important context such as a link to a relevant dashboard. * Avoid creating match monitors on high-volume logs without specific filters. This can lead to excessive notifications. ## Build dashboards [#build-dashboards] [Dashboards](/dashboards/create) are collections of saved queries visualized as charts, tables, and other elements. They provide a single view for monitoring a service, tracking an experiment, or sharing key metrics. This example creates a dashboard to monitor HTTP request performance. **Element 1: P75 and P95 latency (time series)** This query calculates the 75th and 95th percentiles of request duration and displays them as a time series. ```kusto ['sample-http-logs'] | summarize P75 = percentile(req_duration_ms, 75), P95 = percentile(req_duration_ms, 95) by bin_auto(_time) ``` [Run in Playground](https://play.axiom.co/axiom-play-qf1k/query?initForm=%7B%22apl%22%3A%22%5B'sample-http-logs'%5D%5Cn%7C%20summarize%5Cn%20%20%20%20P75%20%3D%20percentile\(req_duration_ms%2C%2075\)%2C%5Cn%20%20%20%20P95%20%3D%20percentile\(req_duration_ms%2C%2095\)%5Cn%20%20by%20bin_auto\(_time\)%22%2C%22queryOptions%22%3A%7B%22quickRange%22%3A%2230d%22%7D%7D) **Element 2: Requests by country (table)** This query counts the number of requests by country and displays them as a table. ```kusto ['sample-http-logs'] | summarize request_count = count() by ['geo.country'] | sort by request_count desc ``` [Run in Playground](https://play.axiom.co/axiom-play-qf1k/query?initForm=%7B%22apl%22%3A%22%5B'sample-http-logs'%5D%5Cn%7C%20summarize%20request_count%20%3D%20count\(\)%20by%20%5B'geo.country'%5D%5Cn%7C%20sort%20by%20request_count%20desc%22%2C%22queryOptions%22%3A%7B%22quickRange%22%3A%2230d%22%7D%7D) **Element 3: Total distinct users (statistic)** This query counts the number of distinct users and displays them as a statistic. ```kusto ['sample-http-logs'] | summarize dcount(id) ``` [Run in Playground](https://play.axiom.co/axiom-play-qf1k/query?initForm=%7B%22apl%22%3A%22%5B'sample-http-logs'%5D%5Cn%7C%20summarize%20dcount\(id\)%22%2C%22queryOptions%22%3A%7B%22quickRange%22%3A%2230d%22%7D%7D) * Give dashboards and their elements clear, descriptive names. * Use dashboard filters to allow viewers to slice data by dimensions like region, status code, or service. * Avoid cluttering a single dashboard with unrelated metrics. Create separate dashboards for different use cases. ## What's next [#whats-next] * [APL introduction](/apl/introduction) for the full query language reference. * [Sample queries](/apl/tutorial) for real-world APL examples you can run in the Playground. * [Send data to Axiom](/send-data/methods) to connect your own data sources. * [Monitor examples](/monitor-data/monitor-examples) for more alerting patterns. --- # What is Axiom? Source: https://axiom.co/docs/introduction Axiom is a data platform designed to efficiently collect, store, and analyze event and telemetry data at massive scale. At its core, Axiom combines a high-performance, proprietary data store with an intelligent Console, helping teams reach actionable insights from their data faster. Trusted by 30,000+ organizations, from high-growth startups to global enterprises. ## Components [#components] Axiom consists of two purpose-built data stores supported by a unified console experience: ### EventDB [#eventdb] Robust, cost-effective, and scalable datastore specifically optimized for timestamped event data. Built from the ground up to handle the vast volumes and high velocity of event ingestion, EventDB ensures: * **Scalable data loading:** Events are ingested seamlessly without complex middleware, scaling linearly with no single points of failure. * **Extreme compression:** Tuned storage format compresses data 25-50x, significantly reducing storage costs and ensuring data remains queryable at any time. * **Serverless querying:** Axiom spins up ephemeral, serverless runtimes on-demand to execute queries efficiently, minimizing idle compute resources and costs. ### MetricsDB [#metricsdb] Dedicated metrics datastore engineered specifically for high-cardinality time-series data. Unlike traditional metrics solutions that penalize you for dimensional complexity, MetricsDB embraces high-cardinality tags as a design principle: * **High-cardinality native:** Store metrics with high-cardinality dimensional tags without performance degradation or cost penalties. * **Optimized storage:** Purpose-built storage format designed for time-series workloads delivers efficient compression and fast aggregations across millions of unique tag combinations. * **Thoughtful constraints:** Design choices prioritize the most common metrics use cases while maintaining exceptional performance. For more information, see [Axiom’s architecture](/platform-overview/architecture). ### Console [#console] Intuitive web app built for exploration, visualization, and monitoring of your data. * **Real-time exploration:** Effortlessly query and visualize data streams in real-time, providing instant clarity on operational and business conditions. * **Dynamic visualizations:** Generate insightful visualizations, from straightforward counts to sophisticated aggregations, tailored specifically to your needs. * **Robust monitoring:** Set up threshold-based and anomaly driven alerts, ensuring proactive visibility into potential issues. ## Why choose Axiom? [#why-choose-axiom] * **Cost-efficiency:** Axiom dramatically lowers data ingestion and storage costs compared to traditional observability and logging solutions. * **Flexible insights:** Real-time query capabilities and an increasingly intelligent UI help pinpoint issues and opportunities without sampling. * **One platform, many use cases:** Use Axiom for observability (logs, metrics, traces), LLM observability, product analytics, and any other machine data workload. ## Getting started [#getting-started] * [Learn more about Axiom’s features](/platform-overview/features). * [Explore the interactive demo playground](https://play.axiom.co/). * [Create your own organization](https://app.axiom.co/register). * Building with AI agents? Agents can [provision their own temporary organization](/console/intelligence/agent-created-orgs) with a single API request. --- # API limits Source: https://axiom.co/docs/restapi/api-limits Axiom limits the number of calls a user (and their organization) can make over a certain period of time to ensure fair usage and to maintain the quality of service for everyone. Axiom systems closely monitor API usage and if a user exceeds any thresholds, Axiom temporarily halts further processing of requests from that user (and/or organization). This is to prevent any single user or app from overloading the system, which could potentially impact other users' experience. ## Rate Limits [#rate-limits] Rate limits vary and are specified by the following header in all responses: | Header | Description | | ----------------------- | ----------------------------------------------------------------------------------------------------------------------- | | `X-RateLimit-Scope` | Indicates if the limits counts against the organisation or personal rate limit. | | `X-RateLimit-Limit` | The maximum number of requests a user is permitted to make per minute. | | `X-RateLimit-Remaining` | The number of requests remaining in the current rate limit window. | | `X-RateLimit-Reset` | The time at which the current rate limit window resets in UTC [epoch seconds](https://en.wikipedia.org/wiki/Unix_time). | **Possible values for X-RateLimit-Scope :** * `user` * `organization` **When the rate limit is exceeded, an error is returned with the status "429 Too Many Requests"**: ```json { "message": "rate limit exceeded", } ``` ## Query Limits [#query-limits] | Header | Description | | ------------------------ | ----------------------------------------------------------------------------------------------------------------------- | | `X-QueryLimit-Limit` | The query cost limit of your plan in Gigabyte Milliseconds (GB\*ms). | | `X-QueryLimit-Remaining` | The remaining query Gigabyte Milliseconds. | | `X-QueryLimit-Reset` | The time at which the current rate limit window resets in UTC [epoch seconds](https://en.wikipedia.org/wiki/Unix_time). | ## Ingest Limits [#ingest-limits] | Header | Description | | ------------------------- | ----------------------------------------------------------------------------------------------------------------------- | | `X-IngestLimit-Limit` | The maximum bytes ingested a user is permitted to make per month. | | `X-IngestLimit-Remaining` | The bytes ingested remaining in the current rate limit window. | | `X-IngestLimit-Reset` | The time at which the current rate limit window resets in UTC [epoch seconds](https://en.wikipedia.org/wiki/Unix_time). | Alongside data volume limits, Axiom also monitors the rate of ingest requests. If an organization consistently sends an excessive number of requests per second, far exceeding normal usage patterns, Axiom reserves the right to suspend their ingest to maintain system stability and ensure fair resource allocation for all users. To prevent exceeding these rate limits, it’s highly recommended to use batching clients, which can efficiently manage the number of requests by aggregating data before sending. ## Limits on ingested data [#limits-on-ingested-data] For more information on limits and requirements imposed by Axiom, see [Limits](/reference/limits). --- # Send data to Axiom via API Source: https://axiom.co/docs/restapi/ingest The Axiom REST API accepts the following data formats: * [JSON](#send-data-in-json-format) * [NDJSON](#send-data-in-ndjson-format) * [CSV](#send-data-in-csv-format) This page explains how to send data to Axiom via cURL commands in each of these formats, and how to send data with the [Axiom Node.js library](#send-data-with-axiom-node-js). For more information on choosing an ingest format, see [Optimize data loading](/reference/optimize-usage#optimize-data-loading). For more information on other ingest options, see [Send data](/send-data/methods). For an introduction to the basics of the Axiom API and to the authentication options, see [Introduction to Axiom API](/restapi/introduction). The API requests on this page use the ingest data endpoint. For more information, see the [API reference](/restapi/endpoints/ingestToDataset). The [Ingest data endpoint](/restapi/endpoints/ingestToDataset) only supports API tokens. Personal access tokens (PATs) aren't supported. For more information, see [Tokens](/reference/tokens). ## Send data in JSON format [#send-data-in-json-format] To send data to Axiom in JSON format: 1. Encode the events as JSON objects. 2. Enter the array of JSON objects into the body of the API request. 3. Optional: In the body of the request, set optional parameters such as `timestamp-field` and `timestamp-format`. For more information, see the [ingest data API reference](/restapi/endpoints/ingestToDataset). 4. Set the `Content-Type` header to `application/json`. 5. Set the `Authorization` header to `Bearer API_TOKEN`. 6. Send the POST request to `https://AXIOM_DOMAIN/v1/ingest/DATASET_NAME`. ### Example with grouped events [#example-with-grouped-events] The following example request contains grouped events. The structure of the JSON payload has the scheme of `[ { "labels": { "key1": "value1", "key2": "value2" } }, ]` where the array contains one or more JSON objects describing events. **Example request** ```bash curl -X 'POST' 'https://AXIOM_DOMAIN/v1/ingest/DATASET_NAME' \ -H 'Authorization: Bearer API_TOKEN' \ -H 'Content-Type: application/json' \ -d '[ { "time":"2025-01-12T00:00:00.000Z", "data":{"key1":"value1","key2":"value2"} }, { "data":{"key3":"value3"}, "labels":{"key4":"value4"} } ]' ``` **Example response** ```json { "ingested": 2, "failed": 0, "failures": [], "processedBytes": 219, "blocksCreated": 0, "walLength": 2 } ``` ### Example with nested arrays [#example-with-nested-arrays] **Example request** ```bash curl -X 'POST' 'https://AXIOM_DOMAIN/v1/ingest/DATASET_NAME' \ -H 'Authorization: Bearer API_TOKEN' \ -H 'Content-Type: application/json' \ -d '[ { "axiom": [{ "logging":[{ "observability":[{ "location":[{ "credentials":[{ "datasets":[{ "first_name":"axiom", "last_name":"logging", "location":"global" }], "work":[{ "details":"https://app.axiom.co/", "tutorials":"https://www.axiom.co/blog", "changelog":"https://www.axiom.co/changelog", "documentation": "https://www.axiom.co/docs" }] }], "social_media":[{ "details":[{ "twitter":"https://twitter.com/AxiomFM", "linkedin":"https://linkedin.com/company/axiomhq", "github":"https://github.com/axiomhq" }], "features":[{ "datasets":"view logs", "stream":"live_tail", "explorer":"queries" }] }] }] }], "logs":[{ "apl": "functions" }] }], "storage":[{}] }]} ]' ``` **Example response** ```json { "ingested":1, "failed":0, "failures":[], "processedBytes":1587, "blocksCreated":0, "walLength":3 } ``` ### Example with objects, strings, and arrays [#example-with-objects-strings-and-arrays] **Example request** ```bash curl -X 'POST' 'https://AXIOM_DOMAIN/v1/ingest/DATASET_NAME' \ -H 'Authorization: Bearer API_TOKEN' \ -H 'Content-Type: application/json' \ -d '[{ "axiom": { "logging": { "observability": [ { "apl": 23, "function": "tostring" }, { "apl": 24, "operator": "summarize" } ], "axiom": [ { "stream": "livetail", "datasets": [4, 0, 16], "logging": "observability", "metrics": 8, "dashboard": 10, "alerting": "kubernetes" } ] }, "apl": { "reference": [[80, 12], [30, 40]] } } }]' ``` **Example response** ```json { "ingested":1, "failed":0, "failures":[], "processedBytes":432, "blocksCreated":0, "walLength":4 } ``` ## Send data in NDJSON format [#send-data-in-ndjson-format] To send data to Axiom in NDJSON format: 1. Encode the events as JSON objects. 2. Enter each JSON object in a separate line into the body of the API request. 3. Optional: In the body of the request, set optional parameters such as `timestamp-field` and `timestamp-format`. For more information, see the [ingest data API reference](/restapi/endpoints/ingestToDataset). 4. Set the `Content-Type` header to either `application/json` or `application/x-ndjson`. 5. Set the `Authorization` header to `Bearer API_TOKEN`. Replace `API_TOKEN` with the Axiom API token you have generated. 6. Send the POST request to `https://AXIOM_DOMAIN/v1/ingest/DATASET_NAME`. Replace `DATASET_NAME` with the name of the Axiom dataset where you want to send data. **Example request** ```bash curl -X 'POST' 'https://AXIOM_DOMAIN/v1/ingest/DATASET_NAME' \ -H 'Authorization: Bearer API_TOKEN' \ -H 'Content-Type: application/x-ndjson' \ -d '{"id":1,"name":"machala"} {"id":2,"name":"axiom"} {"id":3,"name":"apl"} {"index": {"_index": "products"}} {"timestamp": "2016-06-06T12:00:00+02:00", "attributes": {"key1": "value1","key2": "value2"}} {"queryString": "count()"}' ``` **Example response** ```json { "ingested": 6, "failed": 0, "failures": [], "processedBytes": 266, "blocksCreated": 0, "walLength": 6 } ``` ## Send data in CSV format [#send-data-in-csv-format] To send data to Axiom in JSON format: 1. Encode the events in CSV format. The first line specifies the field names separated by commas. Subsequent new lines specify the values separated by commas. 2. Enter the CSV representation in the body of the API request. 3. Optional: In the body of the request, set optional parameters such as `timestamp-field` and `timestamp-format`. For more information, see the [ingest data API reference](/restapi/endpoints/ingestToDataset). 4. Set the `Content-Type` header to `text/csv`. 5. Set the `Authorization` header to `Bearer API_TOKEN`. Replace `API_TOKEN` with the Axiom API token you have generated. 6. Send the POST request to `https://AXIOM_DOMAIN/v1/ingest/DATASET_NAME`. Replace `DATASET_NAME` with the name of the Axiom dataset where you want to send data. **Example request** ```bash curl -X 'POST' 'https://AXIOM_DOMAIN/v1/ingest/DATASET_NAME' \ -H 'Authorization: Bearer API_TOKEN' \ -H 'Content-Type: text/csv' \ -d 'user, name foo, bar' ``` **Example response** ```json { "ingested": 1, "failed": 0, "failures": [], "processedBytes": 28, "blocksCreated": 0, "walLength": 2 } ``` ## Send data with Axiom Node.js [#send-data-with-axiom-nodejs] 1. [Install and configure](/guides/javascript#use-axiomhq-js) the Axiom Node.js library. 2. Encode the events as JSON objects. 3. Pass the dataset name and the array of JSON objects to the `axiom.ingest` function. ```ts axiom.ingest('DATASET_NAME', [{ foo: 'bar' }]); await axiom.flush(); ``` For more information on other libraries you can use to send data, see [Send data](/send-data/methods). ## What’s next [#whats-next] After ingesting data to Axiom, you can [query it via API](/restapi/query) or the [Axiom Console](/query-data/explore). --- # Get started with Axiom API Source: https://axiom.co/docs/restapi/introduction You can use the Axiom API (Application Programming Interface) to send data to Axiom, query data, and manage resources programmatically. This page covers the basics for interacting with the Axiom API. ## API basics [#api-basics] Axiom API follows the REST architectural style and uses JSON for serialization. You can send API requests to Axiom with curl or API tools such as [Postman](https://www.postman.com/). For example, the following curl command ingests data to an Axiom dataset: ```bash curl -X 'POST' 'https://AXIOM_DOMAIN/v1/ingest/DATASET_NAME' \ -H 'Authorization: Bearer API_TOKEN' \ -H 'Content-Type: application/json' \ -d '[ { "axiom": "logs" } ]' ``` For more information, see [Send data to Axiom via API](/restapi/ingest) and [Ingest data endpoint](/restapi/endpoints/ingestToDataset). ## Base domain [#base-domain] The base domain of an API request depends on the following: * To ingest data, use the [Ingest data endpoint](/restapi/endpoints/ingestToDataset) with the base domain of your edge deployment. For more information on edge deployments, see [Edge deployments](/reference/edge-deployments). * For all other API endpoints, use the base domain `https://api.axiom.co`. ## Content type [#content-type] Encode the body of API requests as JSON objects and set the `Content-Type` header to `application/json`. Unless otherwise specified, Axiom encodes all responses (including errors) as JSON objects. ## Authentication [#authentication] To prove that API requests come from you, you must include forms of authentication called tokens in your API requests. Axiom offers two types of tokens: * [API tokens](/reference/tokens#api-tokens) let you control the actions that can be performed with the token. For example, you can specify that requests authenticated with a certain API token can only query data from a particular dataset. * [Personal access tokens (PATs)](/reference/tokens#personal-access-tokens-pat) provide full control over your Axiom account. Requests authenticated with a PAT can perform every action you can perform in Axiom. When possible, use API tokens instead of PATs. If you use an API token for authentication, include the API token in the `Authorization` header. ```bash Authorization: Bearer API_TOKEN ``` If you use a PAT for authentication, include the PAT in the `Authorization` header and the org ID in the `x-axiom-org-id` header. For more information, see [Determine org ID](/reference/tokens#determine-org-id). ```bash Authorization: Bearer API_TOKEN x-axiom-org-id: ORG_ID ``` If authentication is unsuccessful for a request, Axiom returns the error status code `403`. ## Data types [#data-types] Below is a list of the types of data used within the Axiom API: | Name | Definition | Example | | ----------- | ----------------------------------------------------------------- | ------------------------ | | **ID** | A unique value used to identify resources. | "io12h34io1h24i" | | **String** | A sequence of characters used to represent text. | "string value" | | **Boolean** | A type of two possible values representing true or false. | true | | **Integer** | A number without decimals. | 4567 | | **Float** | A number with decimals. | 15.67 | | **Map** | A data structure with a list of values assigned to a unique key. | \{ "key": "value" } | | **List** | A data structure with only a list of values separated by a comma. | `["value", 4567, 45.67]` | ## What’s next [#whats-next] * [Ingest data via API](/restapi/ingest) * [Query data via API](/restapi/query) --- # Pagination in Axiom API Source: https://axiom.co/docs/restapi/pagination Pagination allows you to retrieve responses in manageable chunks. You can use pagination for the following endpoints: * [Run Query](/restapi/endpoints/queryApl) * [Run Query (Legacy)](/restapi/endpoints/queryDataset) ## Pagination mechanisms [#pagination-mechanisms] You can use one of the following pagination mechanisms: * [Pagination based on timestamp](#timestamp-based-pagination) (stable) * [Pagination based on cursor](#cursor-based-pagination) (public preview) Axiom recommends timestamp-based pagination. Cursor-based pagination is in public preview and may return unexpected query results. ## Timestamp-based pagination [#timestamp-based-pagination] The parameters and mechanisms differ between the current and legacy endpoints. ### Run Query [#run-query] To use timestamp-based pagination with the Run Query endpoint: * Include the [limit operator](/apl/tabular-operators/limit-operator) in the APL query of your API request. The argument of this operator determines the number of events to display per page. * Use `sort by _time asc` or `sort by _time desc` in the APL query. This returns the results in ascending or descending chronological order. For more information, see [sort operator](/apl/tabular-operators/sort-operator). * Specify `startTime` and `endTime` in the body of your API request. ### Run Query (Legacy) [#run-query-legacy] To use timestamp-based pagination with the legacy Run Query endpoint: * Add the `limit` parameter to the body of your API request. The value of this parameter determines the number of events to display per page. * Add the `order` parameter to the body of your API request. In the value of this parameter, order the results by time in either ascending or descending chronological order. For example, `[{ "field": "_time", "desc": true }]`. For more information, see [order operator](/apl/tabular-operators/order-operator). * Specify `startTime` and `endTime` in the body of your API request. ## Page through the result set [#page-through-the-result-set] Use the timestamps as boundaries to page through the result set. ### Queries with descending order [#queries-with-descending-order] To go to the next page of the result set for queries with descending order (`_time desc`): 1. Determine the timestamp of last item on the current page. This is the least recent event. 2. Optional: Subtract 1 nanosecond from the timestamp. 3. In your next request, change the value `endTime` parameter in the body of your API request to the timestamp of the last item (optionally, minus 1 nanosecond). Repeat this process until the result set is empty. ### Queries with ascending order [#queries-with-ascending-order] To go to the next page of the result set for queries with ascending order (`_time asc`): 1. Determine the timestamp of last item on the current page. This is the most recent event. 2. Optional: Add 1 nanosecond to the timestamp. 3. In your next request, change the value `startTime` parameter in the body of your API request to the timestamp of the last item (optionally, plus 1 nanosecond). Repeat this process until the result set is empty. ### Deduplication mechanism [#deduplication-mechanism] In the procedures above, the steps about incrementing the timestamp are optional. If you increment the timestamp, there is a risk of duplication. If you don’t increment the timestamp, there is a risk of overlap. Duplicated data is possible for many reasons, such as backfill or natural duplication from external data sources. For these reasons, regardless of the method you choose (increment or not increment the timestamp, sort by descending or ascending order), Axiom recommends you implement some form of deduplication mechanism in your pagination script. ### Limits [#limits] Both the Run Query and the Run Query (Legacy) endpoints allow request-based limit configuration. This means that the limit they use is the lowest of the following: the query limit, the request limit, and Axiom’s server-side internal limit. Without a query or request limit, Axiom currently defaults to the limit of 1,000 events per page. For the pagination of datasets that are greater than 1,000 events, Axioms recommends specifying the same limit in the request and the APL query to avoid the default value and contradictory limits. ### Examples [#examples] #### Example request Run Query [#example-request-run-query] ```bash curl -X 'POST' 'https://api.axiom.co/v1/datasets/_apl?format=tabular' \ -H 'Authorization: Bearer API_TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "apl": "DATASET_NAME | sort by _time desc | limit 100", "startTime": "2024-11-30T00:00:00.000Z", "endTime": "2024-11-30T23:59:59.999Z" }' ``` #### Example request Run Query (Legacy) [#example-request-run-query-legacy] ```bash curl -X 'POST' 'https://api.axiom.co/v1/datasets/DATASET_NAME/query' \ -H 'Authorization: Bearer API_TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "startTime": "2024-11-30T00:00:00.000Z", "endTime": "2024-11-30T23:59:59.999Z", "limit": 100, "order": [{ "field": "_time", "desc": true }] }' ``` #### Example request to page through the result set [#example-request-to-page-through-the-result-set] Example request to go to next page for Run Query: ```bash curl -X 'POST' 'https://api.axiom.co/v1/datasets/_apl?format=tabular' \ -H 'Authorization: Bearer API_TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "apl": "DATASET_NAME | sort by _time desc | limit 100", "startTime": "2024-11-30T00:00:00.000Z", "endTime": "2024-11-30T22:59:59.999Z" }' ``` Example request to go to next page for Run Query (Legacy): ```bash curl -X 'POST' 'https://api.axiom.co/v1/datasets/DATASET_NAME/query' \ -H 'Authorization: Bearer API_TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "startTime": "2024-11-30T00:00:00.000Z", "endTime": "2024-11-30T22:59:59.999Z", "limit": 100, "order": [{ "field": "_time", "desc": true }] }' ``` ## Cursor-based pagination [#cursor-based-pagination] Cursor-based pagination is in public preview and may return unexpected query results. Axiom recommends timestamp-based pagination. The parameters and mechanisms differ between the current and legacy endpoints. ### Run Query [#run-query-1] To use cursor-based pagination with the Run Query endpoint: * Include the [`limit` operator](/apl/tabular-operators/limit-operator) in the APL query of your API request. The argument of this operator determines the number of events to display per page. * Use `sort by _time asc` or `sort by _time desc` in the APL query. This returns the results in ascending or descending chronological order. For more information, see [sort operator](/apl/tabular-operators/sort-operator). * Specify `startTime` and `endTime` in the body of your API request. ### Run Query (Legacy) [#run-query-legacy-1] To use cursor-based pagination with the legacy Run Query endpoint: * Add the `limit` parameter to the body of your API request. The value of this parameter determines the number of events to display per page. * Add the `order` parameter to the body of your API request. In the value of this parameter, order the results by time in either ascending or descending chronological order. For example, `[{ "field": "_time", "desc": true }]`. For more information, see [order operator](/apl/tabular-operators/order-operator). * Specify `startTime` and `endTime` in the body of your API request. ### Response format [#response-format] Contains metadata about the response including pagination information. Cursor for the first item in the current page. Cursor for the last item in the current page. Total number of rows matching the query. Contains the list of returned objects. ## Page through the result set [#page-through-the-result-set-1] To page through the result set, add the `cursor` parameter to the body of your API request. Optional. A cursor for use in pagination. Use the cursor string returned in previous responses to fetch the next or previous page of results. The `minCursor` and `maxCursor` fields in the response are boundaries that help you page through the result set. For queries with descending order (`_time desc`), use `minCursor` from the response as the `cursor` in your next request to go to the next page. You reach the end when your provided `cursor` matches the `minCursor` in the response. For queries with ascending order (`_time asc`), use `maxCursor` from the response as the `cursor` in your next request to go to the next page. You reach the end when your provided `cursor` matches the `maxCursor` in the response. If the query returns fewer results than the specified limit, paging can stop. ### Examples [#examples-1] #### Example request Run Query [#example-request-run-query-1] ```bash curl -X 'POST' 'https://api.axiom.co/v1/datasets/_apl?format=tabular' \ -H 'Authorization: Bearer API_TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "apl": "DATASET_NAME | sort by _time desc | limit 100", "startTime": "2024-01-01T00:00:00.000Z", "endTime": "2024-01-31T23:59:59.999Z" }' ``` #### Example request Run Query (Legacy) [#example-request-run-query-legacy-1] ```bash curl -X 'POST' 'https://api.axiom.co/v1/datasets/DATASET_NAME/query' \ -H 'Authorization: Bearer API_TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "startTime": "2024-01-01T00:00:00.000Z", "endTime": "2024-01-31T23:59:59.999Z", "limit": 100, "order": [{ "field": "_time", "desc": true }] }' ``` #### Example response [#example-response] ```json { "status": { "rowsMatched": 2500, "minCursor": "0d3wo7v7e1oii-075a8c41710018b9-0000ecc5", "maxCursor": "0d3wo7v7e1oii-075a8c41710018b9-0000faa3" }, "matches": [ // ... events ... ] } ``` #### Example request to page through the result set [#example-request-to-page-through-the-result-set-1] To page through the result set, use the appropriate cursor value in your next request. For more information, see [Page through the result set](#page-through-the-result-set). Example request to go to next page for Run Query: ```bash curl -X 'POST' 'https://api.axiom.co/v1/datasets/_apl?format=tabular' \ -H 'Authorization: Bearer API_TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "apl": "DATASET_NAME | sort by _time desc | limit 100", "startTime": "2024-01-01T00:00:00.000Z", "endTime": "2024-01-31T23:59:59.999Z", "cursor": "0d3wo7v7e1oii-075a8c41710018b9-0000ecc5" }' ``` Example request to go to next page for Run Query (Legacy): ```bash curl -X 'POST' 'https://api.axiom.co/v1/datasets/DATASET_NAME/query' \ -H 'Authorization: Bearer API_TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "startTime": "2024-01-01T00:00:00.000Z", "endTime": "2024-01-31T23:59:59.999Z", "limit": 100, "order": [{ "field": "_time", "desc": true }], "cursor": "0d3wo7v7e1oii-075a8c41710018b9-0000ecc5" }' ``` --- # Query data via Axiom API Source: https://axiom.co/docs/restapi/query This page explains how to query data via the Axiom API using the following: * [cURL](#query-data-with-curl) * [Axiom JavaScript library (`@axiomhq/js`)](#query-data-with-the-axiom-javascript-library) For an introduction to the basics of the Axiom API and to the authentication options, see [Introduction to Axiom API](/restapi/introduction). The API requests on this page use the query data endpoint. For more information, see the [API reference](/restapi/endpoints/queryApl). ## Query data with cURL [#query-data-with-curl] To query data with cURL: 1. Build the APL query. For more information, see [Introduction to APL](/apl/introduction). 2. Encode the APL query as a JSON object and enter it into the body of the API request. 3. Optional: In the body of the request, set optional parameters such as `startTime` and `endTime`. For more information, see the [query data API reference](/restapi/endpoints/queryApl). 4. Set the `Content-Type` header to `application/json`. 5. Set the `Authorization` header to `Bearer API_TOKEN`. 6. Send the POST request to one of the following: * For tabular output, use `https://AXIOM_DOMAIN/v1/query/_apl?format=tabular`. * For legacy output, use `https://AXIOM_DOMAIN/v1/query/_apl?format=legacy`. ### Example [#example] ```bash curl --request POST \ --url 'https://AXIOM_DOMAIN/v1/query/_apl?format=tabular' \ --header 'Authorization: Bearer API_TOKEN' \ --header 'Content-Type: application/json' \ --data '{ "apl": "DATASET_NAME | limit 10", "startTime": "string", "endTime": "string" }' ``` **Example response** ```json [expandable] { "format": "tabular", "status": { "elapsedTime": 260650, "minCursor": "0d8q6stroluyo-07c3957e7400015c-0000c875", "maxCursor": "0d8q6stroluyo-07c3957e7400015c-0000c877", "blocksExamined": 4, "blocksCached": 0, "blocksMatched": 0, "rowsExamined": 197604, "rowsMatched": 197604, "numGroups": 0, "isPartial": false, "cacheStatus": 1, "minBlockTime": "2025-03-26T12:03:14Z", "maxBlockTime": "2025-03-26T12:12:42Z" }, "tables": [ { "name": "0", "sources": [ { "name": "DATASET_NAME" } ], "fields": [ { "name": "_sysTime", "type": "datetime" }, { "name": "_time", "type": "datetime" }, { "name": "content_type", "type": "string" }, { "name": "geo.city", "type": "string" }, { "name": "geo.country", "type": "string" }, { "name": "id", "type": "string" }, { "name": "is_tls", "type": "boolean" }, { "name": "message", "type": "string" }, { "name": "method", "type": "string" }, { "name": "req_duration_ms", "type": "float" }, { "name": "resp_body_size_bytes", "type": "integer" }, { "name": "resp_header_size_bytes", "type": "integer" }, { "name": "server_datacenter", "type": "string" }, { "name": "status", "type": "string" }, { "name": "uri", "type": "string" }, { "name": "user_agent", "type": "string" }, { "name": "is_ok_2 ", "type": "boolean" }, { "name": "city_str_len", "type": "integer" } ], "order": [ { "field": "_time", "desc": true } ], "groups": [], "range": { "field": "_time", "start": "1970-01-01T00:00:00Z", "end": "2025-03-26T12:12:43Z" }, "columns": [ [ "2025-03-26T12:12:42.68112905Z", "2025-03-26T12:12:42.68112905Z", "2025-03-26T12:12:42.68112905Z" ], [ "2025-03-26T12:12:42Z", "2025-03-26T12:12:42Z", "2025-03-26T12:12:42Z" ], [ "text/html", "text/plain-charset=utf-8", "image/jpeg" ], [ "Ojinaga", "Humboldt", "Nevers" ], [ "Mexico", "United States", "France" ], [ "8af366cf-6f25-42e6-bbb4-d860ab535a60", "032e7f68-b0ab-47c0-a24a-35af566359e5", "4d2c7baa-ff28-4b1f-9db9-8e6c0ed5a9c9" ], [ false, false, true ], [ "QCD permutations were not solvable in linear time, expected compressed time", "QCD permutations were not solvable in linear time, expected compressed time", "Expected a new layer of particle physics but got a Higgs Boson" ], [ "GET", "GET", "GET" ], [ 1.396373193863436, 0.16252390534308514, 0.4093416175186162 ], [ 3448, 2533, 1906 ], [ 84, 31, 29 ], [ "DCA", "GRU", "FRA" ], [ "201", "200", "200" ], [ "/api/v1/buy/commit/id/go", "/api/v1/textdata/cnfigs", "/api/v1/bank/warn" ], [ "Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; AS; rv:11.0) like Gecko", "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/535.24 (KHTML, like Gecko) Chrome/19.0.1055.1 Safari/535.24", "Mozilla/5.0 (Windows; U; MSIE 9.0; WIndows NT 9.0; en-US))" ], [ true, true, true ], [ 7, 8, 6 ] ] } ], "datasetNames": [ "DATASET_NAME" ], "fieldsMetaMap": { "DATASET_NAME": [ { "name": "status", "type": "", "unit": "", "hidden": false, "description": "HTTP status code" }, { "name": "resp_header_size_bytes", "type": "integer", "unit": "none", "hidden": false, "description": "" }, { "name": "geo.city", "type": "string", "unit": "", "hidden": false, "description": "the city" }, { "name": "resp_body_size_bytes", "type": "integer", "unit": "decbytes", "hidden": false, "description": "" }, { "name": "content_type", "type": "string", "unit": "", "hidden": false, "description": "" }, { "name": "geo.country", "type": "string", "unit": "", "hidden": false, "description": "" }, { "name": "req_duration_ms", "type": "float", "unit": "ms", "hidden": false, "description": "Request duration" } ] } } ``` ## Query data with the Axiom JavaScript library [#query-data-with-the-axiom-javascript-library] 1. [Install and configure](/guides/javascript#use-axiomhq-js) the Axiom JavaScript library (`@axiomhq/js`). 2. Build the APL query. For more information, see [Introduction to APL](/apl/introduction). 3. Pass the APL query as a string to the `axiom.query` function. ```ts const res = await axiom.query(`['DATASET_NAME'] | where foo == 'bar' | limit 100`); console.log(res); ``` To run queries within a specific edge deployment, set the `edge` option when you create the client. The client then routes queries to the [edge query endpoint](/restapi/endpoints/queryEdge) automatically. For more information, see [Configure region](/guides/javascript#configure-region). For more examples, see the [examples in GitHub](https://github.com/axiomhq/axiom-js/tree/main/examples). --- # Enrich Axiom experience with AWS PrivateLink Source: https://axiom.co/docs/apps/aws-privatelink [AWS PrivateLink](https://aws.amazon.com/privatelink/) is a networking service provided by Amazon Web Services (AWS) that allows you to securely access services hosted on the AWS cloud over a private network connection. With AWS PrivateLink, you can access Axiom directly from your AWS without an internet gateway or NAT device, simplifying your network setup. ## Cross-region support [#cross-region-support] Axiom supports native cross-region PrivateLink for the following regions: | Axiom edge deployment | Supported PrivateLink regions | | :-------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------- | | `US East 1 (AWS)` | `us-east-1`
`us-east-2`
`us-west-1`
`us-west-2`
`eu-west-1`
`eu-west-2`
`eu-west-3`
`eu-central-1`
`ca-central-1` | | `EU Central 1 (AWS)` | `eu-central-1`
`eu-north-1` | To connect to a region that isn't listed above, [contact Axiom](https://axiom.co/contact). For more information, see [Edge deployments](/reference/edge-deployments). ## Setup [#setup] Use the service details for your edge deployment to set up the VPC endpoint. | Axiom edge deployment | PrivateLink service name | PrivateLink service region | | :-------------------- | :----------------------------------------------------------- | :------------------------- | | `US East 1 (AWS)` | `com.amazonaws.vpce.us-east-1.vpce-svc-0daeb6c5a00337061` | `us-east-1` | | `EU Central 1 (AWS)` | `com.amazonaws.vpce.eu-central-1.vpce-svc-00e8d47e8c60784f7` | `eu-central-1` | 1. In your VPC Console, go to **PrivateLink and Lattice > Endpoints**, and then click **Create endpoint**. 2. Select **PrivateLink ready partner services**, and then enter the service name for your edge deployment. 3. Under **Service Region**, turn on **Cross-region endpoint**, and then select the service region for your edge deployment. This is the region where the Axiom service is hosted, and it's independent of your VPC's region. 4. Click **Verify service**. 5. Select the VPC and subnets that you want to connect to the Axiom VPC service endpoint. Ensure that **Enable DNS name** is turned on and the security group accepts inbound traffic on TCP port `443`. 6. Finish the setup and wait for the VPC endpoint to become available. This usually takes 10 minutes. --- # Connect Axiom with Cloudflare Logpush Source: https://axiom.co/docs/apps/cloudflare-logpush Cloudflare Logpush is a feature that allows you to push HTTP request logs and other Cloudflare-generated logs directly to your desired storage, analytics, and monitoring solutions like Axiom. The integration with Axiom aims to provide real-time insights into web traffic, and operational issues, thereby helping to monitor and troubleshoot effectively. The Cloudflare Logpush integration supports all [edge deployments](/reference/edge-deployments). The integration sends data to your organization’s default edge deployment automatically, without any additional configuration. ## What’s Cloudflare Logpush? [#whats-cloudflare-logpush] Cloudflare Logpush enables Cloudflare users to automatically export their logs in JSON format to a variety of endpoints. This feature is incredibly useful for analytics, auditing, debugging, and monitoring the performance and security of websites. Types of logs you can export include HTTP request logs, firewall events, and more. ## Installing Cloudflare Logpush app [#installing-cloudflare-logpush-app] ### Prerequisites [#prerequisites] * An active Cloudflare Enterprise account * API token or global API key Logpush on zones You can create a token that has access to a single zone, single account or a mix of all these, depending on your needs. For account access, the token must have these permissions: * Logs: Edit * Account settings: Read For the zones, only edit permission is required for logs. **Zero Trust datasets require an additional permission.** To create Logpush jobs for Cloudflare Zero Trust datasets (Access, Gateway, and DEX) — for example **Access requests**, **Gateway DNS**, **Gateway HTTP**, **Gateway Network**, and **Zero Trust Network Session Logs** — your token must also have the **Zero Trust: PII Read** permission in addition to **Logs: Edit**. These datasets can contain personally identifiable information (such as private IP addresses, user names, and device names), and Cloudflare blocks the job with a `missing required permissions` error when this permission isn't granted. The standard **Administrator** role includes **Logs: Edit** but not Zero Trust PII access, so an admin or owner account alone isn't enough. A **Super Administrator** must assign the **Cloudflare Zero Trust PII** role to the user (or grant the token the **Zero Trust: PII Read** permission) before these jobs can be created. If you don't use Cloudflare Zero Trust, Gateway, or Access, you can leave these datasets unselected. ## Steps [#steps] * Log in to Cloudflare, go to your Cloudflare dashboard, and then select the Enterprise zone (domain) you want to enable Logpush for. * Optionally, set filters and fields. You can filter logs by field (like Client IP, User Agent, etc.) and set the type of logs you want (for example, HTTP requests, firewall events). * In Axiom, click **Settings**, select **Apps**, and install the Cloudflare Logpush app with the token you created from the profile settings in Cloudflare. Install CloudFlare Logpush App * You see your available accounts and zones. Select the Cloudflare datasets you want to subscribe to. Install CloudFlare Logpush App * The installation uses the Cloudflare API to create Logpush jobs for each selected dataset. * After the installation completes, you can find the installed Logpush jobs at Cloudflare. For zone-scoped Logpush jobs: CloudFlare Logpush on zone level For account-scoped Logpush jobs: CloudFlare Logpush on account level * In the Axiom, you can see your Cloudflare Logpush dashboard. Using Axiom with Cloudflare Logpush offers a powerful solution for real-time monitoring, observability, and analytics. Axiom can help you gain deep insights into your app’s performance, errors, and app bottlenecks. ### Benefits of using the Axiom Cloudflare Logpush Dashboard [#benefits-of-using-the-axiom-cloudflare-logpush-dashboard] * Real-time visibility into web performance: One of the most crucial features is the ability to see how your website or app is performing in real-time. The dashboard can show everything from page load times to error rates, giving you immediate insights that can help in timely decision-making. CloudFlare Logpush on account level * Actionable insights for troubleshooting: The dashboard doesn’t just provide raw data; it provides insights. Whether it’s an error that needs immediate fixing or performance metrics that show an error from your app, having this information readily available makes it easier to identify problems and resolve them swiftly. CloudFlare Logpush on account level * DNS metrics: Understanding the DNS requests, DNS queries, and DNS cache hit from your app is vital to track if there’s a request spike or get the total number of queries in your system. DNS metrics * Centralized logging and error tracing: With logs coming in from various parts of your app stack, centralizing them within Axiom makes it easier to correlate events across different layers of your infrastructure. This is crucial for troubleshooting complex issues that may span multiple services or components. Centralized logging and error tracing ## Supported Cloudflare Logpush Datasets [#supported-cloudflare-logpush-datasets] Axiom supports all the Cloudflare account-scoped datasets. Zone-scoped * DNS logs * Firewall events * HTTP requests * NEL reports * Spectrum events Account-scoped * Access requests * Audit logs * CASB Findings * Device posture results * DNS Firewall Logs * Gateway DNS * Gateway HTTP * Gateway Network * Magic IDS Detections * Network Analytics Logs * Workers Trace Events * Zero Trust Network Session Logs The Zero Trust, Gateway, and Access datasets (**Access requests**, **Gateway DNS**, **Gateway HTTP**, **Gateway Network**, and **Zero Trust Network Session Logs**) require the **Zero Trust: PII Read** token permission in addition to **Logs: Edit**. See [Prerequisites](#prerequisites) above. Without it, Cloudflare returns a `missing required permissions` error for these datasets. --- # Connect Axiom with Cloudflare Workers Source: https://axiom.co/docs/apps/cloudflare-workers The Axiom Cloudflare Workers app provides granular detail about the traffic coming in from your monitored sites. This includes edge requests, static resources, client auth, response duration, and status. Axiom gives you an all-at-once view of key Cloudflare Workers metrics and logs, out of the box, with the dynamic Cloudflare Workers dashboard. The data obtained with the Axiom dashboard gives you better insights into the state of your Cloudflare Workers so you can easily monitor bad requests, popular URLs, cumulative execution time, successful requests, and more. The app is part of Axiom’s unified logging and observability platform, so you can easily track Cloudflare Workers edge requests alongside a comprehensive view of other resources in your Cloudflare Worker environments. Axiom Cloudflare Workers is an open-source project and welcomes your contributions. For more information, see the [GitHub repository](https://github.com/axiomhq/axiom-cloudflare-workers). ## What’s Cloudflare Workers [#whats-cloudflare-workers] [Cloudflare Workers](https://developers.cloudflare.com/workers/) is a serverless computing platform developed by Cloudflare. The Workers platform allows developers to deploy and run JavaScript code directly at the network edge in more than 200 data centers worldwide. This serverless architecture enables high performance, low latency, and efficient scaling for web apps and APIs. ## Send Cloudflare Worker logs to Axiom [#send-cloudflare-worker-logs-to-axiom] 1. In Cloudflare, create a new worker. For more information, see the [Cloudflare documentation](https://developers.cloudflare.com/workers/get-started/guide/). 2. Copy the contents of the [src/worker.js](https://github.com/axiomhq/axiom-cloudflare-workers/blob/main/src/worker.js) file into the worker you have created. 3. Update the authentication variables: ```bash const axiomDataset = "DATASET_NAME" const axiomToken = "API_TOKEN" ``` 4. Add triggers for the worker. For example, add a route trigger using the [Cloudflare documentation](https://developers.cloudflare.com/workers/configuration/routing/routes/#set-up-a-route-in-the-dashboard). When the routes receive requests, the worker is triggered and the logs are sent to your Axiom dataset. --- # Connect Axiom with Convex Source: https://axiom.co/docs/apps/convex Connect Axiom with [Convex](https://convex.dev) to get comprehensive observability into your backend functions and app events. Stream function executions, console logs, and metadata from your Convex deployment to Axiom for powerful querying, data visualization, and monitoring. Convex Axiom dashboard showing function execution data This page explains how to connecting with Convex can enhance your Axiom experience. For instructions on streaming data from Convex to Axiom, see [Send data from Convex](/send-data/convex). ## Convex and log streams [#convex-and-log-streams] [Convex](https://convex.dev) is the backend platform that keeps your app in sync. It’s the open source, reactive database where queries are TypeScript code running right in the database. Just like React components react to state changes, Convex queries react to database changes. Convex provides a database, a place to write your server functions, and client libraries. It makes it easy to build and scale dynamic live-updating apps. Log streams enable streaming of events such as function executions and `console.log`s from your Convex deployment to supported destinations like Axiom, Datadog, or custom webhooks. Log streams require a Convex Professional plan. Learn more about [Convex pricing plans](https://www.convex.dev/pricing) or upgrade your account. ## Benefits of connecting Axiom with Convex [#benefits-of-connecting-axiom-with-convex] Convex’s built-in features allow you to see the most recent logs produced by your deployment. Additionally, log streaming to Axiom provides comprehensive observability for your backend operations. * **Historical log storage** beyond the recent logs view. * **Powerful querying** with Axiom Processing Language (APL). * **Advanced data visualization** and custom dashboards. * **Integration with monitoring tools** like PagerDuty, Slack, and more. * **Real-time alerting** based on function performance and errors. ## Analyze function performance [#analyze-function-performance] Convex log streams send structured data to Axiom that includes the following key fields: * **`['data.topic']`**: Event type * **`['data.status']`**: Execution status * **`['data.function.path']`**: Full function path * **`['data.function.type']`**: Function type * **`['data.function.component_path']`**: Component path * **`['data.execution_time_ms']`**: Function execution time in milliseconds * **`['data.usage.database_read_documents']`**: Number of documents read * **`['data.usage.database_read_bytes']`**: Bytes of data read * **`['data.function.cached']`**: Cache hit indicator for queries * **`['convex.project_slug']`**: Convex project identifier * **`['convex.deployment_name']`**: Deployment name * **`['convex.deployment_type']`**: Deployment type After sending Convex log streams to Axiom, explore your Convex data and analyze your function performance using Axiom’s powerful [query capabilities](/query-data/query-editor). Identify slow-performing functions by analyzing execution times: ```kusto ['convex'] | where ['data.topic'] == "function_execution" | summarize avg_time_ms = avg(['data.execution_time_ms']), max_time_ms = max(['data.execution_time_ms']), total_calls = count() by ['data.function.path'] | order by avg_time_ms desc ``` Track functions that are experiencing failures: ```kusto ['convex'] | where ['data.topic'] == "function_execution" and ['data.status'] == "failure" | summarize count() by ['data.function.path'], ['data.function.type'] | order by count_ desc ``` Compare performance across different function types (queries, mutations, actions): ```kusto ['convex'] | where ['data.topic'] == "function_execution" | summarize total_calls = count(), avg_duration_ms = avg(['data.execution_time_ms']) by ['data.function.type'] ``` Track database read patterns and identify resource-intensive functions: ```kusto ['convex'] | where ['data.topic'] == "function_execution" | summarize avg_docs_read = avg(['data.usage.database_read_documents']), avg_bytes_read = avg(['data.usage.database_read_bytes']) by ['data.function.path'] | order by avg_bytes_read desc ``` Track query cache hit rates for optimization: ```kusto ['convex'] | where ['data.topic'] == "function_execution" and ['data.function.type'] == "query" and isnotempty(['data.function.cached']) | summarize cache_hits = countif(['data.function.cached'] == true), total_queries = count() | extend cache_hit_rate = (cache_hits * 100) / total_queries ``` Track scheduled job lag and performance: ```kusto ['convex'] | where ['data.topic'] == "scheduled_job_lag" | summarize max_lag_seconds = max(['data.lag_seconds']), avg_lag_seconds = avg(['data.lag_seconds']) by ['convex.project_slug'], ['convex.deployment_name'] ``` ## Set up monitoring and alerting [#set-up-monitoring-and-alerting] [Create monitors](/monitor-data/monitors) to get notified about issues in your Convex deployment. Monitor functions with high error rates: ```kusto ['convex'] | where ['data.topic'] == "function_execution" | summarize total_calls = count(), failures = countif(['data.status'] == "failure") by ['data.function.path'] | extend error_rate = (failures * 100) / total_calls | where error_rate > 5 // Alert if error rate exceeds 5% ``` Set up alerts for functions exceeding execution time thresholds: ```kusto ['convex'] | where ['data.topic'] == "function_execution" and ['data.execution_time_ms'] > 5000 | summarize count() by ['data.function.path'] ``` ## Prebuilt dashboard [#prebuilt-dashboard] When you configure a Convex dataset in Axiom, a dashboard is automatically created in the **Integrations** section of the Dashboards tab. This prebuilt dashboard provides immediate insights into your Convex function performance and errors. The dashboard includes: * **Function execution metrics**: Success rates, error counts, and performance trends. * **Database operation insights**: Query patterns, mutation frequencies, and subscription activity. * **Error analysis**: Error types, frequency, and affected functions. * **Performance monitoring**: Response times, throughput, and resource utilization. You can customize this dashboard or create additional dashboards tailored to your specific monitoring needs and business requirements. For more information, see [Create dashboards](/dashboards/create) and [Configure dashboards](/dashboards/configure). ## Next steps [#next-steps] * [Explore your Convex data](/query-data/query-editor) in Axiom and [learn APL](/apl/introduction) to query your Convex logs. * [Create custom dashboards](/dashboards/create) for your team. * [Set up monitors](/monitor-data/monitors) to get alerted about issues. --- # Connect Axiom with Grafana Source: https://axiom.co/docs/apps/grafana Data visualisation ## What’s a Grafana data source plugin? [#whats-a-grafana-data-source-plugin] Grafana is an open-source tool for time-series analytics, visualization, and alerting. It’s frequently used in DevOps and IT Operations roles to provide real-time information on system health and performance. Data sources in Grafana are the actual databases or services where the data is stored. Grafana has a variety of data source plugins that connect Grafana to different types of databases or services. This enables Grafana to query those sources from display that data on its dashboards. The data sources can be anything from traditional SQL databases to time-series databases or metrics, and logs from Axiom. A Grafana data source plugin extends the functionality of Grafana by allowing it to interact with a specific type of data source. These plugins enable users to extract data from a variety of different sources, not just those that come supported by default in Grafana. ## Prerequisites [#prerequisites] * [Create an Axiom account](https://app.axiom.co/register). * [Create a dataset in Axiom](/reference/datasets#create-dataset) where you send your data. * [Create an advanced API token in Axiom](/reference/tokens#create-advanced-api-token) with permissions to query data from the dataset you have created. Basic API tokens only allow data ingestion and won't work with Grafana. ## Install the Axiom Grafana data source plugin on Grafana Cloud [#install-the-axiom-grafana-data-source-plugin-on-grafana-cloud] * In Grafana, click Administration > Plugins in the side navigation menu to view installed plugins. * In the filter bar, search for the Axiom plugin * Click on the plugin logo. * Click Install. Add new layer When the update is complete, a confirmation message is displayed, indicating that the installation was successful. * The Axiom Grafana Plugin is also installable from the [Grafana Plugins page](https://grafana.com/grafana/plugins/axiomhq-axiom-datasource/) Add new layer ## Install the Axiom Grafana data source plugin on local Grafana [#install-the-axiom-grafana-data-source-plugin-on-local-grafana] The Axiom data source plugin for Grafana is [open source on GitHub](https://github.com/axiomhq/axiom-grafana). It can be installed via the Grafana CLI, or via Docker. ### Install the Axiom Grafana Plugin using Grafana CLI [#install-the-axiom-grafana-plugin-using-grafana-cli] ```bash grafana-cli plugins install axiomhq-axiom-datasource ``` ### Install Via Docker [#install-via-docker] * Add the plugin to your `docker-compose.yml` or `Dockerfile` * Set the environment variable `GF_INSTALL_PLUGINS` to include the plugin Example: `GF_INSTALL_PLUGINS="axiomhq-axiom-datasource"` ## Configuration [#configuration] * Add a new data source in Grafana * Select the Axiom data source type. Add new layer * Enter the previously generated API token. * Save and test the data source. ## Build Queries with Query Editor [#build-queries-with-query-editor] The Axiom data source Plugin provides a custom query editor to build and visualize your Axiom event data. After configuring the Axiom data source, start building visualizations from metrics and logs stored in Axiom. * Create a new panel in Grafana by clicking on Add visualization Build queries * Select the Axiom data source. Axiom data source * Use the query editor to choose the desired metrics, dimensions, and filters. Axiom Query Editor ## Benefits of the Axiom Grafana data source plugin [#benefits-of-the-axiom-grafana-data-source-plugin] The Axiom Grafana data source plugin allows users to display and interact with their Axiom data directly from within Grafana. By doing so, it provides several advantages: 1. **Unified visualization:** The Axiom Grafana data source plugin allows users to utilize Grafana’s powerful visualization tools with Axiom’s data. This enables users to create, explore, and share dashboards which visually represent their Axiom logs and metrics. Data visualisation 2. **Rich Querying Capability:** Grafana has a powerful and flexible interface for building data queries. With the Axiom plugin, and leverage this capability to build complex queries against your Axiom data. Rich querying 3. **Customizable Alerting:** Grafana’s alerting feature allows you to set alerts based on your queries' results, and set up custom alerts based on specific conditions in your Axiom log data. 4. **Sharing and Collaboration:** Grafana’s features for sharing and collaboration can help teams work together more effectively. Share Axiom data visualizations with others, collaborate on dashboards, and discuss insights directly in Grafana. Rich querying --- # Map location data with Axiom and Hex Source: https://axiom.co/docs/apps/hex Hex is a powerful collaborative data platform that allows you to create notebooks with Python/SQL code and interactive visualizations. This page explains how to integrate Hex with Axiom to visualize geospatial data from your logs. You ingest location data into Axiom, query it using APL, and create interactive map visualizations in Hex. * [Create a Hex account](https://app.hex.tech/). ## Send geospatial data to Axiom [#send-geospatial-data-to-axiom] Send your sample location data to Axiom using the API endpoint. For example, the following HTTP request sends sample robot location data with latitude, longitude, status, and satellite information. ```bash curl -X 'POST' 'https://AXIOM_DOMAIN/v1/ingest/DATASET_NAME' \ -H 'Authorization: Bearer API_TOKEN' \ -H 'Content-Type: application/json' \ -d '[ { "data": { "robot_id": "robot-001", "latitude": 37.7749, "longitude": -122.4194, "num_satellites": 8, "status": "active" } } ]' ``` Verify that your data has been ingested correctly by running an APL query in the Axiom UI. ## Set up your Hex project [#set-up-your-hex-project] 1. Create a new Hex project. For more information, see the [Hex documentation](https://learn.hex.tech/docs/getting-started/create-your-first-project). 2. Save your Axiom API token as a secret in Hex. This example uses the secret name `AXIOM_TOKEN`. For more information, see the [Hex documentation](https://learn.hex.tech/docs/explore-data/projects/environment-configuration/environment-views#secrets). ## Query data from Axiom [#query-data-from-axiom] Write the Python code in your Hex notebook that retrieves data from Axiom. For example, customize the code below: ```python import requests import pandas as pd from datetime import datetime, timedelta import os # Retrieve the API token from Hex secrets axiom_token = os.environ.get("AXIOM_TOKEN") # Define Axiom API endpoint and headers base_url = "https://AXIOM_DOMAIN/v1/query/_apl" headers = { 'Authorization': f'Bearer {axiom_token}', 'Content-Type': 'application/json', 'Accept': 'application/json', 'Accept-Encoding': 'gzip' } # Define the time range for your query end_time = datetime.utcnow() start_time = end_time - timedelta(days=3) # Get data from the last 3 days # Construct the APL query query = { "apl": """DATASET_NAME | project ['data.latitude'], ['data.longitude'], ['data.num_satellites'], ['data.robot_id'], ['data.status']""", "startTime": start_time.strftime("%Y-%m-%dT%H:%M:%SZ"), "endTime": end_time.strftime("%Y-%m-%dT%H:%M:%SZ") } try: # Send the request to Axiom API response = requests.post( f"{base_url}?format=tabular", headers=headers, json=query, timeout=10 ) # Print request details for debugging print("Request Details:") print(f"URL: {base_url}?format=tabular") print(f"Query: {query['apl']}") print(f"Response Status: {response.status_code}") if response.status_code == 200: data = response.json() if 'tables' in data: table = data['tables'][0] if table.get('columns') and len(table['columns']) > 0: columns = [field['name'] for field in table['fields']] rows = table['columns'] # Create DataFrame with proper column orientation df = pd.DataFrame(list(zip(*rows)), columns=columns) # Ensure data types are appropriate for mapping df['data.latitude'] = pd.to_numeric(df['data.latitude']) df['data.longitude'] = pd.to_numeric(df['data.longitude']) df['data.num_satellites'] = pd.to_numeric(df['data.num_satellites']) # Display the first few rows to verify our data print("\nDataFrame Preview:") display(df.head()) # Store the DataFrame for visualization robot_locations = df else: print("\nNo data found in the specified time range.") else: print("\nNo tables found in response") print("Response structure:", data.keys()) except Exception as e: print(f"\nError: {str(e)}") ``` ## Create map visualisation [#create-map-visualisation] Create an interactive map visualization in Hex and customize it. For more information, see the [Hex documentation](https://learn.hex.tech/docs/explore-data/cells/visualization-cells/map-cells). --- # Extensions Source: https://axiom.co/docs/apps/introduction This section walks you through a catalog of dedicated extensions that enrich your experience in Axiom’s Console. To use standard APIs and other data shippers like the Elasticsearch Bulk API, Fluent Bit log processor or Fluentd log collector, go to [Send data](/send-data/methods) instead. A pre-configured dashboard for logs sent from AWS Lambda. A configuration path for sending data to Axiom via AWS PrivateLink. A pre-configured dashboard for logs sent from Cloudflare Workers. An integrated workflow for sending data from Cloudflare Logpush to Axiom. Stream function executions and console logs from your Convex deployment to Axiom. A data source plugin for visualizing data stored in Axiom in Grafana. A recommended pathway to visualize data stored in Axiom in Hex. An integreated workflow for sending data from Netlify to Axiom. A setup that allows you to stream your Supabase project's raw log events directly to Axiom. A pre-configured dashboard for audit and network flow logs sent from Tailscale. A walkthrough on configuring resources in Axiom using Terraform. A pre-configured dashboard for logs sent from Vercel. --- # Enrich Axiom experience with AWS Lambda Source: https://axiom.co/docs/apps/lambda Use the Axiom Lambda Extension to enrich your Axiom organization with quick filters and a dashboard. For information on how to send logs and platform events of your Lambda function to Axiom, see [Send data from AWS Lambda](/send-data/aws-lambda). ## What’s the Axiom Lambda Extension [#whats-the-axiom-lambda-extension] AWS Lambda is a compute service that allows you to build applications and run your code at scale without provisioning or maintaining any servers. Use the AWS Lambda Extension to collect Lambda logs, performance metrics, platform events, and memory usage from your Lambda functions. With the Axiom Lambda Extension, you can monitor Lambda performance and aggregate system-level metrics for your serverless applications and optimize lambda functions through easy-to-use automatic dashboards. With the Axiom Lambda extension, you can: * Monitor your Lambda functions and invocations. * Get full visibility into your AWS Lambda events in minutes. * Collect metrics and logs from your Lambda-based Serverless Applications. * Track and view enhanced memory usage by versions, durations, and cold start. * Detect and get alerts on Lambda event errors, Lambda request timeout, and low execution time. ## Comprehensive AWS Lambda dashboards [#comprehensive-aws-lambda-dashboards] The Axiom AWS Lambda integration comes with a pre-built dashboard where you can see and group your functions with the versions and AWS resource that triggers them, making this the ideal starting point for getting an advanced view of the performance and health of your AWS Lambda serverless services and Lambda function events. The AWS Lambda dashboards automatically show up in Axiom through schema detection after installing the Axiom Lambda Extension. These new zero-config dashboards help you spot and troubleshoot Lambda function errors. For example, if there’s high memory usage on your functions, you can spot the unusual delay from the max execution dashboard and filter your errors by functions, durations, invocations, and versions. With your Lambda version name, you can gain and expand your views on what’s happening in your Lambda event source mapping and invocation type. AWS Lambda dashboards ## Monitor Lambda functions and usage in Axiom [#monitor-lambda-functions-and-usage-in-axiom] Having real-time visibility into your function logs is important because any duration between sending your lambda request and the execution time can cause a delay and adds to customer-facing latency. You need to be able to measure and track your Lambda invocations, maximum execution time, minimum execution time, and all invocations by function. Monitor Lambda functions and usage in Axiom The Axiom Lambda Extension gives you full visibility into the most important metrics and logs coming from your Lambda function out of the box without any further configuration required. Monitor Lambda functions and usage in Axiom ## Track cold start on your Lambda function [#track-cold-start-on-your-lambda-function] A cold start occurs when there’s a delay between your invocation and runtime created during the initialization process. During this period, there’s no available function instance to respond to an invocation. With the Axiom built-in Serverless AWS Lambda dashboard, you can track and see the effect of cold start on your Lambda functions and its impact on every Lambda function. This data lets you know when to take actionable steps, such as using provisioned concurrency or reducing function dependencies. Track cold start on your Lambda function ## Optimize slow-performing Lambda queries [#optimize-slow-performing-lambda-queries] Grouping logs with Lambda invocations and execution time by function provides insights into your events request and response pattern. You can extend your query to view when an invocation request is rejected and configure alerts to be notified on Serverless log patterns and Lambda function payloads. With the invocation request dashboard, you can monitor request function logs and see how your Lambda serverless functions process your events and Lambda queues over time. Optimize slow-performing Lambda queries ## Detect timeout on your Lambda function [#detect-timeout-on-your-lambda-function] Axiom Lambda function monitors let you identify the different points of invocation failures, cold-start delays, and AWS Lambda errors on your Lambda functions. With standard function logs like invocations by function, and Lambda cold start, monitoring the rate of your execution time can alert you to be aware of a significant spike whenever an error occurs in your Lambda function. Detect timeout on your Lambda function ## Smart filters [#smart-filters] Axiom Lambda Serverless Smart Filters lets you easily filter down to specific AWS Lambda functions or Serverless projects and use saved queries to get deep insights on how functions are performing with a single click. Smart filters --- # Connect Axiom with Netlify Source: https://axiom.co/docs/apps/netlify Netlify is a platform for building and deploying highly performant websites, e-commerce stores, and web apps. Netlify automatically builds your site and deploys it across its global edge network. Integrating Axiom with Netlify allows you to stream traffic, function, and deployment logs directly to Axiom, giving you comprehensive observability over your Netlify projects. With real-time, unsampled data, you can monitor site performance, detect errors quickly, and make informed decisions about your Jamstack apps. The Netlify integration supports all [edge deployments](/reference/edge-deployments). The integration sends data to your organization's default edge deployment automatically. This integration is only available for Netlify customers on enterprise-level plans where Log Drains are supported. For more information, see [Netlify documentation](https://docs.netlify.com/manage/monitoring/log-drains/). * [Create a Netlify account](https://app.netlify.com/signup). ## Setup [#setup] 1. In Axiom, click **Settings > Apps > Netlify > Install now**. 2. Click **Authorize**, and then copy the integration token. 3. In Netlify, select the site you want to integrate with Axiom. Go to **Logs & Metrics > Log Drains**, and then click **Enable a log drain**. 4. In **Log drain service**, select **Axiom**. 5. Select the log types to send to Axiom. 6. In **Region**, select the default edge deployment of your organization. The edge deployment you select must match the default edge deployment of your organization. To determine your organization's default edge deployment, see [Edge deployments](/reference/edge-deployments). 7. In **Integration token**, paste the integration token from Axiom. 8. Click **Connect**. For more information on Log Drains, see the [Netlify documentation](https://docs.netlify.com/manage/monitoring/log-drains/). ## Netlify dashboard [#netlify-dashboard] Axiom displays the data it receives in a pre-built Netlify dashboard that delivers immediate, actionable insights into your sites' activity and performance. This comprehensive overview includes: * **Traffic logs**: Monitor traffic volume, request patterns, and site configurations. * **Function logs**: Track serverless function executions, errors, and resource usage. * **Live log streaming**: Stream your site and app logs live with filtering for important information. With these insights, you can: * Quickly detect site errors and unusual traffic patterns. * Monitor serverless function performance and resource usage. * Analyze your build and deployment processes. * Drill down into specific events using APL queries. * Fork the dashboard and build your own custom site monitors. --- # Connect Axiom with Supabase Source: https://axiom.co/docs/apps/supabase Supabase is an open-source Firebase alternative that provides a Postgres database, authentication, instant APIs, edge functions, real-time subscriptions, storage, and vector embeddings. Integrating Axiom with Supabase allows you to stream your project's raw log events directly to Axiom using Supabase's log drain feature. With your logs in Axiom, you can query, visualize, and monitor your Supabase projects in real time, giving you full observability over your database operations, authentication events, and edge functions. * [Create a Supabase account](https://supabase.com/dashboard) and upgrade to a Pro, Team, or Enterprise plan. ## Setup [#setup] 1. In Supabase, go to your project's dashboard and navigate to **Project Settings > Log Drains**. 2. Click **Axiom**, and then create a new destination with the following configuration: * **Dataset name**: Enter the name of the Axiom dataset you created. * **API token**: Enter the Axiom API token you created. 3. Click **Save destination**. Supabase sends logs to Axiom as JSON raw log events with timestamps formatted for Axiom's ingestion endpoint. For more information on log drains, see the [Supabase documentation](https://supabase.com/docs/guides/telemetry/log-drains). ## Explore your Supabase data [#explore-your-supabase-data] After setting up the log drain, your Supabase logs appear in the dataset you specified. Open the [Stream tab](/query-data/stream) in Axiom to watch events arrive in real time. With your Supabase data in Axiom, you can: * Track authentication events and detect unusual sign-in patterns. * Observe edge function executions and errors. * Set up [monitors](/monitor-data/monitors) to get alerted about issues in your Supabase project. * Build [custom dashboards](/dashboards/create) tailored to your Supabase workload. --- # Connect Axiom with Tailscale Source: https://axiom.co/docs/apps/tailscale Tailscale is a secure networking solution that allows you to create and manage a private network (tailnet), securely connecting all your devices. Integrating Axiom with Tailscale allows you to stream your audit and network flow logs directly to Axiom seamlessly, unlocking powerful insights and analysis. Whether you’re conducting a security audit, optimizing performance, or ensuring compliance, Axiom’s Tailscale dashboard equips you with the tools to maintain a secure and efficient network, respond quickly to potential issues, and make informed decisions about your network configuration and usage. * [Create a Tailscale account](https://login.tailscale.com/start). ## Setup [#setup] 1. In Tailscale, go to the [configuration logs page](https://login.tailscale.com/admin/logs) of the admin console. 2. Add Axiom as a configuration log streaming destination in Tailscale. For more information, see the [Tailscale documentation](https://tailscale.com/kb/1255/log-streaming?q=stream#add-a-configuration-log-streaming-destination). ## Tailscale dashboard [#tailscale-dashboard] Axiom displays the data it receives in a pre-built Tailscale dashboard that delivers immediate, actionable insights into your tailnet’s activity and health. This comprehensive overview includes: * **Log type distribution**: Understand the balance between configuration audit logs and network flow logs over time. * **Top actions and hosts**: Identify the most common network actions and most active devices. * **Traffic visualization**: View physical, virtual, and exit traffic patterns for both sources and destinations. * **User activity tracking**: Monitor actions by user display name, email, and ID for security audits and compliance. * **Configuration log stream**: Access a detailed audit trail of all configuration changes. With these insights, you can: * Quickly identify unusual network activity or traffic patterns. * Track configuration changes and user actions. * Monitor overall network health and performance. * Investigate specific events or users as needed. * Understand traffic distribution across your tailnet. --- # Connect Axiom with Terraform Source: https://axiom.co/docs/apps/terraform Axiom Terraform Provider lets you provision and manage Axiom resources (datasets, notifiers, monitors, and users) with Terraform. This means that you can programmatically create resources, access existing ones, and perform further infrastructure automation tasks. Install the Axiom Terraform Provider from the [Terraform Registry](https://registry.terraform.io/providers/axiomhq/axiom/latest). To see the provider in action, check out the [example](https://github.com/axiomhq/terraform-provider-axiom/blob/main/example/main.tf). This guide explains how to install the provider and perform some common procedures such as creating new resources and accessing existing ones. For the full API reference, see the [documentation in the Terraform Registry](https://registry.terraform.io/providers/axiomhq/axiom/latest/docs). ## Prerequisites [#prerequisites] * [Sign up for a free Axiom account](https://app.axiom.co/register). All you need is an email address. * [Create an advanced API token in Axiom](/reference/tokens#create-advanced-api-token) with the permissions to perform the actions you want to use Terraform for. For example, to use Terraform to create and update datasets, create the advanced API token with these permissions. * [Create a Terraform account](https://app.terraform.io/signup/account). * [Install the Terraform CLI](https://developer.hashicorp.com/terraform/cli). ## Install the provider [#install-the-provider] To install the Axiom Terraform Provider from the [Terraform Registry](https://registry.terraform.io/providers/axiomhq/axiom/latest), follow these steps: 1. Add the following code to your Terraform configuration file. Replace `API_TOKEN` with the Axiom API token you have generated. For added security, store the API token in an environment variable. ```hcl terraform { required_providers { axiom = { source = "axiomhq/axiom" } } } provider "axiom" { api_token = "API_TOKEN" } ``` 2. In your terminal, go to the folder of your main Terraform configuration file, and then run the command `terraform init`. ## Create new resources [#create-new-resources] ### Create dataset [#create-dataset] To create a dataset in Axiom using the provider, add the following code to your Terraform configuration file. Customize the `name` and `description` fields. ```hcl resource "axiom_dataset" "test_dataset" { name = "test_dataset" description = "This is a test dataset created by Terraform." } ``` ### Create notifier [#create-notifier] To create a Slack notifier in Axiom using the provider, add the following code to your Terraform configuration file. Replace `SLACK_URL` with the webhook URL from your Slack instance. For more information on obtaining this URL, see the [Slack documentation](https://api.slack.com/messaging/webhooks). ```hcl resource "axiom_notifier" "test_slack_notifier" { name = "test_slack_notifier" properties = { slack = { slack_url = "SLACK_URL" } } } ``` To create a Discord notifier in Axiom using the provider, add the following code to your Terraform configuration file. * Replace `DISCORD_CHANNEL` with the webhook URL from your Discord instance. For more information on obtaining this URL, see the [Discord documentation](https://docs.discord.com/developers/platform/webhooks#webhook-events). * Replace `DISCORD_TOKEN` with your Discord API token. For more information on obtaining this token, see the [Discord documentation](https://docs.discord.com/developers/topics/oauth2#oauth2). ```hcl resource "axiom_notifier" "test_discord_notifier" { name = "test_discord_notifier" properties = { discord = { discord_channel = "DISCORD_CHANNEL" discord_token = "DISCORD_TOKEN" } } } ``` To create an email notifier in Axiom using the provider, add the following code to your Terraform configuration file. Replace `EMAIL1` and `EMAIL2` with the email addresses you want to notify. ```hcl resource "axiom_notifier" "test_email_notifier" { name = "test_email_notifier" properties = { email= { emails = ["EMAIL1","EMAIL2"] } } } ``` For more information on the types of notifier you can create, see the [documentation in the Terraform Registry](https://registry.terraform.io/providers/axiomhq/axiom/latest/docs/resources/notifier). ### Create monitor [#create-monitor] To create a monitor in Axiom using the provider, add the following code to your Terraform configuration file and customize it: ```hcl resource "axiom_monitor" "test_monitor" { depends_on = [axiom_dataset.test_dataset, axiom_notifier.test_slack_notifier] # `type` can be one of the following: # - "Threshold": For numeric values against thresholds. It requires `operator` and `threshold`. # - "MatchEvent": For detecting specific events. It doesn’t require `operator` and `threshold`. # - "AnomalyDetection": For detecting anomalies. It requires `compare_days` and `tolerance, operator`. type = "Threshold" name = "test_monitor" description = "This is a test monitor created by Terraform." apl_query = "['test_dataset'] | summarize count() by bin_auto(_time)" interval_minutes = 5 # `operator` is required for threshold and anomaly detection monitors. # Valid values are "Above", "AboveOrEqual", "Below", "BelowOrEqual". operator = "Above" range_minutes = 5 # `threshold` is required for threshold monitors threshold = 1 # `compare_days` and `tolerance` are required for anomaly detection monitors. # Uncomment the two lines below for anomaly detection monitors. # compare_days = 7 # tolerance = 25 notifier_ids = [ axiom_notifier.test_slack_notifier.id ] alert_on_no_data = false notify_by_group = false } ``` This example creates a monitor using the dataset `test_dataset` and the notifier `test_slack_notifier`. These are resources you have created and accessed in the sections above. * Customize the `name` and the `description` fields. * In the `apl_query` field, specify the APL query for the monitor. For more information on these fields, see the [documentation in the Terraform Registry](https://registry.terraform.io/providers/axiomhq/axiom/latest/docs/resources/monitor). ### Create user [#create-user] To create a user in Axiom using the provider, add the following code to your Terraform configuration file. Customize the `name`, `email`, and `role` fields. ```hcl resource "axiom_user" "test_user" { name = "test_user" email = "test@abc.com" role = "user" } ``` ## Access existing resources [#access-existing-resources] ### Access existing dataset [#access-existing-dataset] To access an existing dataset, follow these steps: 1. Determine the ID of the Axiom dataset by sending a GET request to the [`datasets` endpoint of the Axiom API](/restapi/endpoints/getDatasets). 2. Add the following code to your Terraform configuration file. Replace `DATASET_ID` with the ID of the Axiom dataset. ```hcl data "axiom_dataset" "test_dataset" { id = "DATASET_ID" } ``` ### Access existing notifier [#access-existing-notifier] To access an existing notifier, follow these steps: 1. Determine the ID of the Axiom notifier by sending a GET request to the `notifiers` endpoint of the Axiom API. 2. Add the following code to your Terraform configuration file. Replace `NOTIFIER_ID` with the ID of the Axiom notifier. ```hcl data "axiom_dataset" "test_slack_notifier" { id = "NOTIFIER_ID" } ``` ### Access existing monitor [#access-existing-monitor] To access an existing monitor, follow these steps: 1. Determine the ID of the Axiom monitor by sending a GET request to the `monitors` endpoint of the Axiom API. 2. Add the following code to your Terraform configuration file. Replace `MONITOR_ID` with the ID of the Axiom monitor. ```hcl data "axiom_monitor" "test_monitor" { id = "MONITOR_ID" } ``` ### Access existing user [#access-existing-user] To access an existing user, follow these steps: 1. Determine the ID of the Axiom user by sending a GET request to the `users` endpoint of the Axiom API. 2. Add the following code to your Terraform configuration file. Replace `USER_ID` with the ID of the Axiom user. ```hcl data "axiom_user" "test_user" { id = "USER_ID" } ``` --- # Connect Axiom with Vercel Source: https://axiom.co/docs/apps/vercel Connect Axiom with Vercel to get the deepest observability experience for your Vercel projects. Easily monitor data from requests, functions, and web vitals in one place. 100% live and 100% of your data, no sampling. Axiom’s Vercel app ships with a pre-built dashboard and pre-installed monitors so you can be in complete control of your projects with minimal effort. If you use Axiom Vercel integration, [annotations](/query-data/annotate-charts) are automatically created for deployments. The Vercel integration supports all [edge deployments](/reference/edge-deployments). The integration sends data to your organization’s default edge deployment automatically, without any additional configuration. ## What’s Vercel? [#whats-vercel] Vercel is a platform for frontend frameworks and static sites, built to integrate with your headless content, commerce, or database. Vercel provides a frictionless developer experience to take care of the hard things: deploying instantly, scaling automatically, and serving personalized content around the globe. Vercel makes it easy for frontend teams to develop, preview, and ship delightful user experiences, where performance is the default. ## Send logs to Axiom [#send-logs-to-axiom] Simply install the [Axiom Vercel app from here](https://vercel.com/integrations/axiom) and be streaming logs and web vitals within minutes. ## App Overview [#app-overview] ### Request and function logs [#request-and-function-logs] For both requests and serverless functions, Axiom automatically installs a [drain](https://vercel.com/docs/drains/using-drains) in your Vercel account to capture data live. As users interact with your website, various logs are produced. Axiom captures all these logs and ingests them into the `vercel` dataset. You can stream and analyze these logs live, or use the pre-built Vercel Dashboard to get an overview of all the important metrics. When you’re ready, you can fork the dashboard and start building your own. For function logs, if you call `console.log`, `console.warn` or `console.error` in your function, the output is also captured and made available as part of the log. You can use APL to easily search these logs. ## Web vitals [#web-vitals] Axiom supports capturing and analyzing Web Vital data directly from your user’s browser without any sampling and with more data than is available elsewhere. It’s perfect to pair with Vercel’s in-built analytics when you want to get really deep into a specific problem or debug issues with a specific audience (user-agent, location, region, etc). Web Vitals are only currently supported for Next.js websites. Expanded support is coming soon. ### Installation [#installation] Perform the following steps to install Web Vitals: 1. In your Vercel project, run `npm install --save next-axiom`. 2. In `next.config.js`, wrap your NextJS config in `withAxiom` as follows: ```js const { withAxiom } = require('next-axiom'); module.exports = withAxiom({ // ... your existing config }) ``` This proxies the Axiom ingest call to improve deliverability. 3. For Web Vitals, navigate to `app/layout.tsx` and add the `AxiomWebVitals` component: ```js import { AxiomWebVitals } from 'next-axiom'; export default function RootLayout() { return ( ...
...
); } ``` WebVitals are sent only from production deployments. 4. Deploy your site and watch data coming into your Axiom dashboard. * To send logs from different parts of your app, make use of the provided logging functions. For example: ```js log.info('Payment completed', { userID: '123', amount: '25USD' }); ``` ### Client Components [#client-components] For Client Components, replace the `log` prop usage with the `useLogger` hook: ```js 'use client'; import { useLogger } from 'next-axiom'; export default function ClientComponent() { const log = useLogger(); log.debug('User logged in', { userId: 42 }); return

Logged in

; } ``` ### Server Components [#server-components] For Server Components, create a logger and make sure to call flush before returning: ```js import { Logger } from 'next-axiom'; export default async function ServerComponent() { const log = new Logger(); log.info('User logged in', { userId: 42 }); // ... other operations ... await log.flush(); return

Logged in

; } ``` ### Route Handlers [#route-handlers] For Route Handlers, wrapping your Route Handlers in `withAxiom` adds a logger to your request and automatically log exceptions: ```js import { withAxiom, AxiomRequest } from 'next-axiom'; export const GET = withAxiom((req: AxiomRequest) => { req.log.info('Login function called'); // You can create intermediate loggers const log = req.log.with({ scope: 'user' }); log.info('User logged in', { userId: 42 }); return NextResponse.json({ hello: 'world' }); }); ``` ## Use Next.js 12 for Web Vitals [#use-nextjs-12-for-web-vitals] If you’re using Next.js version 12, follow the instructions below to integrate Axiom for logging and capturing Web Vitals data. In your `pages/_app.js` or `pages/_app.ts` and add the following line: ```js export { reportWebVitals } from 'next-axiom'; ``` ## Upgrade to Next.js 13 from Next.js 12 [#upgrade-to-nextjs-13-from-nextjs-12] If you plan on upgrading to Next.js 13, you’ll need to make specific changes to ensure compatibility: * Upgrade the next-axiom package to version `1.0.0` or higher: * Make sure any exported variables have the `NEXT_PUBLIC_ prefix`, for example,, `NEXT_PUBLIC_AXIOM_TOKEN`. * In client components, use the `useLogger` hook instead of the `log` prop. * For server-side components, you need to create an instance of the `Logger` and flush the logs before the component returns. * For Web Vitals tracking, you’ll replace the previous method of capturing data. Remove the `reportWebVitals()` line and instead integrate the `AxiomWebVitals` component into your layout. ## Vercel Function logs 4KB limit [#vercel-function-logs-4kb-limit] The Vercel 4KB log limit refers to a restriction placed by Vercel on the size of log output generated by serverless functions running on their platform. The 4KB log limit means that each log entry produced by your function should be at most 4 Kilobytes in size. If your log output is larger than 4KB, you might experience truncation or missing logs. To log above this limit, you can send your function logs using [next-axiom](https://github.com/axiomhq/next-axiom). ## Parse JSON on the message field [#parse-json-on-the-message-field] If you use a logging library in your Vercel project that prints JSON, your **message** field contains a stringified and therefore escaped JSON object. * If your Vercel logs are encoded as JSON, they look like this: ```json { "level": "error", "message": "{ \"message\": \"user signed in\", \"metadata\": { \"userId\": 2234, \"signInType\": \"sso-google\" }}", "request": { "host": "www.axiom.co", "id": "iad1:iad1::sgh2r-1655985890301-f7025aa764a9", "ip": "199.16.157.13", "method": "GET", "path": "/sign-in/google", "scheme": "https", "statusCode": 500, "teamName": "AxiomHQ", }, "vercel": { "deploymentId": "dpl_7UcdgdgNsdgbcPY3Lg6RoXPfA6xbo8", "deploymentURL": "axiom-bdsgvweie6au-axiomhq.vercel.app", "projectId": "prj_TxvF2SOZdgdgwJ2OBLnZH2QVw7f1Ih7", "projectName": "axiom-co", "region": "iad1", "route": "/signin/[id]", "source": "lambda-log" } } ``` * The **JSON** data in your **message** would be: ```json { "message": "user signed in", "metadata": { "userId": 2234, "signInType": "sso-google" } } ``` You can **parse** the JSON using the [parse\_json function](/apl/scalar-functions/string-functions#parse-json\(\)) and run queries against the **values** in the **message** field. ### Example [#example] ```kusto ['vercel'] | extend parsed = parse_json(message) ``` * You can select the field to **insert** into new columns using the [project operator](/apl/tabular-operators/project-operator) ```kusto ['vercel'] | extend parsed = parse_json('{"message":"user signed in", "metadata": { "userId": 2234, "SignInType": "sso-google" }}') | project parsed["message"] ``` ### More Examples [#more-examples] * If you have **null values** in your data you can use the **isnotnull()** function ```kusto ['vercel'] | extend parsed = parse_json(message) | where isnotnull(parsed) | summarize count() by parsed["message"], parsed["metadata"]["userId"] ``` * Check out the [APL Documentation on how to use more functions](/apl/scalar-functions/string-functions) and run your own queries against your Vercel logs. ## Migrate from Vercel app to next-axiom [#migrate-from-vercel-app-to-next-axiom] In May 2024, Vercel [introduced higher costs](https://axiom.co/blog/changes-to-vercel-log-drains) for using Vercel Drains. Because the Axiom Vercel app depends on Drains, using the next-axiom library can be the cheaper option to analyze telemetry data for higher volume projects. To migrate from the Axiom Vercel app to the next-axiom library, follow these steps: 1. Delete the existing log drain from your Vercel project. 2. Delete `NEXT_PUBLIC_AXIOM_INGEST_ENDPOINT` from the environment variables of your Vercel project. For more information, see the [Vercel documentation](https://vercel.com/projects/environment-variables). 3. [Create a new dataset in Axiom](/reference/datasets), and [create a new advanced API token](/reference/tokens) with ingest permissions for that dataset. 4. Add the following environment variables to your Vercel project: * `NEXT_PUBLIC_AXIOM_DATASET` is the name of the Axiom dataset where you want to send data. * `NEXT_PUBLIC_AXIOM_TOKEN` is the Axiom API token you have generated. 5. In your terminal, go to the root folder of your Next.js app, and then run `npm install --save next-axiom` to install the latest version of next-axiom. 6. In the `next.config.ts` file, wrap your Next.js configuration in `withAxiom`: ```js const { withAxiom } = require('next-axiom'); module.exports = withAxiom({ // Your existing configuration }); ``` For more configuration options, see the [documentation in the next-axiom GitHub repository](https://github.com/axiomhq/next-axiom). ## Send logs from Vercel preview deployments [#send-logs-from-vercel-preview-deployments] To send logs from Vercel preview deployments to Axiom, enable preview deployments for the environment variable `NEXT_PUBLIC_AXIOM_INGEST_ENDPOINT`. For more information, see the [Vercel documentation](https://vercel.com/docs/projects/environment-variables/managing-environment-variables). --- # Intelligence Source: https://axiom.co/docs/console/intelligence Axiom’s Console is evolving from a powerful space for human-led investigation to incorporate assistance that helps you reach insights faster. By combining Axiom's cost-efficient data platform with intelligence features, Axiom is transforming common workflows from reactive chores into proactive, machine-assisted actions. This section covers the intelligence features built into the Axiom Console. ## Spotlight [#spotlight] Spotlight is an interactive analysis feature that helps you find the root cause faster. Rather than reviewing data from a notable period event-by-event, Spotlight allows you to compare a subset against baseline automatically. Spotlight analyzes every field to surface the most significant differences, turning manual investigation into a fast, targeted discovery process. Learn more about [Spotlight](/console/intelligence/spotlight). ## AI agent integrations [#ai-agent-integrations] Axiom provides two complementary approaches for integrating AI agents with your data: ### Axiom MCP Server [#axiom-mcp-server] Axiom MCP Server is a [Model Context Protocol](https://modelcontextprotocol.io/) server implementation that enables AI agents to query your data using Axiom Processing Language (APL). MCP provides OAuth-based credential isolation where agents never see your tokens. Learn more about [Axiom MCP Server](/console/intelligence/mcp-server). ### Skills [#skills] Skills are instruction files that give AI coding agents specialized capabilities. Skills work by embedding methodology and context directly into the agent's prompt. Learn more about [Axiom Skills for AI agents](/console/intelligence/skills). ## AI-assisted workflows [#ai-assisted-workflows] Axiom also includes several features that leverage AI to accelerate common workflows. ### Natural language querying [#natural-language-querying] Ask questions of your data in plain English and have Axiom translate your request directly into a valid Axiom Processing Language (APL) query. This lowers the barrier to exploring your data and makes it easier for everyone on your team to find the answers they need. Learn more about [generating queries using AI](/query-data/query-editor#generate-query-using-natural-language). ### AI-powered dashboard generation [#ai-powered-dashboard-generation] Instead of building dashboards from scratch, you can describe your requirements in natural language and have Axiom generate a complete dashboard for you instantly. Axiom analyzes your events and goals to select the most appropriate visualizations. Learn more about [generating dashboards using AI](/dashboards/create#generate-dashboards-using-ai). ### AI summaries in Spotlight [#ai-summaries-in-spotlight] Spotlight provides you with clear, concise explanations of the key differences between selected and baseline data. This makes it easier to spot root causes, understand anomalies, and communicate findings to your team, without needing to pore over every visualization. --- # Configure dashboard elements Source: https://axiom.co/docs/dashboard-elements/configure When you create a chart, click to access the following options. ## Values [#values] Specify how to treat missing or undefined values: * **Auto:** This option automatically decides the best way to represent missing or undefined values in the data series based on the chart type and the rest of the data. * **Ignore:** This option ignores any missing or undefined values in the data series. This means that the chart only displays the known, defined values. * **Join adjacent values:** This option connects adjacent data points in the data series, effectively filling in any gaps caused by missing values. The benefit of joining adjacent values is that it can provide a smoother, more continuous visualization of your data. * **Fill with zeros:** This option replaces any missing or undefined values in the data series with zero. This can be useful if you want to emphasize that the data is missing or undefined, as it causes a drop to zero in your chart. ## Variant [#variant] Specify the chart type. **Area:** An area chart displays the area between the data line and the axes, often filled with a color or pattern. Stacked charts provide the capability to design and implement intricate query dashboards while integrating advanced visualizations, enriching your logging experience over time. Area chart **Bars:** A bar chart represents data in rectangular bars. The length of each bar is proportional to the value it represents. Bar charts can be used to compare discrete quantities, or when you have categorical data. Bar chart **Line:** A line chart connects individual data points into a continuous line, which is useful for showing logs over time. Line charts are often used for time series data. Line chart ## Y-Axis [#y-axis] Specify the scale of the vertical axis. **Linear:** A linear scale maintains a consistent scale where equal distances represent equal changes in value. This is the most common scale type and is useful for most types of data. Linear scale **Log:** A logarithmic (or log) scale represents values in terms of their order of magnitude. Each unit of distance on a log scale represents a tenfold increase in value. Log scales make it easy to see backend errors and compare values across a wide range. Log scale ## Annotations [#annotations] Specify the types of annotations to display in the chart: * Show all annotations * Hide all annotations * Selective determine the annotations types to display --- # Create dashboard elements Source: https://axiom.co/docs/dashboard-elements/create Dashboard elements are the different visual elements that you can include in your dashboard to display your data and other information. For example, you can track key metrics, logs, and traces, and monitor real-time data flow. You can create the following dashboard elements: * [Filter bar](/query-data/filters) * [Gauge](/dashboard-elements/gauge) * [Heatmap](/dashboard-elements/heatmap) * [Log stream](/dashboard-elements/log-stream) * [Monitor list](/dashboard-elements/monitor-list) * [Note](/dashboard-elements/note) * [Pie](/dashboard-elements/pie-chart) * [Scatter](/dashboard-elements/scatter-plot) * [Statistic](/dashboard-elements/statistic) * [Table](/dashboard-elements/table) * [Time series](/dashboard-elements/time-series) * [Top list](/dashboard-elements/top-list) * [Spacer](/dashboard-elements/spacer) To organize related dashboard elements into collapsible groups, [create dashboard sections](/dashboards/sections). ## Create dashboard elements [#create-dashboard-elements] 1. [Create a dashboard](/dashboards/create) or open an existing dashboard. 2. Click **Edit dashboard**. 3. Click **Add element** in the top right corner. 4. Choose the dashboard element from the list. 5. For charts, select one of the following: * Click **Builder** to create your chart using a [visual query builder](#create-chart-using-visual-query-builder). * Click **APL** to create your chart using the Axiom Processing Language (APL). Create a chart in the same way you create a chart in the [Editor of the Query tab](/query-data/query-editor). 6. Optional: [Configure chart options](/dashboard-elements/configure). 7. Optional: Set a custom time range that’s different from the dashboard’s time range. 8. Click **Save**. The new element appears in your dashboard. At the bottom, click **Save** to save your changes to the dashboard. ## Create chart using visual query builder [#create-chart-using-visual-query-builder] Use the query builder to create or edit queries for the selected dataset: Query builder This component is a visual query builder that eases the process of building visualizations and segments of your data. This guide walks you through the individual sections of the query builder. ### Time range [#time-range] Every query has a start and end time and the time range component allows quick selection of common time ranges as well as the ability to input specific start and end timestamps: Time range * Use the **Quick Range** items to quickly select popular ranges * Use the **Custom Start/End Date** inputs to select specific times * Use the **Resolution** items to choose between various time bucket resolutions ### Against [#against] When a time series visualization is selected, such as `count`, the **Against** menu is enabled and it’s possible to select a historical time to compare the results of your time range too. For example, to compare the last hour’s average response time to the same time yesterday, select `1 hr` in the time range menu, and then select `-1D` from the **Against** menu: Time range against menu The results look like this: Time range against chart The dotted line represents results from the base date, and the totals table includes the comparative totals. When you add `field` to the `group by` clause, the **time range against** values are attached to each `events`. Time range against chart ### Visualizations [#visualizations] Axiom provides powerful visualizations that display the output of running aggregate functions across your dataset. The Visualization menu allows you to add these visualizations and, where required, input their arguments: Visualizations menu You can select a visualization to add it to the query. If a visualization requires an argument (such as the field and/or other parameters), the menu allows you to select eligible fields and input those arguments. Press Enter to complete the addition. Click Visualization in the query builder to edit it at any time. [Learn about supported visualizations](/query-data/visualizations) ### Filters [#filters] Use the filter menu to attach filter clauses to your search. Axiom supports AND/OR operators at the top-level as well as one level deep. This means you can create filters that would read as `status == 200 AND (method == get OR method == head) AND (user-agent contains Mozilla or user-agent contains Webkit)`. Filters are divided up by the field type they operate on, but some may apply to more than one field type. #### List of filters [#list-of-filters] *String Fields* * `==` * `!=` * `exists` * `not-exists` * `starts-with` * `not-starts-with` * `ends-with` * `not-ends-with` * `contains` * `not-contains` * `regexp` * `not-regexp` *Number Fields* * `==` * `!=` * `exists` * `not-exists` * `>` * `>=` * `<` * `<=` *Boolean Fields* * `==` * `!=` * `exists` * `not-exists` *Array Fields* * `contains` * `not-contains` * `exists` * `not-exists` ### Group by (segmentation) [#group-by-segmentation] When visualizing data, it can be useful to segment data into specific groups to more clearly understand how the data behaves. The Group By component enables you to add one or more fields to group events by: Group by ### Other options [#other-options] #### Order [#order] By default, Axiom automatically chooses the best ordering for results. However, you can manually set the desired order through this menu. #### Limit [#limit] By default, Axiom chooses a reasonable limit for the query that has been passed in. However, you can control that limit manually through this component. ## Change element’s position [#change-elements-position] To change element’s position on the dashboard, drag the title bar of the chart.