Merge "Add plugin to check bond member status up/down"
diff --git a/.kitchen.travis.yml b/.kitchen.travis.yml
new file mode 100644
index 0000000..5619113
--- /dev/null
+++ b/.kitchen.travis.yml
@@ -0,0 +1,6 @@
+suites:
+
+ - name: <%= ENV['SUITE'] %>
+ provisioner:
+ pillars-from-files:
+ collectd.sls: tests/pillar/<%= ENV['SUITE'] %>.sls
diff --git a/.travis.yml b/.travis.yml
index 4f34af2..f87d058 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -17,8 +17,8 @@
- bundle install
env:
- - PLATFORM=trevorj/salty-whales:trusty
- - PLATFORM=trevorj/salty-whales:xenial
+ - PLATFORM=trevorj/salty-whales:trusty SUITE=client
+ - PLATFORM=trevorj/salty-whales:xenial SUITE=client
before_script:
@@ -26,7 +26,7 @@
- make test | tail
script:
- - test ! -e .kitchen.yml || bundle exec kitchen test -t tests/integration
+ - KITCHEN_LOCAL_YAML=.kitchen.travis.yml bundle exec kitchen test -t tests/integration
notifications:
webhooks:
diff --git a/collectd/files/plugin/collectd_glusterfs.py b/collectd/files/plugin/collectd_glusterfs.py
index 75daf4b..6d413df 100644
--- a/collectd/files/plugin/collectd_glusterfs.py
+++ b/collectd/files/plugin/collectd_glusterfs.py
@@ -23,6 +23,9 @@
NAME = 'glusterfs'
GLUSTER_BINARY = '/usr/sbin/gluster'
+# Increase the default collection interval because GlusterFS doesn't cope well
+# with concurrent client requests
+INTERVAL = 120
peer_re = re.compile(r'^Hostname: (?P<peer>.+)$', re.MULTILINE)
state_re = re.compile(r'^State: (?P<state>.+)$', re.MULTILINE)
@@ -59,6 +62,7 @@
def __init__(self, *args, **kwargs):
super(GlusterfsPlugin, self).__init__(*args, **kwargs)
self.plugin = NAME
+ self.interval = INTERVAL
def itermetrics(self):
# Collect peers' metrics
@@ -237,4 +241,4 @@
else:
collectd.register_init(init_callback)
collectd.register_config(config_callback)
- collectd.register_read(read_callback)
+ collectd.register_read(read_callback, INTERVAL)