]> git.ipfire.org Git - thirdparty/collectd.git/commitdiff
virt: Add hugetlb_ metrics collectd-5.11
authorEmma Foley <efoley@redhat.com>
Mon, 29 Nov 2021 19:59:59 +0000 (14:59 -0500)
committerMatthias Runge <mrunge@matthias-runge.de>
Thu, 21 Apr 2022 18:08:25 +0000 (20:08 +0200)
ChangeLog: virt plugin: Add hugetlb_ metrics

Resolves #3932
Co-authored-by: Matthias Runge <mrunge@redhat.com>
(cherry picked from commit 8c781279e9c4789936323670b729f9a979c976db)

src/virt.c

index 01c7c7771d2e1a95384f24ae8c30f6c089cefa38..3c5fd8ec0b72006261ec20b67d6a07674978fc09 100644 (file)
@@ -937,10 +937,11 @@ 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",    "disk_caches"};
+  static const char *tags[] = {
+      "swap_in",       "swap_out",    "major_fault",    "minor_fault",
+      "unused",        "available",   "actual_balloon", "rss",
+      "usable",        "last_update", "disk_caches",    "hugetlb_pgalloc",
+      "hugetlb_pgfail"};
 
   if ((tag_index < 0) || (tag_index >= (int)STATIC_ARRAY_SIZE(tags))) {
     ERROR(PLUGIN_NAME " plugin: Array index out of bounds: tag_index = %d",