Closed ishu52 closed 5 years ago
Btw. there is also a https://groups.google.com/forum/#!forum/logagent which may be more suitable for questions.
Btw. there is also a https://groups.google.com/forum/#!forum/logagent which may be more suitable for questions.
Thank you
As mentioned in the forum:
LOGS_TOKEN (or in the past we used LOGSENE_TOKEN) is a mondatory parameter for sematext/logagent. The LOGS_TOKEN is used as a default index name in Sematext Cloud in case your LOGS don’t go to any custom index by log routing. Note Logagent is a docker image optimized to work with Sematext Cloud.
You can define in YML file any function to generate the index name - see some examples inthe JS function below:
output:
elasticsearch:
module: elasticsearch
myCustomIndexName: myIndexName
url: http://IP-ADDRESS:PORT
index: !js/function function doSomeCustomeIndexNameCreation (context, conf, data) {
return conf.myCustomIndexName || data.logSource || context.source || anyThingElse
}
Hi,
I am using ES and Kibana on IBM cloud and using only sematext daemon set. Using this I could see index is getting created with name same as the value of LOGSENE_TOKEN which is passed in daemon set.
Now, we wanted to have index based on envrionment name and getting created daily. In order to implement this, I had created a config map and pattern.yml file where-in I had mentioned the output type as
`apiVersion: v1 kind: ConfigMap metadata: name: sematext-agent-patterns data: patterns.yml: |-
Put your custom patterns below.
I had removed LOGSENE_TOKEN env variable from daemonset. I get error "No logs loaded since and LOGSENE_TOKEN is empty"
When I mention LOGSENE_TOKEN then it takes that value and create the index in ES.
How do i make ES pointing to patterns.yaml index.