run ospolicy and get output in log explorer for specific vms

can we run any custom commands using validation mode of OSPolicy and get output in log metrics explorer in gcp

1 1 119
1 REPLY 1

Hi @gnsharans,

Welcome to the Google Cloud Community!

An OS policy is a file that contains the declarative configuration for OS resources such as packages, repositories, files, or custom resources defined by scripts[1]. It is not designed to execute custom commands.

For more information, you may review this document - OS policy and OS policy assignment.

I hope this helps. Thank you. 

[1]. https://cloud.google.com/compute/docs/os-configuration-management/working-with-os-policies