Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue with XFS plugin #1223

Open
mozzee opened this issue Jun 19, 2021 · 4 comments
Open

issue with XFS plugin #1223

mozzee opened this issue Jun 19, 2021 · 4 comments

Comments

@mozzee
Copy link

mozzee commented Jun 19, 2021

On CentOS 8 & munin-node-2.0.66-1, XFS plugin is throwing following error
]# munin-run xfs
]# Can't use an undefined value as an ARRAY reference at ./xfs line 89, line 21.

@sumpfralle
Copy link
Collaborator

The plugin code around these lines look like this:

  my @array = split /\s+/, $_;
  chomp @array;
  my $string_name = shift @array;
  my %hash;
  my $keys = $runtime_stats{$string_name};

  @hash{@$keys} = @array;

The last line seems to cause the problem. But I fail to see any potential source of an issue :(

Maybe you could share the content of /proc/fs/xfs/stat with us?

@daftaupe
Copy link
Contributor

Hi,

@mozzee how did you install that xfs plugin from on Centos8 ? I don't see a -contrib package or something similar.

@sumpfralle I'm trying to reproduce the issue on a Centos8 Stream instance.

Here is the content of /proc/fs/xfs/stat

[ptoret@centos8 plugins]$ cat /proc/fs/xfs/stat
extent_alloc 9859 188950 850 96793
abt 0 0 0 0
blk_map 199168 198159 10129 19413 1359 436438 0
bmbt 0 0 0 0
dir 40788 19892 9737 47424
trans 1 168682 0
ig 28780 933 0 27847 0 206 32615
log 1435 43061 25 1055 1142
push_ail 177799 0 12696 2896 0 412 0 23963 0 22
xstrat 9388 0
rw 81182 627939
attr 34915 21669 275 533
icluster 0 2079 27066
vnodes 27641 0 0 0 640 640 640 0
buf 228054 2959 225101 535 416 2953 0 7659 2357
abtb2 10956 39430 411 409 0 0 0 0 0 0 0 0 0 0 39746
abtc2 30492 109818 10571 10569 0 0 0 0 0 0 0 0 0 0 355981
bmbt2 3 17 1 1 0 0 0 0 0 0 0 0 0 0 8
ibt2 11602 92560 158 0 1 0 0 0 0 0 1 0 2 0 7186
fibt2 18603 19985 258 257 0 0 0 0 0 0 0 0 0 0 579
rmapbt 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
refcntbt 8 0 0 0 0 0 0 0 0 0 0 0 0 0 0
qm 0 0 0 0 0 0 0 0 0
xpc 517652480 430963251 2469941223
defer_relog 0
debug 0

@Offerkohen
Copy link

Offerkohen commented Mar 16, 2022

@daftaupe it was an upgrade from CentOS 7 to 8 Stream and I was able to work around the plugin by adding missing entries/lines from /proc/fs/xfs/stat. During the troubleshooting, I found that CentOS 8 had more data rows in the stat file than its previous version hence the plugin failed to process it with the above issue. After adding missing entries, it's working perfectly fine.

@daftaupe
Copy link
Contributor

@Offerkohen if you have the fixed plugin, maybe you could open a PR so that others could benefit from your fix ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants