forked from kumina/postfix_exporter
    
        
        - 
                Notifications
    You must be signed in to change notification settings 
- Fork 0
Update from Upstream #2
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
          
     Open
      
      
            dadicool
  wants to merge
  128
  commits into
  honestica:master
  
    
      
        
          
  
    
      Choose a base branch
      
     
    
      
        
      
      
        
          
          
        
        
          
            
              
              
              
  
           
        
        
          
            
              
              
           
        
       
     
  
        
          
            
          
            
          
        
       
    
      
from
kumina:master
  
      
      
   
  
    
  
  
  
 
  
      
    base: master
Could not load branches
            
              
  
    Branch not found: {{ refName }}
  
            
                
      Loading
              
            Could not load tags
            
            
              Nothing to show
            
              
  
            
                
      Loading
              
            Are you sure you want to change the base?
            Some commits from the old base branch may be removed from the timeline,
            and old review comments may become outdated.
          
          
                
     Open
            
            
          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
    
  
  
    
    The following flags configure this usage: - systemd.enable: enable collection from systemd. - systemd.unit: systemd unit, postfix.service by default. - systemd.slice: systemd slice, overrides the unit. - systemd.journal_path: path to the systemd journal directory. Closes #2
Implement collection from the systemd journal
Initialize histograms to zero
Document systemd usage
fixes #10 where metrics metrics collected from the systemd journal were not updated after some time
fix non-updating metrics from systemd-journal
This allows building the exporter without systemd headers, eg:
    env CGO_ENABLED=0 go build -tags nosystemd
Closes #11
    Add nosystemd build tag
add Dockefile
See, $ gometalinter --vendor ./... postfix_exporter.go:249::warning: Potential file inclusion via variable,MEDIUM,HIGH (gosec) postfix_exporter.go:80::warning: Errors unhandled.,LOW,HIGH (gosec) postfix_exporter.go:121::warning: Errors unhandled.,LOW,HIGH (gosec) postfix_exporter.go:296::warning: Errors unhandled.,LOW,HIGH (gosec) postfix_exporter.go:298::warning: Errors unhandled.,LOW,HIGH (gosec) postfix_exporter.go:300::warning: Errors unhandled.,LOW,HIGH (gosec) postfix_exporter.go:302::warning: Errors unhandled.,LOW,HIGH (gosec) postfix_exporter.go:309::warning: Errors unhandled.,LOW,HIGH (gosec) postfix_exporter.go:311::warning: Errors unhandled.,LOW,HIGH (gosec) postfix_exporter.go:313::warning: Errors unhandled.,LOW,HIGH (gosec) postfix_exporter.go:315::warning: Errors unhandled.,LOW,HIGH (gosec) postfix_exporter.go:322::warning: Errors unhandled.,LOW,HIGH (gosec) postfix_exporter.go:324::warning: Errors unhandled.,LOW,HIGH (gosec) postfix_exporter.go:333::warning: Errors unhandled.,LOW,HIGH (gosec) postfix_exporter.go:335::warning: Errors unhandled.,LOW,HIGH (gosec) postfix_exporter.go:337::warning: Errors unhandled.,LOW,HIGH (gosec) postfix_exporter.go:339::warning: Errors unhandled.,LOW,HIGH (gosec) postfix_exporter.go:650::warning: Errors unhandled.,LOW,HIGH (gosec)
See, $ gometalinter --vendor ./... postfix_exporter.go:256:1:warning: CollectShowqFromFile is unused (deadcode)
See, $ gometalinter --vendor ./... systemd.go:49::warning: Errors unhandled.,LOW,HIGH (gosec)
Fix gosec issues
See, $ gometalinter --vendor --deadline 10m --disable-all --enable=megacheck ./... postfix_exporter.go:97:17:warning: should use raw string (`...`) with regexp.MustCompile to avoid having to escape twice (S1007) (megacheck) postfix_exporter.go:276:40:warning: should use raw string (`...`) with regexp.MustCompile to avoid having to escape twice (S1007) (megacheck) postfix_exporter.go:277:40:warning: should use raw string (`...`) with regexp.MustCompile to avoid having to escape twice (S1007) (megacheck) postfix_exporter.go:278:40:warning: should use raw string (`...`) with regexp.MustCompile to avoid having to escape twice (S1007) (megacheck) postfix_exporter.go:279:40:warning: should use raw string (`...`) with regexp.MustCompile to avoid having to escape twice (S1007) (megacheck) postfix_exporter.go:280:40:warning: should use raw string (`...`) with regexp.MustCompile to avoid having to escape twice (S1007) (megacheck) postfix_exporter.go:281:40:warning: should use raw string (`...`) with regexp.MustCompile to avoid having to escape twice (S1007) (megacheck) postfix_exporter.go:282:40:warning: should use raw string (`...`) with regexp.MustCompile to avoid having to escape twice (S1007) (megacheck) postfix_exporter.go:283:40:warning: should use raw string (`...`) with regexp.MustCompile to avoid having to escape twice (S1007) (megacheck) postfix_exporter.go:284:40:warning: should use raw string (`...`) with regexp.MustCompile to avoid having to escape twice (S1007) (megacheck) postfix_exporter.go:285:40:warning: should use raw string (`...`) with regexp.MustCompile to avoid having to escape twice (S1007) (megacheck) Signed-off-by: Mario Trangoni <[email protected]>
postfix_exporter.go: Fix megacheck issues
See these annoying messages, Feb 06 13:34:03 hostname postfix_exporter[30713]: 2019/02/06 13:34:03 Could not read postfix output, EOF Feb 06 13:34:27 hostname postfix_exporter[30713]: 2019/02/06 13:34:27 Could not read postfix output, EOF Feb 06 13:35:27 hostname postfix_exporter[30713]: 2019/02/06 13:35:27 Could not read postfix output, EOF Feb 06 13:36:27 hostname postfix_exporter[30713]: 2019/02/06 13:36:27 Could not read postfix output, EOF Feb 06 13:37:27 hostname postfix_exporter[30713]: 2019/02/06 13:37:27 Could not read postfix output, EOF Feb 06 13:38:27 hostname postfix_exporter[30713]: 2019/02/06 13:38:27 Could not read postfix output, EOF Feb 06 13:39:27 hostname postfix_exporter[30713]: 2019/02/06 13:39:27 Could not read postfix output, EOF Feb 06 13:40:27 hostname postfix_exporter[30713]: 2019/02/06 13:40:27 Could not read postfix output, EOF Feb 06 13:41:27 hostname postfix_exporter[30713]: 2019/02/06 13:41:27 Could not read postfix output, EOF Feb 06 13:42:27 hostname postfix_exporter[30713]: 2019/02/06 13:42:27 Could not read postfix output, EOF
postfix_exporter.go: Handle the case where EOF is reached.
Refactored to kingpin and bugfix.
fix smtpd TLS connection regex
Updated README
fixes panic appears when tailer is nil
Provides a cleaner split between log sources, specifically for not compiling with systemd libraries. This is in preparation for a new log source to read from Docker.
When Postfix is running in a Docker container, it's most useful to use the built-in Docker logging (as with Systemd). Setting `--docker.enable` allows that. The log source is using `client.NewEnvClient`, which reads environment variables to determine which Docker to connect to, and how TLS is handled.
Changed bucket sizes for Time measurements
fixes an issue where can't get metrics in systemd journal
Adds a Docker log source.
Revert "Adds a Docker log source."
Provides a cleaner split between log sources, specifically for not compiling with systemd libraries. This is in preparation for a new log source to read from Docker.
When Postfix is running in a Docker container, it's most useful to use the built-in Docker logging (as with Systemd). Setting `--docker.enable` allows that. The log source is using `client.NewEnvClient`, which reads environment variables to determine which Docker to connect to, and how TLS is handled.
Currently it does not always detect rotated logfiles. There are many issues in hpcloud/tail which are not addressed, hpcloud/tail looks dead. nxadm/tail is a fork which solved many known issues.
Update tail from hpcloud/tail to nxadm/tail
Fix: Default for mail log path
Upgrade golang to 1.16
Add some new metrics when parsing postfix logs
  
    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.
  
    
  
    
No description provided.