User Tools

Site Tools


scripting:python_scripts:checkpoint.py

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
scripting:python_scripts:checkpoint.py [2016/09/04 17:09] jotasandokuscripting:python_scripts:checkpoint.py [2023/11/02 14:38] (current) – external edit 127.0.0.1
Line 21: Line 21:
   #or this, this is the mail alert in case we have any problems pushing policy   #or this, this is the mail alert in case we have any problems pushing policy
   def mail_alert_push(ipaddr,message):   def mail_alert_push(ipaddr,message):
-          SERVER = "ash1mail.marketaxess.com"+          SERVER = "ash1mail.mycompany4.com"
           FROM = "CheckPointPushAlerts@crpashnetdev01.com"           FROM = "CheckPointPushAlerts@crpashnetdev01.com"
-          TO = 'network@marketaxess.com'+          TO = 'network@mycompany4.com'
           SUBJECT = "CHECKPOINT PUSH FAILED FOR PUSH " + ipaddr ,  message           SUBJECT = "CHECKPOINT PUSH FAILED FOR PUSH " + ipaddr ,  message
           TEXT = "ALERT! The push policy script was not able to run!!!!!!" + message           TEXT = "ALERT! The push policy script was not able to run!!!!!!" + message
Line 33: Line 33:
   #if we are lucky this is the only alert we will hit   #if we are lucky this is the only alert we will hit
   def mail_alert_final(ipaddr,output):   def mail_alert_final(ipaddr,output):
-          SERVER = "ash1mail.marketaxess.com"+          SERVER = "ash1mail.mycompany4.com"
           FROM = "CheckPointPushAlerts@crpashnetdev01.com"           FROM = "CheckPointPushAlerts@crpashnetdev01.com"
-          TO = 'network@marketaxess.com'+          TO = 'network@mycompany4.com'
           SUBJECT = "CHECKPOINT POLICY HAS BEEN PUSHED" #real good dun duh dun dun duh dun dun nun na nun nun nah           SUBJECT = "CHECKPOINT POLICY HAS BEEN PUSHED" #real good dun duh dun dun duh dun dun nun na nun nun nah
           TEXT = "Checkpoint Policy has been pushed via the push policy script"           TEXT = "Checkpoint Policy has been pushed via the push policy script"
Line 42: Line 42:
           server.sendmail(FROM, [TO], message)           server.sendmail(FROM, [TO], message)
           server.quit()           server.quit()
-   +    
-   +
-   +
-   +
-   +
-   +
-   +
-   +
-   +
-  +
   try:   try:
       conn = pexpect.spawn('ssh admin@10.30.165.21')       conn = pexpect.spawn('ssh admin@10.30.165.21')
scripting/python_scripts/checkpoint.py.1473008943.txt.gz · Last modified: (external edit)