Skip to content

syslog: generate ruleset and template from simple(r) yaml config#668

Open
baszoetekouw wants to merge 5 commits intomainfrom
feature/rsyslog-simplify
Open

syslog: generate ruleset and template from simple(r) yaml config#668
baszoetekouw wants to merge 5 commits intomainfrom
feature/rsyslog-simplify

Conversation

@baszoetekouw
Copy link
Copy Markdown
Member

No description provided.

@baszoetekouw baszoetekouw requested a review from crosmuller May 6, 2026 15:48
@baszoetekouw baszoetekouw self-assigned this May 6, 2026
@baszoetekouw
Copy link
Copy Markdown
Member Author

effectieve diff tussen was en wordt:

--- before: /etc/rsyslog.d/rulesets/prod_sc.conf
+++ after: /home/bas/.ansible/tmp/ansible-local-2195905wl_kg0kb/tmp2ny5kk9y/sc_ruleset.conf.j2
@@ -1,50 +1,53 @@
+global(dirCreateMode="0755" fileCreateMode="0640" FileGroup="surfsudo")
+
 $RuleSet prod_sc
-if $programname == "engineblock" and $msg startswith " engine" then { action(type="omfile" DynaFile="apache-eb-prod_sc" ) stop }
-if $programname == "engineblock" and $msg startswith "engine" then { action(type="omfile" DynaFile="apache-eb-prod_sc" ) stop }
+if $programname == "engineblock" and $msg startswith engine then { action(type="omfile" DynaFile="eb_apache-prod_sc") stop }}
-:programname, isequal, "engineblock" { action(type="omfile" DynaFile="eblog-prod_sc" ) stop }
+if $programname == "engineblock" then { action(type="omfile" DynaFile="eb-prod_sc") stop }}
-:programname, isequal, "EBLOG" { action(type="omfile" DynaFile="eblog-prod_sc" ) stop }
+if $programname == "EBLOG" then { action(type="omfile" DynaFile="eb_log-prod_sc") stop }}
-:programname, isequal, "Apache-EB" { action(type="omfile" DynaFile="apache-eb-prod_sc" ) stop }
+if $programname == "Apache-EB" then { action(type="omfile" DynaFile="eb_apache2-prod_sc") stop }}

-if $programname == "engineblock" and $msg contains '{"channel":"authentication"' then { action(type="omfile" DynaFile="ebauth-prod_sc" ) stop  }
+if $programname == "engineblock" and $msg contains   "channel":"authentication" then { action(type="omfile" DynaFile="eb_auth-prod_sc") stop }}
-:programname, isequal, "EBAUTH" { action(type="omfile" DynaFile="ebauth-prod_sc" ) stop }
# wordt niet meer gebruikt

-:programname, isequal, "haproxy" { action(type="omfile" DynaFile="haproxy-prod_sc" ) stop }
+if $programname == "haproxy" then { action(type="omfile" DynaFile="haproxy-prod_sc") stop }}
-:programname, isequal, "aaserver" { action(type="omfile" DynaFile="aa-prod_sc" ) stop }
+if $programname == "aaserver" then { action(type="omfile" DynaFile="aa_server-prod_sc") stop }}
-:programname, isequal, "aagui" { action(type="omfile" DynaFile="apache-aa-prod_sc" ) stop }
+if $programname == "aagui" then { action(type="omfile" DynaFile="aa_gui-prod_sc") stop }}
-:programname, isequal, "aalink" { action(type="omfile" DynaFile="apache-aa-prod_sc" ) stop }
+if $programname == "aalink" then { action(type="omfile" DynaFile="aa_link-prod_sc") stop }}
-:programname, isequal, "dashboardgui" { action(type="omfile" DynaFile="apache-dashboard-prod_sc" ) stop }
+if $programname == "dashboardserver" then { action(type="omfile" DynaFile="dashboard_server-prod_sc") stop }}
-:programname, isequal, "dashboardserver" { action(type="omfile" DynaFile="dashboard-prod_sc" ) stop }
+if $programname == "dashboardgui" then { action(type="omfile" DynaFile="dashboard_gui-prod_sc") stop }}
-:programname, isequal, "Apache-EBAPI" { action(type="omfile" DynaFile="apache-eb-api-prod_sc" ) stop }
+if $programname == "Apache-EBAPI" then { action(type="omfile" DynaFile="eb_api-prod_sc") stop }}
-:programname, isequal, "manageserver" { action(type="omfile" DynaFile="manage-prod_sc" ) stop }
+if $programname == "manageserver" then { action(type="omfile" DynaFile="manage_server-prod_sc") stop }}
-:programname, isequal, "managegui" { action(type="omfile" DynaFile="apache-manage-prod_sc" ) stop }
+if $programname == "managegui" then { action(type="omfile" DynaFile="manage_gui-prod_sc") stop }}
-:programname, isequal, "pdp" { action(type="omfile" DynaFile="pdp-prod_sc" ) stop }
+if $programname == "pdp" then { action(type="omfile" DynaFile="pdp-prod_sc") stop }}
-if $programname == "profile" and $msg startswith "{" then { action(type="omfile" DynaFile="profile-prod_sc" ) stop }
+if $programname == "profile" then { action(type="omfile" DynaFile="profile-prod_sc") stop }}
-:programname, isequal, "profile" { action(type="omfile" DynaFile="apache-profile-prod_sc" ) stop }
+if $programname == "profile" then { action(type="omfile" DynaFile="profile_apache-prod_sc") stop }}
-:programname, isequal, "teamsserver" { action(type="omfile" DynaFile="teams-prod_sc" ) stop }
+if $programname == "teamsserver" then { action(type="omfile" DynaFile="teams_server-prod_sc") stop }}
-:programname, isequal, "teamsgui" { action(type="omfile" DynaFile="apache-teams-prod_sc" ) stop }
+if $programname == "teamsgui" then { action(type="omfile" DynaFile="teams_gui-prod_sc") stop }}
-:programname, isequal, "vootserver" { action(type="omfile" DynaFile="voot-prod_sc" ) stop }
+if $programname == "vootserver" then { action(type="omfile" DynaFile="voot-prod_sc") stop }}
-:programname, isequal, "mariadbd" { action(type="omfile" DynaFile="galera-prod_sc" ) stop }
+if $programname == "mariadb" then { action(type="omfile" DynaFile="galera-prod_sc") stop }}
-:programname, isequal, "garb-systemd" { action(type="omfile" DynaFile="haproxy-prod_sc" ) stop }
+if $programname == "garb-systemd" then { action(type="omfile" DynaFile="galera_garb-prod_sc") stop }}
-:programname, isequal, "Keepalived_vrrp" { action(type="omfile" DynaFile="keepalived-prod_sc" ) stop }
+if $programname == "Keepalived_vrrp" then { action(type="omfile" DynaFile="keepalived-acc_sc") stop }}
-:programname, startswith, "mongo" { action(type="omfile" DynaFile="mongo-prod_sc" ) stop }
+if $programname == "mongod" then { action(type="omfile" DynaFile="mongo-prod_sc") stop }}
-:programname, isequal, "Apache-STATIC" { action(type="omfile" DynaFile="apache-static-prod_sc" ) stop }
+if $programname == "Apache-STATIC" then { action(type="omfile" DynaFile="static-prod_sc") stop }}
-:programname, isequal, "Apache-METADATA" { action(type="omfile" DynaFile="apache-metadata-prod_sc" ) stop }
+if $programname == "Apache-METADATA" then { action(type="omfile" DynaFile="metadata-prod_sc") stop }}
-:programname, isequal, "oidcngserver" { action(type="omfile" DynaFile="oidcng-prod_sc" ) stop }
+if $programname == "oidcngserver" then { action(type="omfile" DynaFile="oidcng_server-prod_sc") stop }}
-:programname, isequal, "oidcngjson" { action(type="omfile" DynaFile="oidcngjson-prod_sc" ) stop }
+if $programname == "oicdngjson" then { action(type="omfile" DynaFile="oidcng_json-prod_sc") stop }}
-:programname, isequal, "oidcplaygroundserver" { action(type="omfile" DynaFile="oidc-playground-prod_sc" ) stop }
+if $programname == "oidcplaygroundserver" then { action(type="omfile" DynaFile="oidc_play_server-prod_sc") stop }}
-:programname, isequal, "oidcplaygroundgui" { action(type="omfile" DynaFile="apache-oidcplayground-prod_sc" ) stop }
+if $programname == "oidcplaygroundgui" then { action(type="omfile" DynaFile="oidc_play_gui-prod_sc") stop }}
-:programname, isequal, "myconextserver" { action(type="omfile" DynaFile="myconext-prod_sc" ) stop }
+if $programname == "myconextserver" then { action(type="omfile" DynaFile="eduid_server-prod_sc") stop }}
-:programname, isequal, "myconextjson" { action(type="omfile" DynaFile="myconextjson-prod_sc" ) stop }
+if $programname == "myconextjson" then { action(type="omfile" DynaFile="eduid_json-prod_sc") stop }}
-:programname, isequal, "myconextgui" { action(type="omfile" DynaFile="apache-myconext-prod_sc" ) stop }
+if $programname == "myconextgui" then { action(type="omfile" DynaFile="eduid_gui-prod_sc") stop }}
-:programname, isequal, "accountgui" { action(type="omfile" DynaFile="apache-account-prod_sc" ) stop }
+if $programname == "accountgui" then { action(type="omfile" DynaFile="eduid_account-prod_sc") stop }}
-:programname, isequal, "servicedeskgui" { action(type="omfile" DynaFile="apache-servicedesk-prod_sc" ) stop }
+if $programname == "servicedeskgui" then { action(type="omfile" DynaFile="eduid_servicedesk-prod_sc") stop }}
-:programname, startswith, "inviteclient" { action(type="omfile" DynaFile="inviteclient-prod_sc" ) stop }
+if $programname == "inviteclient" then { action(type="omfile" DynaFile="invite_client-prod_sc") stop }}
-:programname, startswith, "invitewelcome" { action(type="omfile" DynaFile="invitewelcome-prod_sc" ) stop }
+if $programname == "invitewelcome" then { action(type="omfile" DynaFile="invite_welcome-prod_sc") stop }}
-:programname, startswith, "inviteserver" { action(type="omfile" DynaFile="inviteserver-prod_sc" ) stop }
+if $programname == "inviteserver" then { action(type="omfile" DynaFile="invite_server-prod_sc") stop }}
-:programname, isequal, "invitejson" { action(type="omfile" DynaFile="invitejson-prod_sc" ) stop }
+if $programname == "invitejson" then { action(type="omfile" DynaFile="invite_json-prod_sc") stop }}
-:programname, startswith, "inviteprovisioningmock" { action(type="omfile" DynaFile="inviteprovisioningmock-prod_sc" ) stop }
+if $programname == "inviteprovisioningmock" then { action(type="omfile" DynaFile="invite_provmock-prod_sc") stop }}
-:programname, startswith, "loadbalancer" { action(type="omfile" DynaFile="loadbalancer-prod_sc" ) stop }
+if $programname == "loadbalancer" then { action(type="omfile" DynaFile="traefik-prod_sc") stop }}

-if $programname == "gateway" and $msg contains '{"message":"Second Factor Authenticated"' then { action(type="omfile" DynaFile="stepup-authentication-prod_sc" ) stop }
+if $programname == "gateway" and $msg contains   "message":"Second Factor Authenticated" then { action(type="omfile" DynaFile="stepup_auth1-prod_sc") stop }}
-if $programname == "gateway" and $msg contains '{"message":"Intrinsic Loa Requested"' then { action(type="omfile" DynaFile="stepup-authentication-prod_sc" ) stop }
+if $programname == "gateway" and $msg contains   "message":"Intrinsic Loa Requested" then { action(type="omfile" DynaFile="stepup_auth2-prod_sc") stop }}

-if $programname == "spdashboard" and $msg startswith "spdashboard" then { action(type="omfile" DynaFile="apache-spdashboard-acc_sc" ) stop }
+if $programname == "spdashboard" then { action(type="omfile" DynaFile="spdashboard-prod_sc") stop }}
-:programname, isequal, "spdashboard" { action(type="omfile" DynaFile="spdashboard-acc_sc" ) stop }
+if $programname == "spdashboard" then { action(type="omfile" DynaFile="spdashboard_apache-prod_sc") stop }}

-:programname, isequal, "stepup-authentication" { action(type="omfile" DynaFile="stepup-authentication-acc_sc" ) stop }
+if $programname == "stepup-authentication" then { action(type="omfile" DynaFile="stepup_auth3-prod_sc") stop }}

Geeft geen inhoudelijke changes dus al het goed is.

@baszoetekouw baszoetekouw force-pushed the feature/rsyslog-simplify branch from e736c4d to d389737 Compare May 7, 2026 13:24
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.

2 participants