mondoohq / cnquery

open source, cloud-native, graph-based asset inventory
https://cnquery.io
Other
294 stars 20 forks source link

Add `service("systemd-journald").static` #3288

Open mm-weber opened 7 months ago

mm-weber commented 7 months ago

For a couple checks we would need to know if a service is static, which is different from enabled

"static"    The unit file is not enabled, and has no provisions for enabling in the [Install] unit file section.

image

Describe the solution you'd like The solution would be the light-weight, by just adding the static field to the service resource.

Describe alternatives you've considered Alternatively @chris-rock suggested a dedicated resource for systemd as a solution.

Additional context There has been an somewhat related issue where the .masked status of sub-services such as .socket wasn't displayed correctly. Currently we're using the command resource to deal with that, too, which isn't ideal.

https://github.com/mondoohq/cnquery/issues/1606

chris-rock commented 7 months ago

We need to figure out if we add this to the service resource or if we introduce a new resource for specifically handling systemd unit files.