rsyslog: imjournal: Support input module

Allow us to bind the imjournal input to an output module. Thie enable us to block journal reading if the output module is failing. Note that we will only allow one input module for imjournal since we do not have multiple input sources. The memory usage can be high with multiple outputs.

Tested:

Example Config:
```
ruleset(name="remote"){
  action(type="omfwd" target="IP_ADDRESS" port="PORT" protocol="tcp"
    template="journal-format"
    StreamDriver="ossl"
    # Run driver in TLS-only mode
    StreamDriverMode="0"
    StreamDriverAuthMode="anon"
    action.resumeRetryCount="-1"
    queue.type="direct"
  )
}

input(
  type="imjournal"
  ruleset="remote"
)
```

- Stop collector network -> Stop Journal pointer
```
SECONDS=0
expected="$(md5sum /var/log/state)"
echo "Expected state ${expected}"
while [ $SECONDS -lt 300 ];
do
  new_state="$(md5sum /var/log/state)"
  if [[ "${new_state}" != "${expected}" ]];
  then
    echo "Got state ${new_state} instead of ${expected}"
      exit 1
  fi
  sleep 5
done
echo "Passed"
exit 0
```

```
Expected state 309593de34bc095e4245c1ba07a7520c  /var/log/state
Passed
```

- Resume Journal Pointer

The state file changed after the connection resumed.
```
$ md5sum /var/log/state
d11c7e46fec4f86151df204608525d89  /var/log/state
```

The message send in when the connection was down is also sent out properly.

Upstream-Change: https://github.com/rsyslog/rsyslog/pull/5146

Google-Bug-Id: 271860571
Google-Bug-Id: 271406467
Google-Bug-Id: 283335713
Change-Id: I48b46589faeb46a6d3a0d04ac54cc25dc0bdfbdc
Signed-off-by: Willy Tu <wltu@google.com>
(cherry picked from commit 71020f1ee476859eb673f7864d1964a9e03ce7d6)
2 files changed
tree: 552489d626126cb5b957be3dc7b7d9b8a55e7cfa
  1. conf/
  2. dynamic-layers/
  3. meta-nuvoton-npcm8xx/
  4. recipes-connectivity/
  5. recipes-core/
  6. recipes-devtools/
  7. recipes-extended/
  8. recipes-google/
  9. recipes-kernel/
  10. recipes-phosphor/
  11. LICENSE
  12. README.md
README.md

meta-gbmc-staging

This repository contains additions to the openbmc/meta-google layer that are not yet ready for OpenBMC inclusion.

How to use this layer

  1. Clone openbmc/openbmc from GitHub.
  2. Clone this layer from GitHub into a subdirectory of openbmc.