X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fipvs.c;h=fa894897bae658b532e9af4f692d3bd802e6f4b6;hb=633c3966f770e4d46651a2fe219a18d8a9907a9f;hp=87eee108a79410853b6f02e107697b7a358f465a;hpb=37905c5a2370c8e6edae5011978773eeaa589d09;p=collectd.git diff --git a/src/ipvs.c b/src/ipvs.c index 87eee108..fa894897 100644 --- a/src/ipvs.c +++ b/src/ipvs.c @@ -45,7 +45,9 @@ #endif /* HAVE_NETINET_IN_H */ /* this can probably only be found in the kernel sources */ -#if HAVE_NET_IP_VS_H +#if HAVE_LINUX_IP_VS_H +# include +#elif HAVE_NET_IP_VS_H # include #elif HAVE_IP_VS_H # include @@ -225,18 +227,16 @@ static int get_ti (struct ip_vs_dest_entry *de, char *ti, size_t size) return 0; } /* get_ti */ -static void cipvs_submit_connections (char *pi, char *ti, counter_t value) +static void cipvs_submit_connections (char *pi, char *ti, derive_t value) { value_t values[1]; value_list_t vl = VALUE_LIST_INIT; - values[0].counter = value; + values[0].derive = value; vl.values = values; vl.values_len = 1; - vl.interval = interval_g; - sstrncpy (vl.host, hostname_g, sizeof (vl.host)); sstrncpy (vl.plugin, "ipvs", sizeof (vl.plugin)); sstrncpy (vl.plugin_instance, pi, sizeof (vl.plugin_instance)); @@ -249,19 +249,17 @@ static void cipvs_submit_connections (char *pi, char *ti, counter_t value) } /* cipvs_submit_connections */ static void cipvs_submit_if (char *pi, char *t, char *ti, - counter_t rx, counter_t tx) + derive_t rx, derive_t tx) { value_t values[2]; value_list_t vl = VALUE_LIST_INIT; - values[0].counter = rx; - values[1].counter = tx; + values[0].derive = rx; + values[1].derive = tx; vl.values = values; vl.values_len = 2; - vl.interval = interval_g; - sstrncpy (vl.host, hostname_g, sizeof (vl.host)); sstrncpy (vl.plugin, "ipvs", sizeof (vl.plugin)); sstrncpy (vl.plugin_instance, pi, sizeof (vl.plugin_instance));