Skip to content
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

Error Logs as Mail Attachments #308

Closed
wants to merge 16 commits into from
Closed

Conversation

tanvi09
Copy link

@tanvi09 tanvi09 commented Aug 25, 2014

Included the functionality of adding " Inline message Errors" in the mail as attachments from the _job files. For fast tracking of errors, this saves time to go and check the logs.

Properties are configurable via the config properties files and are defined as

mail.attach.name=.*job.*.log
mail.inline.error=true

_mail.attach.name_ supports regex like ..log or ..job.* . This would attach files matching this regex as attachments from the job folder.
_mail.inline.error_ would also have the error statements as inline text in the mail body.

Hope this helps!

@tanvi09 tanvi09 changed the title Attach Error Log in Mail Attachments Aug 26, 2014
@tanvi09 tanvi09 changed the title Error Log in Mail Attachments Error Log as Mail Attachments Aug 26, 2014
@tanvi09 tanvi09 changed the title Error Log as Mail Attachments Error Logs as Mail Attachments Aug 26, 2014
@erwa
Copy link
Contributor

erwa commented Aug 26, 2014

Hi Tanvi,
Why do you want to attach log files to the emails? The logs are already viewable in the Azkaban web UI. There are also AJAX APIs you can use to fetch job logs: http://azkaban.github.io/azkaban/docs/2.5/#api-fetch-execution-job-logs

@kingster
Copy link

Hi Anthony,

We use azkaban as our monitoring and alerting system. In this scenario, log files as attachments, increases our response time to any issues, since the error files are readily available, specially on mobile devices ( though the same can be accessed via web UI as you mentioned but logging in and seeing the response becomes tedious time when there are multiple alerts, and action is to be taken based on the cause which threw the alert ) , and assessing the severity of the issue straight away and appropriate action if any taken immediately.

@erwa
Copy link
Contributor

erwa commented Sep 10, 2014

Hi Kinshuk,

I have concerns about this change. Log files can be very big and trying to attach them may cause the email to exceed the max email size, causing the email send to fail. Thus, I do not think we should merge this change.

@kingster
Copy link

Hi Anthony

Thanks for pointing out this case. This skipped my mind, since for most of our use cases the log files are normally small. This change set doesn't by default start by attaching files. This has to be specifically enabled via the config.

We can have another config, which says the max size of the attachment, and if that is crossed, it would skip it from attaching to the email. How do you think about it?

@kaneda
Copy link

kaneda commented Mar 23, 2015

@kingster wouldn't just the log lines leading up to and include the failure be what you're looking for? @erwa

kaneda pushed a commit to kaneda/azkaban that referenced this pull request Mar 24, 2015
- Updated azkaban#308 to take in a max lines, so that inline emails don't exceed 5 errors by default
- Ensure that these settings default to off
kaneda pushed a commit to kaneda/azkaban that referenced this pull request Jul 2, 2015
- Updated azkaban#308 to take in a max lines, so that inline emails don't exceed 5 errors by default
- Ensure that these settings default to off
@suvodeep-pyne
Copy link
Contributor

Cleaning up unattended / old PRs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants