Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- import subprocess
- fabric_name = "zzz4"
- alert_ext = "filesystem used"
- hostname = "zzz3274.prod"
- 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.."'
- 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