# Monitor GCE VM commands

**URL:** https://discuss.elastic.co/t/monitor-gce-vm-commands/286988
**Category:** Beats
**Tags:** beats-module, auditbeat
**Created:** [October 18, 2021, 11:56am UTC](https://discuss.elastic.co/t/monitor-gce-vm-commands/286988 "2021-10-18T11:56:36Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![\_bugc4t](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/_bugc4t/32/93523_2.png) [@\_bugc4t](https://discuss.elastic.co/u/_bugc4t)
#### Post date: [October 18, 2021, 11:56am UTC](https://discuss.elastic.co/t/monitor-gce-vm-commands/286988/1 "2021-10-18T11:56:36Z")

</div>

I've got a running filebeat ECK cluster. However, I've got a new requirement to incorporate VM commands and processes from another GCP project for analysis.

I've looked into the GCP Ops Agent and Auditbeat but neither seem to be advertising command logging.

I've already got Put/Sub integration. Is there a way to get the VM commands logged and output to Pub/Sub?

Is there a solution I can look into that already does this in a similar manner to my filebeat deployment?

---

<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: [November 15, 2021, 1:56pm UTC](https://discuss.elastic.co/t/monitor-gce-vm-commands/286988/2 "2021-11-15T13:56:39Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Edoardo\_Tenani](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/edoardo_tenani/32/94302_2.png) [@Edoardo\_Tenani](https://discuss.elastic.co/u/Edoardo_Tenani)
#### Post date: [December 3, 2021, 9:23am UTC](https://discuss.elastic.co/t/monitor-gce-vm-commands/286988/3 "2021-12-03T09:23:22Z")

</div>



---

<div class="post-metadata">

### Author: ![Edoardo\_Tenani](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/edoardo_tenani/32/94302_2.png) [@Edoardo\_Tenani](https://discuss.elastic.co/u/Edoardo_Tenani)
#### Post date: [December 3, 2021, 9:27am UTC](https://discuss.elastic.co/t/monitor-gce-vm-commands/286988/4 "2021-12-03T09:27:31Z")

</div>

Hello @_bugc4t, sorry for the late reply. I checked internally and it is possible to monitor shell activity through Osquery, in particular with the `shell_history` table. Filebeat has an `osquery` [module](https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-module-osquery.html) that would allow to collect log results.

Using a query like `select * from users join shell_history using (uid)`) would retrieve a history of commands run per user.

Would this fulfil your use case?

---

<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: [November 4, 2022, 8:32am UTC](https://discuss.elastic.co/t/monitor-gce-vm-commands/286988/5 "2022-11-04T08:32:43Z")

</div>


