- 
                Notifications
    You must be signed in to change notification settings 
- Fork 495
splunk: add splunk-hec-raw() and splunk-hec-event() drivers #4462
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
          
     Merged
      
      
    
      
        
          +193
        
        
          −0
        
        
          
        
      
    
  
Conversation
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
    
    
  alltilla 
      added a commit
        to alltilla/syslog-ng
      that referenced
      this pull request
    
      May 8, 2023 
    
    
      
  
    
      
    
  
Signed-off-by: Attila Szakacs <attila.szakacs@axoflow.com>
| Tested manually on a local  | 
| Note to self: add info about template and event options to the newsfile. | 
              
                    MrAnno
  
              
              reviewed
              
                  
                    May 8, 2023 
                  
              
              
            
            
    
  alltilla 
      added a commit
        to alltilla/syslog-ng
      that referenced
      this pull request
    
      May 9, 2023 
    
    
      
  
    
      
    
  
Signed-off-by: Attila Szakacs <attila.szakacs@axoflow.com>
    
  alltilla 
      added a commit
        to alltilla/syslog-ng
      that referenced
      this pull request
    
      May 9, 2023 
    
    
      
  
    
      
    
  
Signed-off-by: Attila Szakacs <attila.szakacs@axoflow.com>
    
  alltilla 
      added a commit
        to alltilla/syslog-ng
      that referenced
      this pull request
    
      May 9, 2023 
    
    
      
  
    
      
    
  
Signed-off-by: Attila Szakacs <attila.szakacs@axoflow.com>
Signed-off-by: Attila Szakacs <attila.szakacs@axoflow.com>
Signed-off-by: Attila Szakacs <attila.szakacs@axoflow.com>
              
                    MrAnno
  
              
              approved these changes
              
                  
                    May 9, 2023 
                  
              
              
            
            
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
      
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
splunk: Added support for sending messages to Splunk HEC.
The
splunk-hec-event()destination feeds Splunk via the HEC events API.Minimal config:
Additional options include:
event()index()source()sourcetype()host()time()default-index()default-source()default-sourcetype()fields()extra-headers()extra-queries()content-type()event()accepts a template, which declares the content of the log message sent to Splunk.By default we send the
${MSG}value.index(),source(),host()andtime()accepts templates, which declare the respective fieldof each log message based on the set template.
default-index(),default-source()anddefault-sourcetype()accepts literal strings, whichwill be used for fallback values if a log message does not set these fields. These values are
passed to the URL as query parameters, so they do not inflate the body of the HTTP request
for each message in the batch, which saves bandwidth.
fields()accepts template, which is passed as additional indexing metadata to Splunk.extra-headers(),extra-queries()andcontent-type()are additional HTTP request options.The
splunk-hec-raw()destination feeds Splunk via the HEC raw API.Regarding its options, it is similar to the
splunk-hec-event()destination with the additionof the mandatory
channel()option, which accepts a GUID as a literal string that differentiatesdata from different clients. Another difference is that instead of
event(), here thetemplate()option sets the template which will represent the log message in Splunk.
Minimal config:
Signed-off-by: Attila Szakacs attila.szakacs@axoflow.com