-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Question] how to setup tlog to log to elasticsearch #360
Comments
You could use the file writer and use logstash to ship the file to elasticsearch.
|
Thanks @gstorme! Does the above require creating index mapping and creating new index on Elasticsearch side first? My understanding is that Logstash might need more compute resources on client side than Filebeat.. |
If you grant the required permissions to the configured user within elasticsearch, logstash will create the index. |
@gstorme: Since I have not got this to work yet, I am still wondering about index mappings that Logstash/Filebeat/Rsyslog could auto create by default. In order for |
I don't know how rsyslog handles this. |
@gstorme: I hit the same issue as this one with Filebeat: #257 (no solution listed in this issue), where Filebeat would ensure almost the same as this one: I managed to use some Filebeat directives to update the above to be: But Elasticsearch keeps refusing to create index due to the above What does your "host" field look like? |
usually I capture de logs from Tlog via any log agent, if you are using ES, I'd use Filebeat which encrypts the traffic till your ES Cluster. Regards your 2nd question you can retrieve the data from ES cluster using tlog and reproduce that session, but TLOG is the one which does the work, ES is just purely the storage to retrieve the data.. |
@macgahe, Thank you so much!, I used tlog --> rsyslog --> elasticsearch |
even using rsyslog you can encrypt the traffic with certificates.. to play the session and retrieve it from ES.. I'd suggest you to look into tlog-play command |
Thank you for your attention, @macgahe |
if you allow me the suggestion I would change rsyslog to filebeat ( ElasticSearch Native Agent ) mostly because parsing the data will be much more easier and more productive.. unless you move the Rsyslog into another server and there you process the logs through filebeat or elastic agent depending on your ES version |
I considered configuring tlog-rec-session to record sessions in a file and then using Filebeat to send them to Elasticsearch. However, a concern is that the files might be deleted before the data is sent to Elasticsearch or there could be a longer wait time. |
Hello @macgahe, please. In addition to having numerous recordings per session, I have this error.
tlog-rec-session.conf
|
The current documentation is not clear to me.
Not going to use sssd, only to use
tlog-rec-session
.By default
/etc/tlog/tlog-rec-session.conf
usesjournal
. If switching to usefile
, then the whole logging to elasticsearch from rsyslog would not work.After switching
/etc/tlog/tlog-rec-session.conf
to usesyslog
, I could see/var/log/tlog.log
sometimes would have tlog entries, most time it would logNO MATCH
every second, if there's no tlog activity. Is this expected?Also it seems rsyslog auto created an index in elasticsearch, but there's no docs in this index, so apparently it is not working at all. How to get this to work?
The text was updated successfully, but these errors were encountered: