-
Notifications
You must be signed in to change notification settings - Fork 55
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
Support for inexistent files #13
Comments
Interesting. We do support The only scenarios where this wouldn't work, off the top of my head, is if:
|
I have a similar issue where I'm tailing specific log files where the directory they're located in have way too many noisy logs that I don't want to forward to logdna. |
@leeliu The problem of using this approach is because we have many logs in And about the file, it's removed and only replaced when new log lines are inserted. And as the file does not exist when a new deploy is made, the file needs to be created. So there is a delay between the old file is moved and a new one is created. And as i said, that is a really common environment when working with application deployment. Using Chef for deployments, for example, we have a I think the agent should identify when this happens, and do not simply send a exception saying the file does not exist and stops everything, what actually happens today. A simple "ok, lets skip this file by now and lets try it again later" would be awesome. Thanks :) And that is what happens with us too @regabi. We don't wanna send every log file that is in the folder to the LogDNA, only some of them. And as they're created when needed, the agent simply does not pick them after a deployment. |
Got it. Give me some time to make the necessary changes. |
Thank you @leeliu. |
@iagomelanias Okay, this commit will now continue to scan for files every minute, even if it didn't exist at startup. I also confirmed after some testing that if you move/rename/delete a file that is being tailed, it will keep tailing even if a new file with the same name isn't immediately created. As far as I can tell, it'll wait indefinitely for the new file to show up. |
Thank you @leeliu. |
Thank you again @leeliu. Awesome support. @regabi It was already released. I've updated our agent version by running the commands above:
👍 |
Thanks @iagomelanias for helping with the apt commands. I should've indicated next steps in my last msg. Anyway, the release is live on the repos but we haven't sent out auto update notifications to connected agents yet. We typically delay this for a few days in case of a bad release. But if you wait for it, all your agents will eventually update themselves to the latest version. |
Oh, I didn't realize you had automatic updates, it's very cool. Out of curiosity, how do I know when the agent gets updated, is the version On Thu, Sep 22, 2016 at 11:45 AM, Lee Liu notifications@github.com wrote:
|
@leeliu me too. And just reporting a bug, the current version shown in the command is |
@regabi Yes, the agent version will be 1.3.6 when autoupdate finishes. You can check by @iagomelanias Oops...thanks for catching that! We skipped 1.3.5, it was a quick fix for a customer and subsequently never publicly released it. I've retagged it as 1.3.6. |
@leeliu Thanks again! 😄 |
Regarding autoupdate, I've always hated having to manage versions of agents (mainly coming from New Relic). The autoupdate mechanism just uses yum/apt to do the actual update which I thought was a quick win and fairly easy to implement. And you can always turn it off |
If we specify a file that does not exist, the
logdna-agent
will not keep running waiting the file to be created. That is really common when working with deploys.We have a environment using a deploy tool. Every time a new deploy is made, a new log file is created inside the project, and the old one is moved. What happens is if we make a deploy, the logs will not be sent anymore, because the file was moved the and
logdna-agent
will not find it.So we need to create a empty log file by default in the VCS repository. What is not a recommended practice.
Example:
Default environment:
The logs are in
/deploys/current/var/logfile.log
.A new deploy is made:
The file
/deploys/current/var/logfile.log
is moved to another folder.And the
logdna-agent
stops working.And the new
logfile.log
is created only when any information is logged.So, would be great if the agent keeps running even if the file does not exists. This kind of situation is really common.
The text was updated successfully, but these errors were encountered: