The value returned by get_kstat_value is of type long long whereas values is a union. Fixed the code so that the value gets assigned to one of the union members, in this case counter.
* Authors:
* Jason Pepas <cell at ices.utexas.edu>
* Florian octo Forster <octo at verplant.org>
+ * Cosmin Ioiart <cioiart at gmail.com>
**/
#include "collectd.h"
kstat_read(kc, ksp, NULL);
for (i = 0; i < proc_names_num; i++)
- values[i] = (derive_t) get_kstat_value (ksp, proc_names[i]);
+ values[i].counter = (derive_t) get_kstat_value (ksp, proc_names[i]);
nfs_procedures_submit (plugin_instance, proc_names, values,
proc_names_num);