Pro tip: When posting complex source text, use the code block. (</> icon). This way your post will not have so many frowning faces Can you confirm whether Splunk gives you a field like Propertie...
See more...
Pro tip: When posting complex source text, use the code block. (</> icon). This way your post will not have so many frowning faces Can you confirm whether Splunk gives you a field like Properties.Activity? If it does, spath MessageTemplate would do nothing because MessageTemplate is already a top-level scalar. If no, spath MessageTemplate would do nothing because the path MessageTemplate does not exist. I still assume that Splunk already gives you fields Properties.Activity and MessageTemplate because your index search already invokes a field named "Environment" which is at the same top level as MessageTemplate and Properties. All you need to do to extract values of interest from Properties.Activity index=activitylog_activityreceiver Environment="AWS-DEV6"
MessageTemplate="Received Post Method for activity: {Activity}"
| spath input=Properties.Activity Your sample data should give ActivityStatus ActivityType ClientId Data.parentSpanId Data.pcm.user_id Data.traceId OriginCreationTimestamp Source SourcePath TenantCode TenantContextId COMPLETE SendTemplateSettings 9115 766ea5ba2e592c6f 2 3d0174bb033061b6ea293b4b694b539e 2023-09-27T12:46:04.7371426+00:00 Web Entry Form null Pcm.iLevelWebsite.Activities 943fc4e0ab5f084274812d4d1ed045ef This is the emulation for the data you show. (Attempt to correct those frowning faces rendered embedded Properties.Activity somewhat noncompliant, but Splunk dealt with fine.) | makeresults
| eval _raw = "{\"Level\":\"Information\",\"MessageTemplate\":\"Received Post Method for activity: {Activity}\",\"RenderedMessage\":\"Received Post Method for activity: \\\"{\\\\\\\"ClientId\\\\\\\":\\\\\\\"9115\\\\\\\",\\\\\\\"TenantCode\\\\\\\":\\\\\\\"Pcm.iLevelWebsite.Activities\\\\\\\",\\\\\\\"ActivityType\\\\\\\":\\\\\\\"SendTemplateSettings\\\\\\\",\\\\\\\"Source\\\\\\\":\\\\\\\"Web Entry Form\\\\\\\",\\\\\\\"SourcePath\\\\\\\":null,\\\\\\\"TenantContextId\\\\\\\":\\\\\\\"943fc4e0ab5f084274812d4d1ed045ef\\\\\\\",\\\\\\\"ActivityStatus\\\\\\\":\\\\\\\"COMPLETE\\\\\\\",\\\\\\\"OriginCreationTimestamp\\\\\\\":\\\\\\\"2023-09-27T12:46:04.7371426+00:00\\\\\\\",\\\\\\\"Data\\\\\\\":{\\\\\\\"traceId\\\\\\\":\\\\\\\"3d0174bb033061b6ea293b4b694b539e\\\\\\\",\\\\\\\"parentSpanId\\\\\\\":\\\\\\\"766ea5ba2e592c6f\\\\\\\",\\\\\\\"pcm.user_id\\\\\\\":2,\\\\\\\"pcm.field_changes\\\\\\\":[[[[[[[]],[[]],[[]]],[[[]],[[]],[[]]],[[[]],[[]],[[]]],[[[]],[[]],[[]]],[[[]],[[]],[[]]],[[[]],[[]],[[]]]]]]]}}\\\"\",\"Properties\":{\"Activity\":\"{\\\"ClientId\\\":\\\"9115\\\",\\\"TenantCode\\\":\\\"Pcm.iLevelWebsite.Activities\\\",\\\"ActivityType\\\":\\\"SendTemplateSettings\\\",\\\"Source\\\":\\\"Web Entry Form\\\",\\\"SourcePath\\\":null,\\\"TenantContextId\\\":\\\"943fc4e0ab5f084274812d4d1ed045ef\\\",\\\"ActivityStatus\\\":\\\"COMPLETE\\\",\\\"OriginCreationTimestamp\\\":\\\"2023-09-27T12:46:04.7371426+00:00\\\",\\\"Data\\\":{\\\"traceId\\\":\\\"3d0174bb033061b6ea293b4b694b539e\\\",\\\"parentSpanId\\\":\\\"766ea5ba2e592c6f\\\",\\\"pcm.user_id\\\":2,\\\"pcm.field_changes\\\":[[[[[[[]],[[]],[[]]],[[[]],[[]],[[]]],[[[]],[[]],[[]]],[[[]],[[]],[[]]],[[[]],[[]],[[]]],[[[]],[[]],[[]]]]]]]}}\",\"SourceContext\":\"Pcm.ActivityLog.ActivityReceiver.Controllers.v1.ActivitiesController\",\"ActionId\":\"512bd8da-6d33-43fa-bdea-98aec8557fbc\",\"ActionName\":\"Pcm.ActivityLog.ActivityReceiver.Controllers.v1.ActivitiesController.Post (Pcm.ActivityLog.ActivityReceiver)\",\"RequestId\":\"0HMTV8DM8SU7U:00000002\",\"RequestPath\":\"/api/activitylog/v1/activities\",\"ConnectionId\":\"0HMTV8DM8SU7U\",\"TenantContextId\":\"943fc4e0ab5f084274812d4d1ed045ef\",\"XRequestId\":\"5166ba8338c9671d9003c1d698d0e5aa\",\"CurrentCorrelationId\":\"25a0fd9f-163d-493e-905d-6e296af0e776\",\"ParentCorrelationId\":\"25a0fd9f-163d-493e-905d-6e296af0e776\",\"OriginCorrelationId\":\"25a0fd9f-163d-493e-905d-6e296af0e776\",\"Application\":\"ActivityLogActivityReceiver\",\"Environment\":\"AWS-DEV6\"}}"
| spath
``` emulates
index=activitylog_activityreceiver Environment="AWS-DEV6"
MessageTemplate="Received Post Method for activity: {Activity}"
``` If by any chance Splunk hasn't extracted Properties.Activity for obscure reasons, you can add an spath to extract it, then filter for MessageTemplate, then extract from Properties.Activity. index=activitylog_activityreceiver Environment="AWS-DEV6"
| spath
| search MessageTemplate="Received Post Method for activity: {Activity}"
| spath input=Properties.Activity