Advertisement
Guest User

code

a guest
Mar 17th, 2014
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. #!/usr/bin/python
  2. import subprocess
  3.  
  4. fabric_name = "zzz4"
  5. alert_ext = "filesystem used"
  6. hostname = "zzz3274.prod"
  7. cmd_suppression = 'alerts -f '+fabric_name+' suppressions add -A "'+alert_ext+'" add -N '+hostname+' -d 10m -c "Informed team in ..suppress for '+hostname+' for 1 hour.."'
  8. suppression_output = subprocess.Popen(cmd_suppression, shell=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE).communicate('y\ntest123')[0]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement