Hello Brenno,
The below decoder and rules addresses your use case:
Decoder:
============
<decoder name="test123">
<program_name>charon</program_name>
</decoder>
<decoder name="test_charon">
<parent>test123</parent>
<regex type="pcre2">\d+\[\S+\]\s*(\S+) '(\S+)' domain</regex>
<order>status_ipsec_connection, ipsec_connection</order>
</decoder>
Rules
============
<rule id="883040" level="3">
<decoded_as>test123</decoded_as>
<field name="status_ipsec_connection" type="pcre2">^installing$</field>
<description>The $(ipsec_connection) is being installed.</description>
</rule>
<rule id="883041" level="3">
<decoded_as>test123</decoded_as>
<field name="status_ipsec_connection" type="pcre2">^uninstalling$</field>
<description>The $(ipsec_connection) is being uninstalled.</description>
</rule>
Testing your use case
=======================
[root@wazuh-server ~]# /var/ossec/bin/wazuh-logtest
Starting wazuh-logtest v4.11.0
Type one log per line
Nov 14 19:51:56 domain charon[77809] 08[CFG] installing 'con34_49' domain
**Phase 1: Completed pre-decoding.
full event: 'Nov 14 19:51:56 domain charon[77809] 08[CFG] installing 'con34_49' domain'
timestamp: 'Nov 14 19:51:56'
hostname: 'domain'
program_name: 'charon'
**Phase 2: Completed decoding.
name: 'test123'
ipsec_connection: 'con34_49'
status_ipsec_connection: 'installing'
**Phase 3: Completed filtering (rules).
id: '883040'
level: '3'
description: 'The con34_49 is being installed.'
groups: '['local', 'syslog', 'sshd']'
firedtimes: '1'
mail: 'False'
**Alert to be generated.
Nov 14 19:51:56 domain charon[77809] 08[CFG] uninstalling 'con34_48' domain
**Phase 1: Completed pre-decoding.
full event: 'Nov 14 19:51:56 domain charon[77809] 08[CFG] uninstalling 'con34_48' domain'
timestamp: 'Nov 14 19:51:56'
hostname: 'domain'
program_name: 'charon'
**Phase 2: Completed decoding.
name: 'test123'
ipsec_connection: 'con34_48'
status_ipsec_connection: 'uninstalling'
**Phase 3: Completed filtering (rules).
id: '883041'
level: '3'
description: 'The con34_48 is being uninstalled.'
groups: '['local', 'syslog', 'sshd']'
firedtimes: '1'
mail: 'False'
**Alert to be generated.
Nov 19 13:04:47 domain charon[45008] 09[KNL] <con9|624447> querying policy
0.0.0.0/0|/0 ===
0.0.0.0/0|/0 in failed, not found domain
**Phase 1: Completed pre-decoding.
full event: 'Nov 19 13:04:47 domain charon[45008] 09[KNL] <con9|624447> querying policy
0.0.0.0/0|/0 ===
0.0.0.0/0|/0 in failed, not found domain'
timestamp: 'Nov 19 13:04:47'
hostname: 'domain'
program_name: 'charon'
**Phase 2: Completed decoding.
name: 'test123'
**Phase 3: Completed filtering (rules).
id: '1002'
level: '2'
description: 'Unknown problem somewhere in the system.'
groups: '['syslog', 'errors']'
firedtimes: '1'
gpg13: '['4.3']'
mail: 'False'