Merge pull request #3149 from rpv-tomsk/libvirt-2
authorRuben Kerkhof <ruben@rubenkerkhof.com>
Mon, 13 May 2019 11:40:19 +0000 (13:40 +0200)
committerGitHub <noreply@github.com>
Mon, 13 May 2019 11:40:19 +0000 (13:40 +0200)
virt plugin: Do not fail if no connection on init()

src/virt.c

index cd82dca..18e951b 100644 (file)
@@ -918,10 +918,10 @@ static void memory_submit(virDomainPtr dom, gauge_t value) {
 
 static void memory_stats_submit(gauge_t value, virDomainPtr dom,
                                 int tag_index) {
-  static const char *tags[] = {"swap_in",        "swap_out", "major_fault",
-                               "minor_fault",    "unused",   "available",
-                               "actual_balloon", "rss",      "usable",
-                               "last_update"};
+  static const char *tags[] = {"swap_in",        "swap_out",   "major_fault",
+                               "minor_fault",    "unused",     "available",
+                               "actual_balloon", "rss",        "usable",
+                               "last_update",    "disk_caches"};
 
   if ((tag_index < 0) || (tag_index >= (int)STATIC_ARRAY_SIZE(tags))) {
     ERROR("virt plugin: Array index out of bounds: tag_index = %d", tag_index);