Closed innovia closed 6 years ago
Hi Konstantin,
I currently get child process pid that crash - having the parent process name in the email will be much help.
my message_body method is:
def message_body log_name = "#{log_file.empty? ? msg_name.to_s : log_file}.log" if process_match = /^(\w+)-/.match(msg_name.to_s) log_name = "#{process_match[1]}.log" end public_ip = `wget -q -O - http://169.254.169.254/latest/meta-data/public-ipv4`.chomp m = [] m << "<body>" m << "from mail: #{from_mail}" m << "<br><h3>#{msg_name.to_s} Process Info: </h3><br>" m << "<b>StdOut Log Tail (#{logs_folder}/#{log_name}):</b><br> <pre>#{`tail -n 30 #{logs_folder}/#{log_name}`}</pre><br>" m << "</body>" debug "message body: #{m * "\n"}" "#{m * "\n"}" end
I end up getting an email like this:
child-7513 on Server - Bounded memory(<400Mb): [81Mb, 81Mb, *2290Mb, *7834Mb, *13211Mb] send to [:restart] child-7513 Process Info: StdOut Log Tail (/opt/redash/logs/child.log):
What I want is to get the parent process name for the child that was killed.
is there a built in way in Eye to do that? what do you think?
Ami
try to output msg_full_name
msg_full_name
Thanks a lot
Hi Konstantin,
I currently get child process pid that crash - having the parent process name in the email will be much help.
my message_body method is:
I end up getting an email like this:
What I want is to get the parent process name for the child that was killed.
is there a built in way in Eye to do that? what do you think?
Ami