| 1 | #!/usr/bin/env bash |
| 2 | |
| 3 | # --dedup-logfile=/opt/agent-events/log/dedup.log \ |
| 4 | |
| 5 | stdbuf -oL /opt/agent-events/server \ |
| 6 | --port=30001 \ |
| 7 | --dedup-key=agent.id \ |
| 8 | --dedup-key=host.id \ |
| 9 | --dedup-key=host.boot.id \ |
| 10 | --dedup-key=exit_cause \ |
| 11 | --dedup-window=1800 \ |
| 12 | 2>/opt/agent-events/log/stderr.log \ |
| 13 | | stdbuf -oL log2journal json \ |
| 14 | --prefix 'AE_' \ |
| 15 | --inject 'SYSLOG_IDENTIFIER=agent-events' \ |
| 16 | --rename AE_AGENT_PROFILE_0=AE_AGENT_ND_PROFILE_0 \ |
| 17 | --rename AE_AGENT_PROFILE_1=AE_AGENT_ND_PROFILE_1 \ |
| 18 | --rename AE_AGENT_PROFILE_2=AE_AGENT_ND_PROFILE_2 \ |
| 19 | --rename AE_STATUS=AE_AGENT_STATUS \ |
| 20 | --rename AE_STATUS=AE_AGENT_ND_STATUS \ |
| 21 | --rename AE_AGENT_EXIT_REASON_0=AE_AGENT_ND_EXIT_REASON_0 \ |
| 22 | --rename AE_AGENT_EXIT_REASON_1=AE_AGENT_ND_EXIT_REASON_1 \ |
| 23 | --rename AE_AGENT_EXIT_REASON_2=AE_AGENT_ND_EXIT_REASON_2 \ |
| 24 | --rename AE_AGENT_EXIT_REASON_3=AE_AGENT_ND_EXIT_REASON_3 \ |
| 25 | --rename AE_AGENT_NODE_ID=AE_AGENT_ND_NODE_ID \ |
| 26 | --rename AE_AGENT_CLAIM_ID=AE_AGENT_ND_CLAIM_ID \ |
| 27 | --rename AE_AGENT_INSTALL_TYPE=AE_AGENT_ND_INSTALL_TYPE \ |
| 28 | --rename AE_AGENT_RESTARTS=AE_AGENT_ND_RESTARTS \ |
| 29 | --rename AE_AGENT_DB_MODE=AE_AGENT_ND_DB_MODE \ |
| 30 | --rename AE_AGENT_DB_TIERS=AE_AGENT_ND_DB_TIERS \ |
| 31 | --rename AE_AGENT_KUBERNETES=AE_AGENT_ND_KUBERNETES \ |
| 32 | --rename AE_AGENT_SENTRY_AVAILABLE=AE_AGENT_ND_SENTRY_AVAILABLE \ |
| 33 | --rename AE_AGENT_SENTRY_AVAILABLE=AE_AGENT_ND_SENTRY \ |
| 34 | --rename PRIORITY=AE_PRIORITY \ |
| 35 | --rename MESSAGE=AE_MESSAGE \ |
| 36 | --rewrite 'AE_FATAL_LINE=/0//' \ |
| 37 | --rewrite 'AE_FATAL_THREAD_ID=/0//' \ |
| 38 | --rewrite 'AE_OS_PLATFORM=/unknown/${AE_OS_FAMILY}/' \ |
| 39 | --rewrite 'MESSAGE=/.*/${MESSAGE}\n${AE_FATAL_MESSAGE}/' \ |
| 40 | | systemd-cat-native --newline=\\n |