# Filebeats for configuration file

**URL:** https://discuss.elastic.co/t/filebeats-for-configuration-file/295142
**Category:** Beats
**Tags:** filebeat
**Created:** [January 23, 2022, 11:06am UTC](https://discuss.elastic.co/t/filebeats-for-configuration-file/295142 "2022-01-23T11:06:23Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![ratseba](https://avatars.discourse-cdn.com/v4/letter/r/74df32/32.png) [@ratseba](https://discuss.elastic.co/u/ratseba)
#### Post date: [January 23, 2022, 11:06am UTC](https://discuss.elastic.co/t/filebeats-for-configuration-file/295142/1 "2022-01-23T11:06:23Z")

</div>

Hi,  
I need send content of config file from some service to Elasticsearch. This file not change often (max ten times a year). This file have structure like:

```auto
version=77.1.2
ActiveModule=monitoring, tts, asr
LicenseNumber=98usddou2kosad9123

```

What i need:

1. Read this file once per day from begining and ship this to Elasticsearch.

I try do this with bellow configuration for filebeat, but i can't set clean\_inactive without ignore\_older.

```auto
- type: log
  enabled: true
  harvester_limit: 1
  close_eof: true
  clean_inactive: 1440m
  paths:
    - D:\ElasticSearch\Test\MyTestConfigFile.txt

```

How i can do this ? Maybe there is some dedicated module for config files ?

---

<div class="post-metadata">

### Author: ![legoguy1000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/legoguy1000/32/54301_2.png) [@legoguy1000](https://discuss.elastic.co/u/legoguy1000)
#### Post date: [January 23, 2022, 4:07pm UTC](https://discuss.elastic.co/t/filebeats-for-configuration-file/295142/2 "2022-01-23T16:07:26Z")

</div>

I would use a windows scheduled task to run filebeat manually with the `--once` flag, [Filebeat command reference | Filebeat Reference [7.16] | Elastic](https://www.elastic.co/guide/en/beats/filebeat/current/command-line-options.html#:~:text=When%20the%20%2D%2Donce%20flag,of%20the%20file%20is%20reached).

---

<div class="post-metadata">

### Author: ![ratseba](https://avatars.discourse-cdn.com/v4/letter/r/74df32/32.png) [@ratseba](https://discuss.elastic.co/u/ratseba)
#### Post date: [January 25, 2022, 6:39am UTC](https://discuss.elastic.co/t/filebeats-for-configuration-file/295142/3 "2022-01-25T06:39:51Z")

</div>

Hi Alex,  
Thank you for response. I have several another things to do by filebeat on this machine. In way proposed by you i have to maintain two separate filebeat instance. i'd like to avoid it. Is there any other option ?

---

<div class="post-metadata">

### Author: ![legoguy1000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/legoguy1000/32/54301_2.png) [@legoguy1000](https://discuss.elastic.co/u/legoguy1000)
#### Post date: [January 25, 2022, 12:42pm UTC](https://discuss.elastic.co/t/filebeats-for-configuration-file/295142/4 "2022-01-25T12:42:49Z")

</div>

Not that I'm tracking as this is a very unique use case. And u wouldn't necessarily need 2 instances of Filebeat. Just another config file that u can reference via `-c <path to config>` when called by the scheduled task.

---

<div class="post-metadata">

### Author: ![ratseba](https://avatars.discourse-cdn.com/v4/letter/r/74df32/32.png) [@ratseba](https://discuss.elastic.co/u/ratseba)
#### Post date: [January 26, 2022, 6:16am UTC](https://discuss.elastic.co/t/filebeats-for-configuration-file/295142/5 "2022-01-26T06:16:21Z")

</div>

Can I run Filebeat like a Windows service and the same .exe file run from TaskScheduler (at the same time)? I have one more idea: run powershell from taskScheduler and write the data from a configuration file to another file on one line (one event). Repeat this once a day. In this option, I do not need to configure aggregation on 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: [February 23, 2022, 8:16am UTC](https://discuss.elastic.co/t/filebeats-for-configuration-file/295142/6 "2022-02-23T08:16:40Z")

</div>

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