Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1 # This configuration file is used by salt-monitor and is "overlaid" on the
- 2 # configuration in /etc/salt/minion.
- 3
- 4 ###### Logging settings #####
- 5 ###########################################
- 6 # The location of the monitor log file
- 7 #log_file: /var/log/salt/monitor
- 8 # The level of messages to send to the log file.
- 9 # One of 'info', 'quiet', 'critical', 'error', 'debug', 'warning'.
- 10 # Default: 'warning'
- 11 #log_level: warning
- 12 #
- 13 # Logger levels can be used to tweak specific loggers logging levels.
- 14 # Imagine you want to have the salt library at the 'warning' level, but, you
- 15 # still wish to have 'salt.modules' at the 'debug' level:
- 16 # log_granular_levels: {
- 17 # 'salt': 'warning',
- 18 # 'salt.modules': 'debug'
- 19 # }
- 20 #
- 21 #log_granular_levels: {}
- 22
- 23
- 24 ###### Monitor configuration #####
- 25 ###########################################
- 26 # When the 'monitor' value is set salt will run the commands at the specified
- 27 # interval or at the default interval.
- 28
- 29 #monitor.default_interval:
- 30 # hour: 0
- 31 # minute: 0
- 32 # second: 10
- 33
- 34 # Where monitor output should be collected. If you don't set this value
- 35 # monitor data is silently discarded.
- 36 monitor.collector: mongo
- 37
- 38 # You can override the mongo/redis/etc returner parameters here.
- 39 mongo.host:
- 40 - mongorep-monitor-01_prod.la.bo
- 41 - mongorep-monitor-02_prod.la.bo
- 42 - mongorep-monitor-03_prod.la.bo
- 43 #mongo.port: 27017
- 44 #mongo.user: myuser
- 45 #mongo.password: mypassword
- 46
- 47 # The monitor command(s) to run.
- 48 monitor:
- 49 # - id: low-disk
- 50 # run: status.diskusage / /var
- 51 # every:
- 52 # minute: 0
- 53 # second: 10
- 54 # foreach mntpt, usage:
- 55 # - if ${usage.available} * 100 / ${usage.total} < 10:
- 56 # - 'alert.warning disk.full "free disk space running low on $mntpt: ${usage.available/2.0**30:0.1f} GB free"'
- 57 #
- 58 - id: high-load
- 59 run: status.loadavg
- 60 every:
- 61 minute: 0
- 62 second: 30
- 63 foreach interval, loadavg:
- 64 - if interval == '5-min' and loadavg > 20:
- 65 - alert.warning loadavg '5 minute load average is $loadavg'
- 66 - elif interval == '5-min' and loadavg > 10:
- 67 - alert.notice loadavg '5 minute load average is $loadavg'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement