# Is it possible to run custom shell script using Topbeat?

**URL:** <https://discuss.elastic.co/t/is-it-possible-to-run-custom-shell-script-using-topbeat/52613>\
**Category:** Beats\
**Created:** [June 13, 2016, 1:33pm UTC](https://discuss.elastic.co/t/is-it-possible-to-run-custom-shell-script-using-topbeat/52613 "2016-06-13T13:33:35Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![rajkumar3v](https://avatars.discourse-cdn.com/v4/letter/r/73ab20/32.png) [@rajkumar3v](https://discuss.elastic.co/u/rajkumar3v)\
**Post date:** [June 13, 2016, 1:33pm UTC](https://discuss.elastic.co/t/is-it-possible-to-run-custom-shell-script-using-topbeat/52613/1 "2016-06-13T13:33:35Z")

</div>

Hi guys,

I am using topbeat to monitor server resource utilization, now i want to attach some custom shell script in topbeat to collect addition resource utilization data of servers. The custom script output should be forward with default output in to Elasticsearch

Thanks,  
RK

---

<div class="post-metadata">

**Author:** ![steffens](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steffens/32/79630_2.png) [@steffens](https://discuss.elastic.co/u/steffens)\
**Post date:** [June 13, 2016, 5:09pm UTC](https://discuss.elastic.co/t/is-it-possible-to-run-custom-shell-script-using-topbeat/52613/2 "2016-06-13T17:09:12Z")

</div>

What kind of data do you want to collect and forward? You just want to utilise the beats output config?

---

<div class="post-metadata">

**Author:** ![rajkumar3v](https://avatars.discourse-cdn.com/v4/letter/r/73ab20/32.png) [@rajkumar3v](https://discuss.elastic.co/u/rajkumar3v)\
**Post date:** [June 14, 2016, 4:38am UTC](https://discuss.elastic.co/t/is-it-possible-to-run-custom-shell-script-using-topbeat/52613/3 "2016-06-14T04:38:56Z")

</div>

1. Using custom shell script I will assign tenant\_id, server\_id, App\_id & server up time in seconds, etc., so i want to add this data along with topbeat and able to group & monitor servers based on those ID's

2. In elasticsearch my custom script output and topbeat data will be in same index so i can ship this data in to my custom monitoring dashboard application by using API.

If I could also add some of my own custom fields in topbeat by this custom scripts it would be great..

thank u  
RK

---

<div class="post-metadata">

**Author:** ![ruflin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ruflin/32/3116_2.png) [@ruflin](https://discuss.elastic.co/u/ruflin)\
**Post date:** [June 14, 2016, 7:32am UTC](https://discuss.elastic.co/t/is-it-possible-to-run-custom-shell-script-using-topbeat/52613/4 "2016-06-14T07:32:07Z")

</div>

Perhaps execbeat could help you here? [https://github.com/christiangalsterer/execbeat](https://github.com/christiangalsterer/execbeat)

---

<div class="post-metadata">

**Author:** ![rajkumar3v](https://avatars.discourse-cdn.com/v4/letter/r/73ab20/32.png) [@rajkumar3v](https://discuss.elastic.co/u/rajkumar3v)\
**Post date:** [June 14, 2016, 7:50am UTC](https://discuss.elastic.co/t/is-it-possible-to-run-custom-shell-script-using-topbeat/52613/5 "2016-06-14T07:50:30Z")

</div>

Sure, but i dont want to run multiple beat services in a server, filebeat for logs, topbeat for resource monitoring, etc., am looking for a single app which should handle its own perspective and my custom scripts..

if its not possible, finally I have to move with different beats for different requirement in every server and its difficult to manage hundreds of servers.

Thank u  
RK

---

<div class="post-metadata">

**Author:** ![monica](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/monica/32/3696_2.png) [@monica](https://discuss.elastic.co/u/monica)\
**Post date:** [June 14, 2016, 10:24am UTC](https://discuss.elastic.co/t/is-it-possible-to-run-custom-shell-script-using-topbeat/52613/6 "2016-06-14T10:24:14Z")

</div>

Currently, you cannot run multiple Beats together, but we are planning to create a supervisor app that is able to run multiple Beats together, including the community Beats.

Starting with alpha3, we are releasing a more generic Topbeat that collects not only system statistics but also other statistics by periodically interrogating external systems. The Beat is called Metricbeat. [Here](https://www.elastic.co/blog/beats-5-0-0-alpha3-released) is the blog post about it.

In Metricbeat you can define `fields` in the configuration file that adds some specific fields to your exported event. [Here](https://www.elastic.co/guide/en/beats/metricbeat/master/configuration-shipper.html#libbeat-configuration-fields) you can read more details.

---

<div class="post-metadata">

**Author:** ![rajkumar3v](https://avatars.discourse-cdn.com/v4/letter/r/73ab20/32.png) [@rajkumar3v](https://discuss.elastic.co/u/rajkumar3v)\
**Post date:** [June 14, 2016, 10:41am UTC](https://discuss.elastic.co/t/is-it-possible-to-run-custom-shell-script-using-topbeat/52613/7 "2016-06-14T10:41:36Z")

</div>

great job.. we are expecting stable release in short...

thanks,  
RK

---

<div class="post-metadata">

**Author:** ![monica](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/monica/32/3696_2.png) [@monica](https://discuss.elastic.co/u/monica)\
**Post date:** [June 14, 2016, 11:48am UTC](https://discuss.elastic.co/t/is-it-possible-to-run-custom-shell-script-using-topbeat/52613/8 "2016-06-14T11:48:32Z")

</div>

Another thing here is that it would be really tricky to use the same index for two different types of data, especially if you are using Kibana to visualize the data.

You can use the `Execbeat` to generate data with a script and insert them in Elasticsearch in a special index, let's say `execbeat-*` and you can use `Topbeat` to collect system statistics and insert them periodically into Elasticsearch in the `topbeat-*` index. Based on the data coming from both indexes, you can build graphs in Kibana.

---

<div class="post-metadata">

**Author:** ![rajkumar3v](https://avatars.discourse-cdn.com/v4/letter/r/73ab20/32.png) [@rajkumar3v](https://discuss.elastic.co/u/rajkumar3v)\
**Post date:** [June 15, 2016, 10:44am UTC](https://discuss.elastic.co/t/is-it-possible-to-run-custom-shell-script-using-topbeat/52613/9 "2016-06-15T10:44:17Z")

</div>

thank u monica, as of now Execbeat will not suit for our requirement and one more thing is there any app to push & manage my custom scripts on 100's of servers? right now am using ansible to push my script & other tasks.

exactly what I am looking, a supervisor app able to handle my custom scripts as well as filebeat to collect application logs, topbeat to monitor resource utilization. these are most common IT operations tasks which should manageable by a supervisor/agent kind off app.

thanks,  
RK

---

<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:** [July 4, 2016, 1:33pm UTC](https://discuss.elastic.co/t/is-it-possible-to-run-custom-shell-script-using-topbeat/52613/10 "2016-07-04T13:33:44Z")

</div>

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