From ea651b1fceaf83b85aca918a89ce45818ff42f93 Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Mon, 16 May 2011 14:43:34 +0200 Subject: [PATCH] collectd-nagios: Select a single host in LISTVAL output when -H has been used. --- src/collectd-nagios.c | 3 +++ 1 file changed, 3 insertions(+) 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) { -- 2.30.2