]> git.ipfire.org Git - thirdparty/collectd.git/commitdiff
virt: Add hugetlb_ metrics (#3981)
authorBrendan Shephard <59072170+bshephar@users.noreply.github.com>
Fri, 11 Mar 2022 15:33:12 +0000 (01:33 +1000)
committerGitHub <noreply@github.com>
Fri, 11 Mar 2022 15:33:12 +0000 (16:33 +0100)
ChangeLog: virt plugin: Add hugetlb_ metrics

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

Co-authored-by: Emma Foley <efoley@redhat.com>
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",