@kamlesh_vaghela Sir , may I ask about add data to kv store . I have try example from SA-devforall post entry as below function postNewEntry() {
var record = {
_time: (new Date).getT...
See more...
@kamlesh_vaghela Sir , may I ask about add data to kv store . I have try example from SA-devforall post entry as below function postNewEntry() {
var record = {
_time: (new Date).getTime() / 1000,
status: $("#status").val(),
message: $("#message").val(),
user: Splunk.util.getConfigValue("USERNAME")
}
$.ajax({
url: '/en-US/splunkd/__raw/servicesNS/nobody/SA-devforall/storage/collections/data/example_test',
type: 'POST',
contentType: "application/json",
async: false,
data: JSON.stringify(record),
success: function(returneddata) { newkey = returneddata }
})
} and modify it to mine function postNewEntry(unique_id, status) {
var record = {
_time: (new Date).getTime() / 1000,
status: $("#status").val(),
unique_id: $("#unique_id").val(),
}
$.ajax({
url: ' https://10.1.1.1:8089/servicesNS/nobody/test/storage/collections/data/man_data/',
type: 'POST',
contentType: "application/json",
async: false,
data: JSON.stringify(record),
success: function(returneddata) { newkey = returneddata }
})
} always get , net::ERR_CERT_AUTHORITY_INVALID if I do it one linux curl , and get another error code by test another kv-store file [root@test-Splunk01 local]# curl -k -u admin:admin123 https://10.1.1.1:8089/serviceNS/nobody/test/storage/collections/data/splunk_man -H 'Content-Type: application/json' -d '{"status": "UnACK" , "unique_id" : "11305421231213"}'
<!doctype html><html><head><meta http-equiv="content-type" content="text/html; charset=UTF-8"><title>405 Method Not Allowed</title></head><body><h1>Method Not Allowed</h1><p>Specified method is not allowed on this resource.</p></body></html> what can I do now ... btw , this is my transforms config .. [root@plunk01 local]# cat transforms.conf
[man_data]
fields_list = _key , unique_id , status
[splunk_man]
collection = splunk_man
external_type = kvstore
fields_list = _key, unique_id , status thank u so much