mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fix diskusage beacon
Stop trying to load the entire mount dict as the mount point.
This commit is contained in:
parent
6387d1636e
commit
2e5e7ed03c
1 changed files with 3 additions and 2 deletions
|
@ -62,7 +62,8 @@ def beacon(config):
|
|||
- /mnt/nfs: 50%
|
||||
'''
|
||||
ret = []
|
||||
for mount in config:
|
||||
for mounts in config:
|
||||
mount = mounts.keys()[0]
|
||||
|
||||
try:
|
||||
_current_usage = psutil.disk_usage(mount)
|
||||
|
@ -72,7 +73,7 @@ def beacon(config):
|
|||
continue
|
||||
|
||||
current_usage = _current_usage.percent
|
||||
monitor_usage = config[mount]
|
||||
monitor_usage = mounts[mount]
|
||||
if '%' in monitor_usage:
|
||||
monitor_usage = re.sub('%', '', monitor_usage)
|
||||
monitor_usage = float(monitor_usage)
|
||||
|
|
Loading…
Add table
Reference in a new issue