Difference in these codes for lua logging http-log/splunk logging? #13277
Replies: 2 comments 3 replies
-
| Hello @jeremyjpj0916, it is a little difficult to follow your writeup, but If I understand correctly, you want to use the  | 
Beta Was this translation helpful? Give feedback.
                  
                    3 replies
                  
                
            -
| Closing this... oddly the http-log plugin seems to be working for me with splunks hec collector on 3.9.0, cant fully explain it but I don't have to patch the http-log plugins code with this anymore, the regular json payload yall do seems to work: My old hack:  | 
Beta Was this translation helpful? Give feedback.
                  
                    0 replies
                  
                
            
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Originally tried to make my splunk log plugin and http-log plugin use some optimized code yall added and tweak it to work with the splunk:
Base path which requires a more splunk formatted payload than pure json see below example.
This requires the batched tx payload to look like this format which isn't true json:
True JSON(how kong does the json batch logging by default):
So why does this work for the format I need for the splunk logging:
But not this refactored version of your own new function yall use:
Any lua gurus see the main diff between the working one for me that gets the splunk format I need vs trying to make yalls new function work by stripping the []'s and ,'s ? Yall definitely moved away from the table concat one due to perf improvements in the memory of it all so I would love to move to it as well if I found what was going wrong with the way I tweaked it thats incorrect. Would even be nice if a splunk flag could be added to http-log plugin OSS to swap between native json and splunk's whacky body requirement too without me having to patch drop in the file manually.
Beta Was this translation helpful? Give feedback.
All reactions