@timestamp, not _time. For example:
Prerequisites
- Create an Axiom account.
- Create a dataset in Axiom where you send your data.
- Create an API token in Axiom with permissions to ingest data to the dataset you have created.
Send logs to Axiom using the Elasticsearch Bulk API and Go
To send logs to Axiom using the Elasticsearch Bulk API and Go, use thenet/http package to create and send the HTTP request.
Prepare your data
The data needs to be formatted as per the Bulk API’s requirements. Here’s a simple example of how to prepare your data:Send data to Axiom
Get an Axiom API token for the Authorization header, and create a dataset.Replace
AXIOM_DOMAIN with api.axiom.co if your organization uses the US region. For more information, see Regions.Replace API_TOKEN with the Axiom API token you have generated. For added security, store the API token in an environment variable.Replace DATASET_NAME with the name of the Axiom dataset where you send your data.Send logs to Axiom using the Elasticsearch Bulk API and Python
To send logs to Axiom using the Elasticsearch Bulk API and Python, use the built-inrequests library.
Prepare your data
The data sent needs to be formatted as per the Bulk API’s requirements. Here’s a simple example of how to prepare the data:Send data to Axiom
Obtain an Axiom API token for the Authorization header, and dataset.Replace
AXIOM_DOMAIN with api.axiom.co if your organization uses the US region. For more information, see Regions.Replace API_TOKEN with the Axiom API token you have generated. For added security, store the API token in an environment variable.Replace DATASET_NAME with the name of the Axiom dataset where you send your data.Send logs to Axiom using the Elasticsearch Bulk API and JavaScript
Use the axios library in JavaScript to send logs to Axiom using the Elasticsearch Bulk API.Prepare your data
The data sent needs to be formatted as per the Bulk API’s requirements. Here’s a simple example of how to prepare the data:Send data to Axiom
Obtain an Axiom API token for the Authorization header, and dataset.Replace
AXIOM_DOMAIN with api.axiom.co if your organization uses the US region. For more information, see Regions.Replace API_TOKEN with the Axiom API token you have generated. For added security, store the API token in an environment variable.Replace DATASET_NAME with the name of the Axiom dataset where you send your data.Send logs to Axiom using the Elasticsearch Bulk API and PHP
To send logs from PHP to Axiom using the Elasticsearch Bulk API, make sure you have installed the necessary PHP libraries: Guzzle for making HTTP requests and JsonMachine for handling newline-delimited JSON data.Prepare your data
The data sent needs to be formatted as per the Bulk API’s requirements. Here’s a simple example of how to prepare the data:Send data to Axiom
Replace
AXIOM_DOMAIN with api.axiom.co if your organization uses the US region. For more information, see Regions.Replace API_TOKEN with the Axiom API token you have generated. For added security, store the API token in an environment variable.Replace DATASET_NAME with the name of the Axiom dataset where you send your data.