Skip to content

Conversation

tas50
Copy link
Member

@tas50 tas50 commented May 10, 2025

Replaces a query like this:

cnquery> ["/etc/systemd/journald.conf"].where(file(_).exists) {
  file(_) {
    parse.ini("/etc/systemd/journald.conf").sections["Journal"]["ForwardToSyslog"].downcase == "yes"
  }
}

where: [
  0: {
    file: {
      parse.ini.sections[Journal][ForwardToSyslog].downcase == "yes": false
    }
  }
]

with this

cnquery> journald.config.params.ForwardToSyslog == "yes"
[failed] journald.config.params[ForwardToSyslog] == "yes"
  expected: == "yes"
  actual:   _

Copy link
Contributor

github-actions bot commented May 10, 2025

Test Results

0 tests   - 4 393   0 ✅  - 4 389   0s ⏱️ - 2m 14s
0 suites  -   409   0 💤  -     4 
0 files    -    30   0 ❌ ±    0 

Results for commit 97416e7. ± Comparison against base commit e2086e9.

♻️ This comment has been updated with latest results.

@tas50 tas50 changed the title Add a resource for parsing journald ⭐ Add a resource for parsing journald May 12, 2025
@tas50 tas50 force-pushed the tas50/journald branch from dc1565b to 898260a Compare May 18, 2025 00:48

This comment has been minimized.

@tas50 tas50 force-pushed the tas50/journald branch 2 times, most recently from ca6d49a to 73a4e3c Compare May 18, 2025 00:52
@tas50 tas50 force-pushed the tas50/journald branch 2 times, most recently from c7779d3 to 7663efe Compare June 13, 2025 19:13
@tas50 tas50 force-pushed the tas50/journald branch 2 times, most recently from 8472a33 to c192de7 Compare July 21, 2025 15:32
Replaces a query like this:

```
["/etc/systemd/journald.conf"].where(file(_).exists) {
  file(_) {
    parse.ini("/etc/systemd/journald.conf").sections["Journal"]["ForwardToSyslog"].downcase == "yes"
  }
}
```

with this

```
journald.config.params.ForwardToSyslog == "yes"
```

Signed-off-by: Tim Smith <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant