From: Sven Trenkel Date: Tue, 13 Oct 2009 14:48:01 +0000 (+0200) Subject: Fixed a bug with newer NetApp Versions. X-Git-Tag: collectd-4.9.0~50 X-Git-Url: https://git.octo.it/?a=commitdiff_plain;h=93844dae4cb5932ef0df66c0c7ac3d4f25a0efe8;p=collectd.git Fixed a bug with newer NetApp Versions. NetApp OnTAP API 7.3 and newer actually read this field and expect the value "counter". --- diff --git a/src/netapp.c b/src/netapp.c index f01a7b40..ad19c6da 100644 --- a/src/netapp.c +++ b/src/netapp.c @@ -925,14 +925,14 @@ static int cna_setup_wafl (cfg_wafl_t *cw) /* {{{ */ ERROR ("netapp plugin: na_elem_new failed."); return (-1); } - na_child_add_string(e, "foo", "name_cache_hit"); - na_child_add_string(e, "foo", "name_cache_miss"); - na_child_add_string(e, "foo", "find_dir_hit"); - na_child_add_string(e, "foo", "find_dir_miss"); - na_child_add_string(e, "foo", "buf_hash_hit"); - na_child_add_string(e, "foo", "buf_hash_miss"); - na_child_add_string(e, "foo", "inode_cache_hit"); - na_child_add_string(e, "foo", "inode_cache_miss"); + na_child_add_string(e, "counter", "name_cache_hit"); + na_child_add_string(e, "counter", "name_cache_miss"); + na_child_add_string(e, "counter", "find_dir_hit"); + na_child_add_string(e, "counter", "find_dir_miss"); + na_child_add_string(e, "counter", "buf_hash_hit"); + na_child_add_string(e, "counter", "buf_hash_miss"); + na_child_add_string(e, "counter", "inode_cache_hit"); + na_child_add_string(e, "counter", "inode_cache_miss"); na_child_add(cw->query, e); @@ -1125,8 +1125,8 @@ static int cna_setup_disk (cfg_disk_t *cd) /* {{{ */ ERROR ("netapp plugin: na_elem_new failed."); return (-1); } - na_child_add_string(e, "foo", "disk_busy"); - na_child_add_string(e, "foo", "base_for_disk_busy"); + na_child_add_string(e, "counter", "disk_busy"); + na_child_add_string(e, "counter", "base_for_disk_busy"); na_child_add(cd->query, e); return (0); @@ -1291,13 +1291,12 @@ static int cna_setup_volume_perf (cfg_volume_perf_t *cd) /* {{{ */ ERROR ("netapp plugin: na_elem_new failed."); return (-1); } - /* "foo" means: This string has to be here but the content doesn't matter. */ - na_child_add_string(e, "foo", "read_ops"); - na_child_add_string(e, "foo", "write_ops"); - na_child_add_string(e, "foo", "read_data"); - na_child_add_string(e, "foo", "write_data"); - na_child_add_string(e, "foo", "read_latency"); - na_child_add_string(e, "foo", "write_latency"); + na_child_add_string(e, "counter", "read_ops"); + na_child_add_string(e, "counter", "write_ops"); + na_child_add_string(e, "counter", "read_data"); + na_child_add_string(e, "counter", "write_data"); + na_child_add_string(e, "counter", "read_latency"); + na_child_add_string(e, "counter", "write_latency"); na_child_add(cd->query, e); return (0);