# Executing a command from Elasticsearch/kibana

**URL:** <https://discuss.elastic.co/t/executing-a-command-from-elasticsearch-kibana/275920>\
**Category:** Elasticsearch\
**Created:** [June 15, 2021, 3:17am UTC](https://discuss.elastic.co/t/executing-a-command-from-elasticsearch-kibana/275920 "2021-06-15T03:17:26Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![T1330](https://avatars.discourse-cdn.com/v4/letter/t/838e76/32.png) [@T1330](https://discuss.elastic.co/u/T1330)\
**Post date:** [June 15, 2021, 3:17am UTC](https://discuss.elastic.co/t/executing-a-command-from-elasticsearch-kibana/275920/1 "2021-06-15T03:17:26Z")

</div>

Could you please have any example that executing a command from Elasticsearch to another server etc.

i.e. moving from file "C:/aaa/a111.txt" to "C:/bbb/a111.txt"  
or  
displaying a pop-up by command Elasticsearch-kibana  
note: a111.txt: normal text file, or any xlsx.docx would be fine (non Elastic-file)

I appreciate the detail method if you have.  
Thanks so much for your help and co-operations.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [June 15, 2021, 3:21am UTC](https://discuss.elastic.co/t/executing-a-command-from-elasticsearch-kibana/275920/2 "2021-06-15T03:21:47Z")

</div>

Neither of those will execute an external command. You'd need to look at using something like Logstash, or a custom app.

---

<div class="post-metadata">

**Author:** ![T1330](https://avatars.discourse-cdn.com/v4/letter/t/838e76/32.png) [@T1330](https://discuss.elastic.co/u/T1330)\
**Post date:** [June 15, 2021, 3:47am UTC](https://discuss.elastic.co/t/executing-a-command-from-elasticsearch-kibana/275920/3 "2021-06-15T03:47:07Z")

</div>

> [@warkolm](#):
>
> Neither of those will execute an external command. You'd need to look at using something like Logstash, or a custom app.

Thank you for your comment.  
Logstash, how can I insert mov command for relocate or rename as I have been looking?  
I appreciate sample so I can understand on this matter.

Thanks so much for your help.

---

<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:** [June 15, 2021, 3:51am UTC](https://discuss.elastic.co/t/executing-a-command-from-elasticsearch-kibana/275920/4 "2021-06-15T03:51:03Z")

</div>

What is the problem you are trying to solve? Can you please provide some additional context? Why not move files using the OS utilities and commands?

---

<div class="post-metadata">

**Author:** ![T1330](https://avatars.discourse-cdn.com/v4/letter/t/838e76/32.png) [@T1330](https://discuss.elastic.co/u/T1330)\
**Post date:** [June 15, 2021, 4:38am UTC](https://discuss.elastic.co/t/executing-a-command-from-elasticsearch-kibana/275920/5 "2021-06-15T04:38:35Z")

</div>

I have look into kibana/search for this probelm as I just setup in this v13 below.  
(Location : c-drive logstash/ C:kibana/c:searh in windows10, a111.txt for test file.)  
To move the text file from file "C:/aaa/a111.txt" to "C:/bbb/a111.txt".

quote  
input {  
file {  
mode =\> "read"  
path =\> ["C:/tmp/tet\*.csv"]  
sincedb\_path =\> "nul"  
start\_position =\> "beginning"  
}  
}

filter {  
csv {  
columns =\> ["STATUS1","AGGREGATION\_STATUS","SEVERITY","EVENT\_TIME","HOST","NAME","EVENT\_ID","CONTENTS"]  
separator =\> ","  
}  
date {  
match =\> ["EVENT\_TIME", "YYYYMMDD:hh:mm:ss"]  
}

}

output {  
elasticsearch {  
hosts =\> ["127.0.0.1:9201"]  
user =\> "elastic"  
password =\> "P@ssw0rd!"  
index =\> "q123"  
}  
}

unquote  
Thanks and regards

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [June 15, 2021, 4:42am UTC](https://discuss.elastic.co/t/executing-a-command-from-elasticsearch-kibana/275920/6 "2021-06-15T04:42:10Z")

</div>

There's nothing in the Elastic Stack that can do that for you unfortunately.

---

<div class="post-metadata">

**Author:** ![T1330](https://avatars.discourse-cdn.com/v4/letter/t/838e76/32.png) [@T1330](https://discuss.elastic.co/u/T1330)\
**Post date:** [June 15, 2021, 4:59am UTC](https://discuss.elastic.co/t/executing-a-command-from-elasticsearch-kibana/275920/7 "2021-06-15T04:59:53Z")

</div>

I did not find out the command using kibana-search development console so far.  
I wonder you mention that something like Logstash, can work if we modify on this point in logstash. so I asked.  
Have you ever obtain the information that any customer solve the problem like this ?  
Thanks you so much.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [June 15, 2021, 5:02am UTC](https://discuss.elastic.co/t/executing-a-command-from-elasticsearch-kibana/275920/8 "2021-06-15T05:02:56Z")

</div>

This needs to be handled outside of the Elastic Stack. I am not aware of any direct solutions to this.

---

<div class="post-metadata">

**Author:** ![T1330](https://avatars.discourse-cdn.com/v4/letter/t/838e76/32.png) [@T1330](https://discuss.elastic.co/u/T1330)\
**Post date:** [June 15, 2021, 7:15am UTC](https://discuss.elastic.co/t/executing-a-command-from-elasticsearch-kibana/275920/9 "2021-06-15T07:15:47Z")

</div>

warkolm Mark  
Thanks very much for your quickly response.  
I will invest the further other application around elastic environments  
in this case.  
I hope elastic will invole as option in the future version.  
Thanks again T1330

---

<div class="post-metadata">

**Author:** ![T1330](https://avatars.discourse-cdn.com/v4/letter/t/838e76/32.png) [@T1330](https://discuss.elastic.co/u/T1330)\
**Post date:** [June 15, 2021, 8:55am UTC](https://discuss.elastic.co/t/executing-a-command-from-elasticsearch-kibana/275920/10 "2021-06-15T08:55:42Z")

</div>

One question  
regarding Alerts Kibana Action (Elastic subscription Gold/Platinum)  
: mail WebHook Jira Microsoft Teams PagerDuty Slack are available,  
which means the sending the alert from elastic and will rectify by their own  
application, not sending command by elastic.  
Could you tell us on this points?  
Thanks for your help and co-operations

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [June 15, 2021, 10:08pm UTC](https://discuss.elastic.co/t/executing-a-command-from-elasticsearch-kibana/275920/11 "2021-06-15T22:08:16Z")

</div>

Tell you what sorry?

---

<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 13, 2021, 10:08pm UTC](https://discuss.elastic.co/t/executing-a-command-from-elasticsearch-kibana/275920/12 "2021-07-13T22:08:55Z")

</div>

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