# I Need Guidance that how can I get the Schema of all the generated logs in a csv format

**URL:** <https://community.zeek.org/t/i-need-guidance-that-how-can-i-get-the-schema-of-all-the-generated-logs-in-a-csv-format/7557>\
**Category:** Zeek\
**Created:** [August 28, 2024, 10:23am UTC](https://community.zeek.org/t/i-need-guidance-that-how-can-i-get-the-schema-of-all-the-generated-logs-in-a-csv-format/7557 "2024-08-28T10:23:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ChiragDeshlehra](https://avatars.discourse-cdn.com/v4/letter/c/fbc32d/32.png) [@ChiragDeshlehra](https://community.zeek.org/u/ChiragDeshlehra)\
**Post date:** [August 28, 2024, 10:23am UTC](https://community.zeek.org/t/i-need-guidance-that-how-can-i-get-the-schema-of-all-the-generated-logs-in-a-csv-format/7557/1 "2024-08-28T10:23:38Z")

</div>

how can I get the Schema of all the generated logs in a csv format  
For example  
Zeek is generating log files and I want the field name and it corresponding data type  
But before the values are getting filled under the column is there any possibility to perform this kind of operation

---

<div class="post-metadata">

**Author:** ![Christian](https://yyz1.discourse-cdn.com/flex011/user_avatar/community.zeek.org/christian/32/593_2.png) [@Christian](https://community.zeek.org/u/Christian)\
**Post date:** [August 29, 2024, 11:50pm UTC](https://community.zeek.org/t/i-need-guidance-that-how-can-i-get-the-schema-of-all-the-generated-logs-in-a-csv-format/7557/2 "2024-08-29T23:50:35Z")

</div>

Hi there,

Yeah, there are a few things you can do. The `zeek_metainfo` package (see [here](https://github.com/corelight/zeek_metainfo)) can produce schema info. It’s a bit unusual because you need the sources of the package around to make use of the output it generates, but it’s workable. Clone it and install it:

```auto
$ git clone https://github.com/corelight/zeek_metainfo
$ cd zeek_metainfo
$ zkg install --skiptests .

```

Now run Zeek, enabling the package:

```auto
$ zeek zeek_metainfo

```

This should have produced a logschema.log file in your local directory. Now run this to get JSON:

```auto
$ cat logschema.log | zeek-cut -c schema | ./fixup_json.py > logschema.json

```

Now use logschema.json as you see fit. It’s not CSV, but you’ll likely want a more structured format to represent the schema info, anyway.

If you’ve made it this far, congratulations. 🙂

If you know the log you’re interested in, you can also go straight to our documentation. Start at [Zeek Logs — Book of Zeek (git/master)](https://docs.zeek.org/en/master/logs/index.html) (or pick the version of the docs that matter to you) and find the log you’re interested in. For example, for the conn.log the underlying data structure with full documentation is [here](https://docs.zeek.org/en/master/scripts/base/protocols/conn/main.zeek.html#type-Conn::Info).

We’re hoping to provide better schema tooling in upcoming Zeek versions.

Best,  
Christian
