NAUbackup / VmBackup

XenServer simple backup script
228 stars 62 forks source link

Feature request: Display hostname in the email #75

Closed VARGA-Peter closed 6 years ago

VARGA-Peter commented 6 years ago

I have several XenServer hosts. It would be nice when in the email subject - sent after the job finished - hostname would be added. For the moment I adapted it in my local version.

NAUbackup commented 6 years ago

Hi, Peter: Do you mean so that this identifies the host better as the pool master or standalone host? Is it not already? --Tobias

VARGA-Peter commented 6 years ago

I mean in the subject of the email. I would have here directly the code lines with the hostname in it.

Line #483: #send_email(MAIL_TO_ADDR, 'ERROR ' + os.uname()[1] + ' VmBackup.py', status_log)

Line #490 #send_email(MAIL_TO_ADDR,'WARNING ' + os.uname()[1] + ' VmBackup.py', status_log)

Line #497: #send_email(MAIL_TO_ADDR, 'Success ' + os.uname()[1] + ' VmBackup.py', status_log)

NAUbackup commented 6 years ago

I can probably build that into the next release. We run a custom version in-house that already has that built in, hence I can appreciate having that in the email header.

NAUbackup commented 6 years ago

Coming in the next release (3.23).