Compare commits

..

No commits in common. "fd3363774101eac961bfe67174201ff402ea0931" and "f833566c4a2e64d454a8225a5523ef253da3ba45" have entirely different histories.

7 changed files with 7 additions and 9 deletions

2
Jenkinsfile vendored
View File

@ -119,7 +119,7 @@
""" """
emailext subject: env.JOB_NAME, emailext subject: env.JOB_NAME,
body: 'Please find the output of your reports attached', body: 'Please find the output of your reports attached',
to: 'coco-apm@bmw.de, bmw.dynatrace@nttdata.com, ops-xibix@list.bmw.com, omo-xibix@list.bmw.com, omo@bmwgroup.com', to: 'coco-apm@bmw.de, bmw.dynatrace@nttdata.com',
replyTo: 'coco-apm@bmw.de', replyTo: 'coco-apm@bmw.de',
attachmentsPattern: '*.xlsx' attachmentsPattern: '*.xlsx'

View File

@ -63,9 +63,9 @@ def main():
url = dict(doc[1]) url = dict(doc[1])
name = dict(doc[0]).get('name') name = dict(doc[0]).get('name')
print("Crawling through: " + item) 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')) != ""): 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')) DTTOKEN = config(token.get('env-token-name'))
DTURL = url.get('env-url') DTURL = url.get('env-url')
print(args) print(args)

View File

@ -38,7 +38,6 @@ def notify(envName,token, subject, notification,notificationAge):
notification.token_id = token["id"] notification.token_id = token["id"]
notification.token_name = token_args[3] notification.token_name = token_args[3]
notification.environment = envName notification.environment = envName
print("Emailing " + to + " about " + subject)
Response = sendMail(to,subject,createNotificationHTML(notification)) Response = sendMail(to,subject,createNotificationHTML(notification))
except Exception as e: except Exception as e:
print(e) print(e)
@ -53,7 +52,6 @@ def gatherAndNotify(envName, envUrl, Token, reportOnly, notifyOwner, deactivatio
tokenDisabledSoon = CheckForDisabling(envUrl, Token, reportOnly, notificationAgeInactivity, notifyOwner) tokenDisabledSoon = CheckForDisabling(envUrl, Token, reportOnly, notificationAgeInactivity, notifyOwner)
if notifyOwner == True: if notifyOwner == True:
print("Notifiying owners in " + envName)
for token in tokenDisabled: for token in tokenDisabled:
subject = "Deactivation of your Dynatrace Token" subject = "Deactivation of your Dynatrace Token"
notify(envName,token,subject,TokenDisabledNotification(),0) notify(envName,token,subject,TokenDisabledNotification(),0)

View File

@ -49,7 +49,7 @@
</p> </p>
<p class=MsoNormal> <p class=MsoNormal>
<span lang=EN-GB style='font-family:"Arial Nova Cond Light",sans-serif'> <span lang=EN-GB style='font-family:"Arial Nova Cond Light",sans-serif'>
Please request a new token as mentioned here {{ notify.helpUrl }}. <o:p></o:p> Please revoke your token as mentioned here {{ notify.helpUrl }} otherwise your token will be deactivated.<o:p></o:p>
</span> </span>
</p> </p>
<p class=MsoNormal> <p class=MsoNormal>

View File

@ -49,7 +49,7 @@
</p> </p>
<p class=MsoNormal> <p class=MsoNormal>
<span lang=EN-GB style='font-family:"Arial Nova Cond Light",sans-serif'> <span lang=EN-GB style='font-family:"Arial Nova Cond Light",sans-serif'>
Please request a new token as mentioned here {{ notify.helpUrl }}. <o:p></o:p> Please request your token as mentioned here {{ notify.helpUrl }}. <o:p></o:p>
</span> </span>
</p> </p>
<p class=MsoNormal> <p class=MsoNormal>

View File

@ -49,7 +49,7 @@
</p> </p>
<p class=MsoNormal> <p class=MsoNormal>
<span lang=EN-GB style='font-family:"Arial Nova Cond Light",sans-serif'> <span lang=EN-GB style='font-family:"Arial Nova Cond Light",sans-serif'>
Please request a new token as mentioned here {{ notify.helpUrl }}. <o:p></o:p> Please request your token as mentioned here {{ notify.helpUrl }}. <o:p></o:p>
</span> </span>
</p> </p>
<p class=MsoNormal> <p class=MsoNormal>

View File

@ -49,7 +49,7 @@
</p> </p>
<p class=MsoNormal> <p class=MsoNormal>
<span lang=EN-GB style='font-family:"Arial Nova Cond Light",sans-serif'> <span lang=EN-GB style='font-family:"Arial Nova Cond Light",sans-serif'>
Please request a new token as mentioned here {{ notify.helpUrl }}. <o:p></o:p> Please request your token as mentioned here {{ notify.helpUrl }}. <o:p></o:p>
</span> </span>
</p> </p>
<p class=MsoNormal> <p class=MsoNormal>