X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=src%2Fvirt.c;h=e01efd33a462a55ce72bc8ac160362b0fd89c549;hp=2899177992b4ff41222e56b7883b62a5f55ec673;hb=cf86f1d597d0f3b6646241dc784ec6b89edd6bff;hpb=1c3f49f2b79d90444615d516420ae1bc506472c9 diff --git a/src/virt.c b/src/virt.c index 28991779..e01efd33 100644 --- a/src/virt.c +++ b/src/virt.c @@ -1990,13 +1990,6 @@ static int lv_read(user_data_t *ud) { /* Need to refresh domain or device lists? */ if ((last_refresh == (time_t)0) || ((interval > 0) && ((last_refresh + interval) <= t))) { - if (inst->id == 0 && persistent_notification) { - int status = persistent_domains_state_notification(); - if (status != 0) - DEBUG(PLUGIN_NAME " plugin: persistent_domains_state_notifications " - "returned with status %i", - status); - } if (refresh_lists(inst) != 0) { if (inst->id == 0) { if (!persistent_notification) @@ -2008,6 +2001,15 @@ static int lv_read(user_data_t *ud) { last_refresh = t; } + /* persistent domains state notifications are handled by instance 0 */ + if (inst->id == 0 && persistent_notification) { + int status = persistent_domains_state_notification(); + if (status != 0) + DEBUG(PLUGIN_NAME " plugin: persistent_domains_state_notifications " + "returned with status %i", + status); + } + #if COLLECT_DEBUG for (int i = 0; i < state->nr_domains; ++i) DEBUG(PLUGIN_NAME " plugin: domain %s",