diff --git a/apps/saphana.go b/apps/saphana.go index 26f6a60c0e..db0ffa8d26 100644 --- a/apps/saphana.go +++ b/apps/saphana.go @@ -18,45 +18,55 @@ import ( "context" "github.com/GoogleCloudPlatform/ops-agent/confgenerator" - "github.com/GoogleCloudPlatform/ops-agent/confgenerator/fluentbit" "github.com/GoogleCloudPlatform/ops-agent/confgenerator/otel" "github.com/GoogleCloudPlatform/ops-agent/internal/secret" ) -type LoggingProcessorSapHanaTrace struct { - confgenerator.ConfigComponent `yaml:",inline"` -} +type LoggingProcessorMacroSapHanaTrace struct{} -func (LoggingProcessorSapHanaTrace) Type() string { +func (LoggingProcessorMacroSapHanaTrace) Type() string { return "saphana" } -func (p LoggingProcessorSapHanaTrace) Components(ctx context.Context, tag string, uid string) []fluentbit.Component { - c := confgenerator.LoggingProcessorParseRegex{ - // Undocumented Format: [thread_id]{connection_id}[transaction_id/update_transaction_id] timestamp severity_flag component source_file : message - // Sample line: [7893]{200068}[20/40637286] 2021-11-04 13:13:25.025767 w FileIO FileSystem.cpp(00085) : Unsupported file system "ext4" for "/usr/sap/MMM/SYS/global/hdb/data/mnt00001" - // Sample line: [18048]{-1}[-1/-1] 2020-11-10 12:24:23.424024 i Crypto RootKeyStoreAccessor.cpp(00818) : Created new root key /usr/sap/MMM/SYS/global/hdb/security/ssfs:HDB_SERVER/3/PERSISTENCE - // Sample line: [18048]{-1}[-1/-1] 2020-11-10 12:24:20.988943 e commlib commlibImpl.cpp(00986) : ERROR: comm::connect to Host: 127.0.0.1, port: 30001, Error: exception 1: no.2110017 (Basis/IO/Stream/impl/NetworkChannel.cpp:2989) - // System error: SO_ERROR has pending error for socket. rc=111: Connection refused. channel={={={this=139745749931736, fd=21, refCnt=1, local=127.0.0.1/58654_tcp, remote=127.0.0.1/30001_tcp, state=ConnectWait, pending=[----]}}} - // exception throw location: - // 1: 0x00007f1937d9095c in .LTHUNK27.lto_priv.2256+0x558 (libhdbbasis.so) - // ... - // 25: 0x0000563f44888831 in _GLOBAL__sub_I_setServiceStarting.cpp.lto_priv.239+0x520 (hdbnsutil) - Regex: `^\[(?\d+)\]\{(?-?\d+)\}\[(?-?\d+)\/(?-?\d+)\]\s+(?