summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0adbc78)
raw | patch | inline | side by side (parent: 0adbc78)
author | Mytnyk, VolodymyrX <volodymyrx.mytnyk@intel.com> | |
Wed, 1 Mar 2017 11:06:45 +0000 (11:06 +0000) | ||
committer | Mytnyk, VolodymyrX <volodymyrx.mytnyk@intel.com> | |
Fri, 10 Mar 2017 09:35:50 +0000 (09:35 +0000) |
Right now, the plugin dispatches values by default and doesn't send
any notification messages. The expected behaviour of the event plugin
is to send notification by default. So, changed default value of
SendNotification & DispatchValues options to opposite.
Change-Id: I908799da1b2e75d2089765769ce56af00246c440
Signed-off-by: Mytnyk, VolodymyrX <volodymyrx.mytnyk@intel.com>
any notification messages. The expected behaviour of the event plugin
is to send notification by default. So, changed default value of
SendNotification & DispatchValues options to opposite.
Change-Id: I908799da1b2e75d2089765769ce56af00246c440
Signed-off-by: Mytnyk, VolodymyrX <volodymyrx.mytnyk@intel.com>
src/collectd.conf.in | patch | blob | history | |
src/collectd.conf.pod | patch | blob | history | |
src/ovs_events.c | patch | blob | history |
diff --git a/src/collectd.conf.in b/src/collectd.conf.in
index 1e88bec37c289cc4283c1b78eed7368cd5e3306a..a23816d5254892ead7eb82a8f3b9b887d0f4032d 100644 (file)
--- a/src/collectd.conf.in
+++ b/src/collectd.conf.in
# Address "127.0.0.1"
# Socket "/var/run/openvswitch/db.sock"
# Interfaces "br0" "veth0"
-# SendNotification false
-# DispatchValues true
+# SendNotification true
+# DispatchValues false
#</Plugin>
#<Plugin ovs_stats>
diff --git a/src/collectd.conf.pod b/src/collectd.conf.pod
index da8d793371ae9aeb7efb0516a4932b3bb6c2dac2..419eb1cb07bde2e456f2027ddf92d555b56b2f21 100644 (file)
--- a/src/collectd.conf.pod
+++ b/src/collectd.conf.pod
Address "127.0.0.1"
Socket "/var/run/openvswitch/db.sock"
Interfaces "br0" "veth0"
- SendNotification false
- DispatchValues true
+ SendNotification true
+ DispatchValues false
</Plugin>
The plugin provides the following configuration options:
=item B<SendNotification> I<true|false>
If set to true, OVS link notifications (interface status and OVS DB connection
-terminate) are sent to collectd. Default value is false.
+terminate) are sent to collectd. Default value is true.
=item B<DispatchValues> I<true|false>
Dispatch the OVS DB interface link status value with configured plugin interval.
-Defaults to true. Please note, if B<SendNotification> and B<DispatchValues>
+Defaults to false. Please note, if B<SendNotification> and B<DispatchValues>
options are false, no OVS information will be provided by the plugin.
=back
diff --git a/src/ovs_events.c b/src/ovs_events.c
index 8c2cd12cb296f8ac3fc22ada9a6b2b8d266b0f9e..d372b87ab2b9e0ff023b3e07abd1d3f18feaae7a 100644 (file)
--- a/src/ovs_events.c
+++ b/src/ovs_events.c
*/
static ovs_events_ctx_t ovs_events_ctx = {
.mutex = PTHREAD_MUTEX_INITIALIZER,
- .config = {.ovs_db_node = "localhost", /* use default OVS DB node */
+ .config = {.send_notification = 1, /* send notification by default */
+ .ovs_db_node = "localhost", /* use default OVS DB node */
.ovs_db_serv = "6640"} /* use default OVS DB service */
};
* in allocated memory. Returns negative value in case of error.
*/
static int ovs_events_plugin_config(oconfig_item_t *ci) {
- _Bool dispatch_values = 1;
+ _Bool dispatch_values = 0;
for (int i = 0; i < ci->children_num; i++) {
oconfig_item_t *child = ci->children + i;
if (strcasecmp("SendNotification", child->key) == 0) {