From: Sebastian Harl Date: Mon, 16 May 2011 12:43:34 +0000 (+0200) Subject: collectd-nagios: Select a single host in LISTVAL output when -H has been used. X-Git-Tag: collectd-5.1.0~65 X-Git-Url: https://git.octo.it/?a=commitdiff_plain;h=ea651b1fceaf83b85aca918a89ce45818ff42f93;p=collectd.git collectd-nagios: Select a single host in LISTVAL output when -H has been used. --- diff --git a/src/collectd-nagios.c b/src/collectd-nagios.c index d3923f1f..d6e9868c 100644 --- a/src/collectd-nagios.c +++ b/src/collectd-nagios.c @@ -288,6 +288,9 @@ static int do_listval (lcc_connection_t *connection) for (i = 0; i < ret_ident_num; ++i) { char id[1024]; + if ((hostname_g != NULL) && (strcasecmp (hostname_g, ret_ident[i].host))) + continue; + status = lcc_identifier_to_string (connection, id, sizeof (id), ret_ident + i); if (status != 0) {