cURL
curl --request PUT \
--url https://{tenant}.chronosphere.io/api/v1/config/log-control-config \
--header 'API-Token: <api-key>' \
--header 'Content-Type: application/json' \
--data '{}'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{tenant}.chronosphere.io/api/v1/config/log-control-config"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("API-Token", "<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.put("https://{tenant}.chronosphere.io/api/v1/config/log-control-config")
.header("API-Token", "<api-key>")
.header("Content-Type", "application/json")
.body("{}")
.asString();const options = {
method: 'PUT',
headers: {'API-Token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://{tenant}.chronosphere.io/api/v1/config/log-control-config', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{tenant}.chronosphere.io/api/v1/config/log-control-config"
payload = {}
headers = {
"API-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"log_control_config": {
"created_at": "2023-11-07T05:31:56Z",
"rules": [
{
"drop_field": {
"field_regex": "<string>",
"parent_path": {
"selector": "<string>"
}
},
"emit_metrics": {
"name": "<string>",
"counter": {
"value": {
"selector": "<string>"
}
},
"drop_log": true,
"gauge": {
"value": {
"selector": "<string>"
}
},
"histogram": {
"value": {
"selector": "<string>"
}
},
"labels": [
{
"key": "<string>",
"value": {
"selector": "<string>"
}
}
]
},
"filter": "<string>",
"name": "<string>",
"parse_field": {
"destination": {
"selector": "<string>"
},
"parser": {
"grok_parser": {
"pattern": "<string>"
},
"key_value_parser": {
"delimiter": "<string>",
"pair_separator": "<string>",
"trim_set": "<string>"
},
"regex_parser": {
"regex": "<string>"
}
},
"source": {
"selector": "<string>"
}
},
"replace_field": {
"field": {
"selector": "<string>"
},
"replace_regex": "<string>",
"mapped_value": {
"default_value": "<string>",
"pairs": [
{
"key": "<string>",
"value": "<string>"
}
],
"use_default": true
},
"replace_all": true,
"static_value": {
"value": "<string>"
}
},
"sample": {
"rate": 123
}
}
],
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{}UpdateLogControlConfig
PUT
/
api
/
v1
/
config
/
log-control-config
cURL
curl --request PUT \
--url https://{tenant}.chronosphere.io/api/v1/config/log-control-config \
--header 'API-Token: <api-key>' \
--header 'Content-Type: application/json' \
--data '{}'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{tenant}.chronosphere.io/api/v1/config/log-control-config"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("API-Token", "<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.put("https://{tenant}.chronosphere.io/api/v1/config/log-control-config")
.header("API-Token", "<api-key>")
.header("Content-Type", "application/json")
.body("{}")
.asString();const options = {
method: 'PUT',
headers: {'API-Token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://{tenant}.chronosphere.io/api/v1/config/log-control-config', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{tenant}.chronosphere.io/api/v1/config/log-control-config"
payload = {}
headers = {
"API-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"log_control_config": {
"created_at": "2023-11-07T05:31:56Z",
"rules": [
{
"drop_field": {
"field_regex": "<string>",
"parent_path": {
"selector": "<string>"
}
},
"emit_metrics": {
"name": "<string>",
"counter": {
"value": {
"selector": "<string>"
}
},
"drop_log": true,
"gauge": {
"value": {
"selector": "<string>"
}
},
"histogram": {
"value": {
"selector": "<string>"
}
},
"labels": [
{
"key": "<string>",
"value": {
"selector": "<string>"
}
}
]
},
"filter": "<string>",
"name": "<string>",
"parse_field": {
"destination": {
"selector": "<string>"
},
"parser": {
"grok_parser": {
"pattern": "<string>"
},
"key_value_parser": {
"delimiter": "<string>",
"pair_separator": "<string>",
"trim_set": "<string>"
},
"regex_parser": {
"regex": "<string>"
}
},
"source": {
"selector": "<string>"
}
},
"replace_field": {
"field": {
"selector": "<string>"
},
"replace_regex": "<string>",
"mapped_value": {
"default_value": "<string>",
"pairs": [
{
"key": "<string>",
"value": "<string>"
}
],
"use_default": true
},
"replace_all": true,
"static_value": {
"value": "<string>"
}
},
"sample": {
"rate": 123
}
}
],
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{}Authorizations
Chronosphere API token
Body
application/json
If true, the LogControlConfig will be created if it does not already exist. If false, an error will be returned if the LogControlConfig does not already exist.
If true, validates the specified configuration without creating or updating the LogControlConfig. If the specified configuration is valid, the endpoint returns a partial response without the LogControlConfig. If the specified configuration is invalid, the endpoint returns an error.
The LogControlConfig to update.
Show child attributes
Show child attributes
Response
A successful response containing the updated LogControlConfig.
LogControlConfig is a singleton configuration object that specifies the configuration for log control.
Show child attributes
Show child attributes
⌘I

