X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fnetapp.c;h=f446d597de1f27610b0be1c7e2cfde8957509a79;hb=96e0f2341bace029acefe0a88bab96ae326c0ff5;hp=13aea1e03cd57dca871f0f40aad5089b233331a8;hpb=4ed7c9e562f82eea9e5a8091d304399ecaaa37be;p=collectd.git diff --git a/src/netapp.c b/src/netapp.c index 13aea1e0..f446d597 100644 --- a/src/netapp.c +++ b/src/netapp.c @@ -1,6 +1,7 @@ /** * collectd - src/netapp.c * Copyright (C) 2009,2010 Sven Trenkel + * Copyright (C) 2012-2013 teamix GmbH * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -21,7 +22,8 @@ * DEALINGS IN THE SOFTWARE. * * Authors: - * Sven Trenkel + * Sven Trenkel + * Sebastian 'tokkee' Harl **/ #include "collectd.h" @@ -727,7 +729,7 @@ static int submit_cache_ratio (const char *host, /* {{{ */ /* Submits all the caches used by WAFL. Uses "submit_cache_ratio". */ static int submit_wafl_data (const char *hostname, const char *instance, /* {{{ */ - cfg_wafl_t *old_data, const cfg_wafl_t *new_data, int interval) + cfg_wafl_t *old_data, const cfg_wafl_t *new_data, cdtime_t interval) { /* Submit requested counters */ if (HAS_ALL_FLAGS (old_data->flags, CFG_WAFL_NAME_CACHE | HAVE_WAFL_NAME_CACHE) @@ -888,7 +890,7 @@ static cdtime_t cna_child_get_cdtime (na_elem_t *data) /* {{{ */ */ /* Data corresponding to */ static int cna_handle_wafl_data (const char *hostname, cfg_wafl_t *cfg_wafl, /* {{{ */ - na_elem_t *data, int interval) + na_elem_t *data, cdtime_t interval) { cfg_wafl_t perf_data; const char *plugin_inst; @@ -1041,7 +1043,8 @@ static int cna_query_wafl (host_config_t *host) /* {{{ */ return (-1); } - status = cna_handle_wafl_data (host->name, host->cfg_wafl, data, host->interval); + status = cna_handle_wafl_data (host->name, host->cfg_wafl, data, + host->cfg_wafl->interval.interval); if (status == 0) host->cfg_wafl->interval.last_read = now; @@ -1236,7 +1239,8 @@ static int cna_query_disk (host_config_t *host) /* {{{ */ return (-1); } - status = cna_handle_disk_data (host->name, host->cfg_disk, data, host->interval); + status = cna_handle_disk_data (host->name, host->cfg_disk, data, + host->cfg_disk->interval.interval); if (status == 0) host->cfg_disk->interval.last_read = now; @@ -1407,7 +1411,8 @@ static int cna_query_volume_perf (host_config_t *host) /* {{{ */ return (-1); } - status = cna_handle_volume_perf_data (host->name, host->cfg_volume_perf, data, host->interval); + status = cna_handle_volume_perf_data (host->name, host->cfg_volume_perf, data, + host->cfg_volume_perf->interval.interval); if (status == 0) host->cfg_volume_perf->interval.last_read = now; @@ -1762,7 +1767,8 @@ static int cna_handle_volume_usage_data (const host_config_t *host, /* {{{ */ } } /* for (elem_volume) */ - return (cna_submit_volume_usage_data (host->name, cfg_volume, host->interval)); + return (cna_submit_volume_usage_data (host->name, cfg_volume, + host->cfg_volume_usage->interval.interval)); } /* }}} int cna_handle_volume_usage_data */ static int cna_setup_volume_usage (cfg_volume_usage_t *cvu) /* {{{ */ @@ -1875,14 +1881,16 @@ static int cna_handle_quota_data (const host_config_t *host, /* {{{ */ value *= 1024; /* disk-used reports kilobytes */ submit_double (host->name, plugin_instance, /* type = */ "df_complex", /* type instance = */ NULL, - (double)value, /* timestamp = */ 0, host->interval); + (double)value, /* timestamp = */ 0, + host->cfg_quota->interval.interval); } value = na_child_get_uint64 (elem_quota, "files-used", UINT64_MAX); if (value != UINT64_MAX) { submit_double (host->name, plugin_instance, /* type = */ "files", /* type instance = */ NULL, - (double)value, /* timestamp = */ 0, host->interval); + (double)value, /* timestamp = */ 0, + host->cfg_quota->interval.interval); } } /* for (elem_quota) */ @@ -2040,7 +2048,8 @@ static int cna_handle_snapvault_iter (host_config_t *host, /* {{{ */ return (-1); } - cna_handle_snapvault_data (host->name, host->cfg_snapvault, elem, host->interval); + cna_handle_snapvault_data (host->name, host->cfg_snapvault, elem, + host->cfg_snapvault->interval.interval); na_elem_free (elem); } @@ -2257,7 +2266,8 @@ static int cna_query_system (host_config_t *host) /* {{{ */ return (-1); } - status = cna_handle_system_data (host->name, host->cfg_system, data, host->interval); + status = cna_handle_system_data (host->name, host->cfg_system, data, + host->cfg_system->interval.interval); if (status == 0) host->cfg_system->interval.last_read = now;