Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- group = 'Customer/A-I/H/HWT'
- threshold = 101
- code = 'RED'
- label = 'sapdata'
- devices = dmd.Groups.unrestrictedTraverse(group).getSubDevices()
- for d in devices:
- ths = []
- for fs in d.os.filesystems():
- if label.lower() in (fs.title).lower():
- th = "fs!{0}:ZenThresh:{1}:code:{2}".format(fs.mount, threshold, code)
- #ths = d.cFSThreshold
- try:
- if ths.index(th): continue
- except ValueError:
- ths.append(th)
- d.setZenProperty('cFSThreshold', ths)
- print d.id
- print ths
- commit()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement