What is the behavior of Promtail when it encounters a compressed folder like .tar.gz or .zip - grafana

How does promtail read the files inside a compressed (.zip or .tar or .tar.gz) folder? Does it at all monitor the compressed files or not?
I have made an environment for promtail to monitor a folder that has three types of folders inside it - .zip folder, .tar.gz folder and a normal folder all of which contains .log files.
The RegEx configured in Promtail is as /path/switch/**/*.log (switch contains the 3 types of folders)
Now, I expected it to read the log files inside the .tar.gz and the normal folder. It cannot read the .zip folder as mentioned in the document link here by Grafana https://grafana.com/docs/loki/latest/clients/promtail/#:~:text=.tar.gz%3A%20Data,the%20near%20future.
However, it is not reading any of the compressed file formats. It is just reading the log files present in the normal folder. I checked this through the Position.yaml file of promtail.
How can I make Promtail read the log files present inside the .tar.gz folder?

Related

Upload .css file after saving .scss file

I use Visual Studio Code and WinSCP. When I open .scss file via WinSCP the file is opened automatically by VSC – It's ok. There is an extension Live Sass Compiler to I could compile .scss into .css file. The problem is that .css file is created in temporary folder with random number so I always must upload the file manually by drag the file from the folder to FTP client.
Is it there any solution to upload the .css file automatically on save from the temporary folder? Thank you in advance for a help.
Download the files to a local folder.
Have WinSCP monitor the folder and automatically upload any modifications (including new files).
Edit the files locally (and have WinSCP upload the changes, including the generated files).
For your literal question, there's WinSCP feature request.

PowerShell extract the content of subfolder (all files and folders) of zip archive

I have a zipped folder named install and I need to extract a content of that folder (all files and folders) to some other destination using power shell. I tried to do the following:
Expand-Archive -LiteralPath C:\temp\install.zip -DestinationPath C:\"Program Files"\mbeats
In this case I extract install folder itself into mbeats folder, not the content of install folder.
Any idea how to fix this?
Thanks, Dragan
If your zip file - called "install.zip" - contains a folder - called "install" - that contains the folders and files you are interested in, then your observation is indeed the intended behaviour. Keep in mind that you do not have to put all files into a folder ("install") before archiving them into a zip file ("install.zip").
If you do not want to extract your whole zip archive, but all files and folders inside the folder "install", then you have to access those items piece by piece, like described here.

How to put all the file include plug-in and config file in one folder?

I want to put the VSCode into the OneDrive or a USB Disk, but I don't know how to include the plug-in and all the config except the tmp files(if there be).

PhpStorm: Automatically deploy .css files after File Watcher transpiled .less / .sass files

I am deploying my documents automatically to the server.
When I save my .less / .sass files, the File Watcher transpiles them, but only uploads the source files, not the transpiled .css file.
Is there a way that the .css file is also being deployed?
Make sure to tick the 'Upload external changes' checkbox in Deployment/Options. This option makes PHPStorm upload the files changed by a third-party tool (LESS compiler in your case).
See http://www.jetbrains.com/webstorm/webhelp/deployment.html and related topics for more info

need suggession for access file

In my app i have one use case "Download Folder(s)" from web server this folder is in zip format.
This folder contains : text files and more zip folder(s)
So my Question is
should i just download this folder and user will manage it by himself(like unzip it and open files)
OR
Should I make view like table and put folder name which are downloaded recently(just names no unzip and no open files)
OR
folder name in table format and if user press on any folder name(i.e cell in table) unzip folder and new view (table view) with file names and zip folder(as main folder contains both files and zip folder in it) (here unzip but not open files)
OR
Option 3 unzip all files and folder and if user click on any specific file open that files(unzip and open files)
right now i am just doing option 1.
also I am doing my master project so the answers from experience users will help me a lot
Thank you
I agree with AAAAAAAAA - number 3 in the minimum I would expect the app to do.
Ideally, you should unzip when they press a file and display the contents but don't open any files automatically.
However, if they press on a file that is unzipped already, you should try to open it - don't open them automatically when you unzip, open them when the user asks for it to be opened :)