Compare commits
4 Commits
f833566c4a
...
fd33637741
| Author | SHA1 | Date |
|---|---|---|
|
|
fd33637741 | |
|
|
255d6c4b9c | |
|
|
634a879903 | |
|
|
9eb715a9a0 |
|
|
@ -119,7 +119,7 @@
|
|||
"""
|
||||
emailext subject: env.JOB_NAME,
|
||||
body: 'Please find the output of your reports attached',
|
||||
to: 'coco-apm@bmw.de, bmw.dynatrace@nttdata.com',
|
||||
to: 'coco-apm@bmw.de, bmw.dynatrace@nttdata.com, ops-xibix@list.bmw.com, omo-xibix@list.bmw.com, omo@bmwgroup.com',
|
||||
replyTo: 'coco-apm@bmw.de',
|
||||
attachmentsPattern: '*.xlsx'
|
||||
|
||||
|
|
|
|||
|
|
@ -63,9 +63,9 @@ def main():
|
|||
url = dict(doc[1])
|
||||
name = dict(doc[0]).get('name')
|
||||
print("Crawling through: " + item)
|
||||
print("Check if token exists in environment " + name + " ...")
|
||||
print("Check if token exists in environment " + name)
|
||||
if(config(token.get('env-token-name')) != ""):
|
||||
print("Gather data, hold on a minute")
|
||||
print("Gather data, hold on a minute ...")
|
||||
DTTOKEN = config(token.get('env-token-name'))
|
||||
DTURL = url.get('env-url')
|
||||
print(args)
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@ def notify(envName,token, subject, notification,notificationAge):
|
|||
notification.token_id = token["id"]
|
||||
notification.token_name = token_args[3]
|
||||
notification.environment = envName
|
||||
print("Emailing " + to + " about " + subject)
|
||||
Response = sendMail(to,subject,createNotificationHTML(notification))
|
||||
except Exception as e:
|
||||
print(e)
|
||||
|
|
@ -52,6 +53,7 @@ def gatherAndNotify(envName, envUrl, Token, reportOnly, notifyOwner, deactivatio
|
|||
tokenDisabledSoon = CheckForDisabling(envUrl, Token, reportOnly, notificationAgeInactivity, notifyOwner)
|
||||
|
||||
if notifyOwner == True:
|
||||
print("Notifiying owners in " + envName)
|
||||
for token in tokenDisabled:
|
||||
subject = "Deactivation of your Dynatrace Token"
|
||||
notify(envName,token,subject,TokenDisabledNotification(),0)
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@
|
|||
</p>
|
||||
<p class=MsoNormal>
|
||||
<span lang=EN-GB style='font-family:"Arial Nova Cond Light",sans-serif'>
|
||||
Please revoke your token as mentioned here {{ notify.helpUrl }} otherwise your token will be deactivated.<o:p></o:p>
|
||||
Please request a new token as mentioned here {{ notify.helpUrl }}. <o:p></o:p>
|
||||
</span>
|
||||
</p>
|
||||
<p class=MsoNormal>
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@
|
|||
</p>
|
||||
<p class=MsoNormal>
|
||||
<span lang=EN-GB style='font-family:"Arial Nova Cond Light",sans-serif'>
|
||||
Please request your token as mentioned here {{ notify.helpUrl }}. <o:p></o:p>
|
||||
Please request a new token as mentioned here {{ notify.helpUrl }}. <o:p></o:p>
|
||||
</span>
|
||||
</p>
|
||||
<p class=MsoNormal>
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@
|
|||
</p>
|
||||
<p class=MsoNormal>
|
||||
<span lang=EN-GB style='font-family:"Arial Nova Cond Light",sans-serif'>
|
||||
Please request your token as mentioned here {{ notify.helpUrl }}. <o:p></o:p>
|
||||
Please request a new token as mentioned here {{ notify.helpUrl }}. <o:p></o:p>
|
||||
</span>
|
||||
</p>
|
||||
<p class=MsoNormal>
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@
|
|||
</p>
|
||||
<p class=MsoNormal>
|
||||
<span lang=EN-GB style='font-family:"Arial Nova Cond Light",sans-serif'>
|
||||
Please request your token as mentioned here {{ notify.helpUrl }}. <o:p></o:p>
|
||||
Please request a new token as mentioned here {{ notify.helpUrl }}. <o:p></o:p>
|
||||
</span>
|
||||
</p>
|
||||
<p class=MsoNormal>
|
||||
|
|
|
|||
Loading…
Reference in New Issue