Create a new forward config to archive your logs in another system
curl --request POST \
--url https://api.eu.bronto.io/forward-configs \
--header 'Content-Type: application/json' \
--header 'X-BRONTO-API-KEY: <api-key>' \
--data @- <<EOF
{
"name": "Archive data to S3",
"compression": "ZSTD",
"all_logs": true,
"destination": {
"destination_type": "S3",
"bucket": "my-archive-bucket",
"prefix": "bronto/archives/",
"storage_class": "STANDARD"
},
"description": "Sending data to S3 for long term store",
"filter": "level='ERROR' or level='WARN'",
"log_ids": [
"<string>"
],
"max_payload_size_bytes": 10000000,
"max_payload_size_events": 1000,
"max_buffer_time_ms": 300000
}
EOFimport requests
url = "https://api.eu.bronto.io/forward-configs"
payload = {
"name": "Archive data to S3",
"compression": "ZSTD",
"all_logs": True,
"destination": {
"destination_type": "S3",
"bucket": "my-archive-bucket",
"prefix": "bronto/archives/",
"storage_class": "STANDARD"
},
"description": "Sending data to S3 for long term store",
"filter": "level='ERROR' or level='WARN'",
"log_ids": ["<string>"],
"max_payload_size_bytes": 10000000,
"max_payload_size_events": 1000,
"max_buffer_time_ms": 300000
}
headers = {
"X-BRONTO-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-BRONTO-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Archive data to S3',
compression: 'ZSTD',
all_logs: true,
destination: {
destination_type: 'S3',
bucket: 'my-archive-bucket',
prefix: 'bronto/archives/',
storage_class: 'STANDARD'
},
description: 'Sending data to S3 for long term store',
filter: 'level=\'ERROR\' or level=\'WARN\'',
log_ids: ['<string>'],
max_payload_size_bytes: 10000000,
max_payload_size_events: 1000,
max_buffer_time_ms: 300000
})
};
fetch('https://api.eu.bronto.io/forward-configs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.eu.bronto.io/forward-configs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Archive data to S3',
'compression' => 'ZSTD',
'all_logs' => true,
'destination' => [
'destination_type' => 'S3',
'bucket' => 'my-archive-bucket',
'prefix' => 'bronto/archives/',
'storage_class' => 'STANDARD'
],
'description' => 'Sending data to S3 for long term store',
'filter' => 'level=\'ERROR\' or level=\'WARN\'',
'log_ids' => [
'<string>'
],
'max_payload_size_bytes' => 10000000,
'max_payload_size_events' => 1000,
'max_buffer_time_ms' => 300000
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-BRONTO-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.eu.bronto.io/forward-configs"
payload := strings.NewReader("{\n \"name\": \"Archive data to S3\",\n \"compression\": \"ZSTD\",\n \"all_logs\": true,\n \"destination\": {\n \"destination_type\": \"S3\",\n \"bucket\": \"my-archive-bucket\",\n \"prefix\": \"bronto/archives/\",\n \"storage_class\": \"STANDARD\"\n },\n \"description\": \"Sending data to S3 for long term store\",\n \"filter\": \"level='ERROR' or level='WARN'\",\n \"log_ids\": [\n \"<string>\"\n ],\n \"max_payload_size_bytes\": 10000000,\n \"max_payload_size_events\": 1000,\n \"max_buffer_time_ms\": 300000\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-BRONTO-API-KEY", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.eu.bronto.io/forward-configs")
.header("X-BRONTO-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Archive data to S3\",\n \"compression\": \"ZSTD\",\n \"all_logs\": true,\n \"destination\": {\n \"destination_type\": \"S3\",\n \"bucket\": \"my-archive-bucket\",\n \"prefix\": \"bronto/archives/\",\n \"storage_class\": \"STANDARD\"\n },\n \"description\": \"Sending data to S3 for long term store\",\n \"filter\": \"level='ERROR' or level='WARN'\",\n \"log_ids\": [\n \"<string>\"\n ],\n \"max_payload_size_bytes\": 10000000,\n \"max_payload_size_events\": 1000,\n \"max_buffer_time_ms\": 300000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eu.bronto.io/forward-configs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-BRONTO-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Archive data to S3\",\n \"compression\": \"ZSTD\",\n \"all_logs\": true,\n \"destination\": {\n \"destination_type\": \"S3\",\n \"bucket\": \"my-archive-bucket\",\n \"prefix\": \"bronto/archives/\",\n \"storage_class\": \"STANDARD\"\n },\n \"description\": \"Sending data to S3 for long term store\",\n \"filter\": \"level='ERROR' or level='WARN'\",\n \"log_ids\": [\n \"<string>\"\n ],\n \"max_payload_size_bytes\": 10000000,\n \"max_payload_size_events\": 1000,\n \"max_buffer_time_ms\": 300000\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Archive data to S3",
"compression": "ZSTD",
"all_logs": true,
"destination": {
"destination_type": "S3",
"bucket": "my-archive-bucket",
"prefix": "bronto/archives/",
"storage_class": "STANDARD"
},
"created_at": 1710948395538,
"description": "Sending data to S3 for long term store",
"filter": "level='ERROR' or level='WARN'",
"log_ids": [
"<string>"
],
"max_payload_size_bytes": 10000000,
"max_payload_size_events": 1000,
"max_buffer_time_ms": 300000
}{
"code": 201,
"correlation_id": "<string>",
"message": "<string>"
}{
"code": 201,
"correlation_id": "<string>",
"message": "<string>"
}{
"code": 201,
"correlation_id": "<string>",
"message": "<string>"
}{
"code": 201,
"correlation_id": "<string>",
"message": "<string>"
}{
"code": 201,
"correlation_id": "<string>",
"message": "<string>"
}Create a new forward config to archive your logs in another system
Create a forward config, to forward log events outside the Bronto system (e.g. archive logs in an S3 bucket)
POST
/
forward-configs
Create a new forward config to archive your logs in another system
curl --request POST \
--url https://api.eu.bronto.io/forward-configs \
--header 'Content-Type: application/json' \
--header 'X-BRONTO-API-KEY: <api-key>' \
--data @- <<EOF
{
"name": "Archive data to S3",
"compression": "ZSTD",
"all_logs": true,
"destination": {
"destination_type": "S3",
"bucket": "my-archive-bucket",
"prefix": "bronto/archives/",
"storage_class": "STANDARD"
},
"description": "Sending data to S3 for long term store",
"filter": "level='ERROR' or level='WARN'",
"log_ids": [
"<string>"
],
"max_payload_size_bytes": 10000000,
"max_payload_size_events": 1000,
"max_buffer_time_ms": 300000
}
EOFimport requests
url = "https://api.eu.bronto.io/forward-configs"
payload = {
"name": "Archive data to S3",
"compression": "ZSTD",
"all_logs": True,
"destination": {
"destination_type": "S3",
"bucket": "my-archive-bucket",
"prefix": "bronto/archives/",
"storage_class": "STANDARD"
},
"description": "Sending data to S3 for long term store",
"filter": "level='ERROR' or level='WARN'",
"log_ids": ["<string>"],
"max_payload_size_bytes": 10000000,
"max_payload_size_events": 1000,
"max_buffer_time_ms": 300000
}
headers = {
"X-BRONTO-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-BRONTO-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Archive data to S3',
compression: 'ZSTD',
all_logs: true,
destination: {
destination_type: 'S3',
bucket: 'my-archive-bucket',
prefix: 'bronto/archives/',
storage_class: 'STANDARD'
},
description: 'Sending data to S3 for long term store',
filter: 'level=\'ERROR\' or level=\'WARN\'',
log_ids: ['<string>'],
max_payload_size_bytes: 10000000,
max_payload_size_events: 1000,
max_buffer_time_ms: 300000
})
};
fetch('https://api.eu.bronto.io/forward-configs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.eu.bronto.io/forward-configs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Archive data to S3',
'compression' => 'ZSTD',
'all_logs' => true,
'destination' => [
'destination_type' => 'S3',
'bucket' => 'my-archive-bucket',
'prefix' => 'bronto/archives/',
'storage_class' => 'STANDARD'
],
'description' => 'Sending data to S3 for long term store',
'filter' => 'level=\'ERROR\' or level=\'WARN\'',
'log_ids' => [
'<string>'
],
'max_payload_size_bytes' => 10000000,
'max_payload_size_events' => 1000,
'max_buffer_time_ms' => 300000
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-BRONTO-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.eu.bronto.io/forward-configs"
payload := strings.NewReader("{\n \"name\": \"Archive data to S3\",\n \"compression\": \"ZSTD\",\n \"all_logs\": true,\n \"destination\": {\n \"destination_type\": \"S3\",\n \"bucket\": \"my-archive-bucket\",\n \"prefix\": \"bronto/archives/\",\n \"storage_class\": \"STANDARD\"\n },\n \"description\": \"Sending data to S3 for long term store\",\n \"filter\": \"level='ERROR' or level='WARN'\",\n \"log_ids\": [\n \"<string>\"\n ],\n \"max_payload_size_bytes\": 10000000,\n \"max_payload_size_events\": 1000,\n \"max_buffer_time_ms\": 300000\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-BRONTO-API-KEY", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.eu.bronto.io/forward-configs")
.header("X-BRONTO-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Archive data to S3\",\n \"compression\": \"ZSTD\",\n \"all_logs\": true,\n \"destination\": {\n \"destination_type\": \"S3\",\n \"bucket\": \"my-archive-bucket\",\n \"prefix\": \"bronto/archives/\",\n \"storage_class\": \"STANDARD\"\n },\n \"description\": \"Sending data to S3 for long term store\",\n \"filter\": \"level='ERROR' or level='WARN'\",\n \"log_ids\": [\n \"<string>\"\n ],\n \"max_payload_size_bytes\": 10000000,\n \"max_payload_size_events\": 1000,\n \"max_buffer_time_ms\": 300000\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eu.bronto.io/forward-configs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-BRONTO-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Archive data to S3\",\n \"compression\": \"ZSTD\",\n \"all_logs\": true,\n \"destination\": {\n \"destination_type\": \"S3\",\n \"bucket\": \"my-archive-bucket\",\n \"prefix\": \"bronto/archives/\",\n \"storage_class\": \"STANDARD\"\n },\n \"description\": \"Sending data to S3 for long term store\",\n \"filter\": \"level='ERROR' or level='WARN'\",\n \"log_ids\": [\n \"<string>\"\n ],\n \"max_payload_size_bytes\": 10000000,\n \"max_payload_size_events\": 1000,\n \"max_buffer_time_ms\": 300000\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "Archive data to S3",
"compression": "ZSTD",
"all_logs": true,
"destination": {
"destination_type": "S3",
"bucket": "my-archive-bucket",
"prefix": "bronto/archives/",
"storage_class": "STANDARD"
},
"created_at": 1710948395538,
"description": "Sending data to S3 for long term store",
"filter": "level='ERROR' or level='WARN'",
"log_ids": [
"<string>"
],
"max_payload_size_bytes": 10000000,
"max_payload_size_events": 1000,
"max_buffer_time_ms": 300000
}{
"code": 201,
"correlation_id": "<string>",
"message": "<string>"
}{
"code": 201,
"correlation_id": "<string>",
"message": "<string>"
}{
"code": 201,
"correlation_id": "<string>",
"message": "<string>"
}{
"code": 201,
"correlation_id": "<string>",
"message": "<string>"
}{
"code": 201,
"correlation_id": "<string>",
"message": "<string>"
}This feature allows users to forward log events outside of Bronto. A common use case would be archiving your log data to an AWS S3 bucket.
Body
application/json
Response
Forward config is created successfully
