projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge remote-tracking branch 'upstream/master'
[collectd.git]
/
src
/
netapp.c
diff --git
a/src/netapp.c
b/src/netapp.c
index
1b510d2
..
ae49b5e
100644
(file)
--- a/
src/netapp.c
+++ b/
src/netapp.c
@@
-773,8
+773,8
@@
static int submit_volume_perf_data(const char *hostname, /* {{{ */
if ((hostname == NULL) || (old_data == NULL) || (new_data == NULL))
return -1;
if ((hostname == NULL) || (old_data == NULL) || (new_data == NULL))
return -1;
- snprintf(plugin_instance, sizeof(plugin_instance), "volume-%s",
- old_data->name);
+ s
s
nprintf(plugin_instance, sizeof(plugin_instance), "volume-%s",
+
old_data->name);
/* Check for and submit disk-octet values */
if (HAS_ALL_FLAGS(old_data->flags, CFG_VOLUME_PERF_IO) &&
/* Check for and submit disk-octet values */
if (HAS_ALL_FLAGS(old_data->flags, CFG_VOLUME_PERF_IO) &&
@@
-1404,7
+1404,7
@@
static int cna_submit_volume_usage_data(const char *hostname, /* {{{ */
uint64_t snap_reserve_free = v->snap_reserved;
uint64_t snap_norm_used = v->snap_used;
uint64_t snap_reserve_free = v->snap_reserved;
uint64_t snap_norm_used = v->snap_used;
- snprintf(plugin_instance, sizeof(plugin_instance), "volume-%s", v->name);
+ s
s
nprintf(plugin_instance, sizeof(plugin_instance), "volume-%s", v->name);
if (HAS_ALL_FLAGS(v->flags,
HAVE_VOLUME_USAGE_SNAP_USED |
if (HAS_ALL_FLAGS(v->flags,
HAVE_VOLUME_USAGE_SNAP_USED |
@@
-1498,12
+1498,13
@@
static int cna_change_volume_status(const char *hostname, /* {{{ */
if ((v->flags & IS_VOLUME_USAGE_OFFLINE) != 0) {
n.severity = NOTIF_OKAY;
if ((v->flags & IS_VOLUME_USAGE_OFFLINE) != 0) {
n.severity = NOTIF_OKAY;
- snprintf(n.message, sizeof(n.message), "Volume %s is now online.", v->name);
+ ssnprintf(n.message, sizeof(n.message), "Volume %s is now online.",
+ v->name);
v->flags &= ~IS_VOLUME_USAGE_OFFLINE;
} else {
n.severity = NOTIF_WARNING;
v->flags &= ~IS_VOLUME_USAGE_OFFLINE;
} else {
n.severity = NOTIF_WARNING;
- snprintf(n.message, sizeof(n.message), "Volume %s is now offline.",
- v->name);
+ s
s
nprintf(n.message, sizeof(n.message), "Volume %s is now offline.",
+
v->name);
v->flags |= IS_VOLUME_USAGE_OFFLINE;
}
v->flags |= IS_VOLUME_USAGE_OFFLINE;
}
@@
-1832,8
+1833,8
@@
static int cna_handle_quota_data(const host_config_t *host, /* {{{ */
if (volume_name == NULL)
continue;
if (volume_name == NULL)
continue;
- snprintf(plugin_instance, sizeof(plugin_instance), "quota-%s-%s",
- volume_name, tree_name);
+ s
s
nprintf(plugin_instance, sizeof(plugin_instance), "quota-%s-%s",
+
volume_name, tree_name);
value = na_child_get_uint64(elem_quota, "disk-used", UINT64_MAX);
if (value != UINT64_MAX) {
value = na_child_get_uint64(elem_quota, "disk-used", UINT64_MAX);
if (value != UINT64_MAX) {
@@
-1945,8
+1946,8
@@
static int cna_handle_snapvault_data(const char *hostname, /* {{{ */
continue;
/* possible TODO: make plugin instance configurable */
continue;
/* possible TODO: make plugin instance configurable */
- snprintf(plugin_instance, sizeof(plugin_instance), "snapvault-%s",
- dest_path);
+ s
s
nprintf(plugin_instance, sizeof(plugin_instance), "snapvault-%s",
+
dest_path);
submit_double(hostname, plugin_instance, /* type = */ "delay", NULL,
(double)value, /* timestamp = */ 0, interval);
submit_double(hostname, plugin_instance, /* type = */ "delay", NULL,
(double)value, /* timestamp = */ 0, interval);
@@
-2787,10
+2788,10
@@
static int cna_register_host(host_config_t *host) /* {{{ */
char cb_name[256];
if (host->vfiler)
char cb_name[256];
if (host->vfiler)
- snprintf(cb_name, sizeof(cb_name), "netapp-%s-%s", host->name,
- host->vfiler);
+ s
s
nprintf(cb_name, sizeof(cb_name), "netapp-%s-%s", host->name,
+
host->vfiler);
else
else
- snprintf(cb_name, sizeof(cb_name), "netapp-%s", host->name);
+ s
s
nprintf(cb_name, sizeof(cb_name), "netapp-%s", host->name);
plugin_register_complex_read(
/* group = */ NULL, cb_name,
plugin_register_complex_read(
/* group = */ NULL, cb_name,