trajano  
                (Archimedes Trajano)
               
                 
              
                  
                    October 9, 2019,  9:40pm
                   
                   
              1 
               
             
            
              I'm trying to run metric beats without having a configuration file.  I was wondering how do you enable modules?
I tried
-E modules.docker.enable=true 
-E module.docker.enable=true 
-E metricbeat.modules=[module.docker.enable=true]
But does not appear to work.
             
            
               
               
               
            
            
           
          
            
            
              Hello,
Here is an example of enabling the apache & mysql modules:
metricbeat modules enable apache mysql
 
More documentation and examples can be found here:
             
            
               
               
               
            
            
           
          
            
              
                trajano  
                (Archimedes Trajano)
               
              
                  
                    October 11, 2019,  4:39pm
                   
                   
              3 
               
             
            
              except in your example it does not enable it via the command line runner.  So it won't work in Docker unless we create a custom image.
             
            
               
               
               
            
            
           
          
            
              
                trajano  
                (Archimedes Trajano)
               
              
                  
                    October 13, 2019,  4:54am
                   
                   
              4 
               
             
            
              Here is the solution I have used in my project that sets up an ELK stack with zero custom images or external configuration files.
  
  
    
command: 
  - -E 
  - | 
    metricbeat.modules=[ 
      { 
        module:docker, 
        hosts:[unix:///var/run/docker.sock], 
        period:10s, 
        enabled:true 
      } 
    ]  
  
   
  
    
    
  
  
 
The whole project is in https://github.com/trajano/elk-swarm/ 
             
            
               
               
               
            
            
           
          
            
              
                system  
                (system)
                  Closed 
               
              
                  
                    November 10, 2019,  4:54am
                   
                   
              5 
               
             
            
              This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.