Create path similar to /{namespace}/{pod-name}/{container-name}/*.log to store logs using file output plugin. #7386
              
                Unanswered
              
          
                  
                    
                      maitry-nutanix
                    
                  
                
                  asked this question in
                Q&A
              
            Replies: 1 comment 2 replies
-
| From memory, I think I did this previously by rewriting the tag to match what I wanted. | 
Beta Was this translation helpful? Give feedback.
                  
                    2 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.
-
I want to store logs that are being read from tail input plugin and store them in the destination by creating a directory structure for them. Currently all the logs are stored in the Destination folder with name as kube.var.log.pods.namespace.pod_name.id.container_name.0.log. Is it possible to create a directory structure for storing logs inside destination directory as path_to_destination//{namespace}/{pod-name}/{container-name}/*.log
Until now I've tried to use lua filter but didn't get much success with it because there's nothing like record["path"] in which I can specify the path where to store my logs. Also, dynamic folder creation in the path key of output plugin is not supported.
Need help in how to do that.
Beta Was this translation helpful? Give feedback.
All reactions