# Auditbeat and dynamic variables - is it real?

**URL:** <https://discuss.elastic.co/t/auditbeat-and-dynamic-variables-is-it-real/229317>\
**Category:** Beats\
**Tags:** auditbeat\
**Created:** [April 22, 2020, 4:40pm UTC](https://discuss.elastic.co/t/auditbeat-and-dynamic-variables-is-it-real/229317 "2020-04-22T16:40:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![eee71](https://avatars.discourse-cdn.com/v4/letter/e/8e8cbc/32.png) [@eee71](https://discuss.elastic.co/u/eee71)\
**Post date:** [April 22, 2020, 4:40pm UTC](https://discuss.elastic.co/t/auditbeat-and-dynamic-variables-is-it-real/229317/1 "2020-04-22T16:40:09Z")

</div>

Hello, can i use dynamic variables with auditbeat? When i am typing any command (auditd module) i have to check one variable to prepare right audit event + add this variable to event. For all executing commands.

I lost all my variants:

1. auditbeat reads systemd unit only when starts so it wont to help me (Environment option);
2. gdb debugger not saving env variable (dont know why);
3. write variable in auditbeat.yml or systemd unit + reload service before i execute any command - not good variant - no reliability + too overload (tons of service reloads).

Any variants pls?

---

<div class="post-metadata">

**Author:** ![andrewkroh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrewkroh/32/3784_2.png) [@andrewkroh](https://discuss.elastic.co/u/andrewkroh)\
**Post date:** [May 7, 2020, 3:06pm UTC](https://discuss.elastic.co/t/auditbeat-and-dynamic-variables-is-it-real/229317/2 "2020-05-07T15:06:07Z")

</div>

> [@eee71](#):
>
> i have to check one variable to prepare right audit event + add this variable to event.

Can you please give a concrete example. I'm having trouble understanding what you wish to accomplish.

---

<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:** [May 28, 2020, 3:06pm UTC](https://discuss.elastic.co/t/auditbeat-and-dynamic-variables-is-it-real/229317/3 "2020-05-28T15:06:07Z")

</div>

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