# Format for saving sudo logs in elastic

**URL:** <https://discuss.elastic.co/t/format-for-saving-sudo-logs-in-elastic/139648>\
**Category:** Elasticsearch\
**Created:** [July 11, 2018, 11:26pm UTC](https://discuss.elastic.co/t/format-for-saving-sudo-logs-in-elastic/139648 "2018-07-11T23:26:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![yellolion](https://avatars.discourse-cdn.com/v4/letter/y/ed8c4c/32.png) [@yellolion](https://discuss.elastic.co/u/yellolion)\
**Post date:** [July 11, 2018, 11:26pm UTC](https://discuss.elastic.co/t/format-for-saving-sudo-logs-in-elastic/139648/1 "2018-07-11T23:26:27Z")

</div>

We want to store all the sudo io log files in elastic. We are defining the schema for it but not sure how the data from TTYIN, TTYOUT, STDIN, STDOUT , STDERR can be stored for each session. we are thinking each of these files to be a column in the schema and every row is represented by a unique TSID (sudo session id). how can the data from TTYIN, TTYOUT, STDIN, STDOUT , STDERR can be parsed and stored in ElasticSearch? Any pointers on schema definition from SUDO I/O logging perspective would be of help! Thanks

---

<div class="post-metadata">

**Author:** ![yellolion](https://avatars.discourse-cdn.com/v4/letter/y/ed8c4c/32.png) [@yellolion](https://discuss.elastic.co/u/yellolion)\
**Post date:** [July 28, 2018, 4:49am UTC](https://discuss.elastic.co/t/format-for-saving-sudo-logs-in-elastic/139648/2 "2018-07-28T04:49:39Z")

</div>

we are able to save all data in log file as key word and rest of the data as TEXT field.

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [July 28, 2018, 12:41pm UTC](https://discuss.elastic.co/t/format-for-saving-sudo-logs-in-elastic/139648/3 "2018-07-28T12:41:14Z")

</div>

Have you looked at [using Logstash to parse the data](https://www.elastic.co/blog/a-practical-introduction-to-logstash)?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 25, 2018, 12:41pm UTC](https://discuss.elastic.co/t/format-for-saving-sudo-logs-in-elastic/139648/4 "2018-08-25T12:41:16Z")

</div>

Closed on August 25, 2018, 12:41pm UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
