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

mackerel-plugin-linux dose not outputs about disk stats. #655

Closed
azusa opened this issue Jul 22, 2020 · 2 comments
Closed

mackerel-plugin-linux dose not outputs about disk stats. #655

azusa opened this issue Jul 22, 2020 · 2 comments

Comments

@azusa
Copy link
Contributor

azusa commented Jul 22, 2020

mackerel-plugin-linux dose not outputs about disk stats.

  • custom.linux.disk.elapsed.*
  • custom.linux.disk.rwtime.*

command output is here:

$ mackerel-plugin-linux                                                     [~]
2020/07/22 22:22:11 OutputValues:  Too long duration
linux.users.users       2.000000        1595424131
2020/07/22 22:22:11 OutputValues:  Too long duration
2020/07/22 22:22:11 OutputValues:  Too long duration
linux.ss.ESTAB  135.000000      1595424131
linux.ss.TIME-WAIT      3.000000        1595424131
linux.ss.UNCONN 42.000000       1595424131
linux.ss.LISTEN 27.000000       1595424131
2020/07/22 22:22:11 OutputValues:  Too long duration
2020/07/22 22:22:11 OutputValues:  Too long duration

mackerel-plungin-linux expects /sys/block/*/stat has just 11 fields.1
Otherwise some OSs /sys/block/*/stat has more than 11 fields, then function in mackerel-plungin-linux returns err.

[]:$ cat /etc/os-release                                                       [~]
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
[]:$ uname -a                                                                  [~]
Linux pidev 4.19.118-v7l+ #1311 SMP Mon Apr 27 14:26:42 BST 2020 armv7l GNU/Linux
[]:$ readlink -f  /sys/block/mmcblk0/stat                                      [~]
/sys/devices/platform/emmc2bus/fe340000.emmc2/mmc_host/mmc0/mmc0:1234/block/mmcblk0/stat
[]:$ cat $(readlink -f  /sys/block/mmcblk0/stat)                               [~]
    6805     9720   543404    89110    18930    15212   508826  4115817        0   919500  1424010        0        0        0 
$ cat /etc/os-release
NAME="CentOS Linux"
VERSION="8 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="8"
PLATFORM_ID="platform:el8"
PRETTY_NAME="CentOS Linux 8 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:8"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-8"
CENTOS_MANTISBT_PROJECT_VERSION="8"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="8"

$ uname -a
Linux localhost.localdomain 4.18.0-193.6.3.el8_2.x86_64 #1 SMP Wed Jun 10 11:09:32 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
$ readlink -f /sys/block/sda/stat
/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A03:00/device:07/VMBUS:01/00000000-0000-8899-0000-000000000000/host0/target0:0:0/0:0:0:0/block/sda/stat
$ cat $(readlink -f /sys/block/sda/stat)
    5260        2   431891     3300      545      129   114704      765        0     3625     1822        0
   0        0        0

Footnotes

  1. https://github.com/mackerelio/mackerel-agent-plugins/blob/3bb5f6abae5b1acc776d8cc0690af457b14f7d3e/mackerel-plugin-linux/lib/linux.go#L334

@astj
Copy link
Contributor

astj commented Jul 27, 2020

Thank you for report!

According to iostat documentation in Linux git repo, the format is changed at kernel 4.18.
So I suspect (but not yet confirmed) that mackerel-plugin-linux does not output disk-stat-related metrics with those newer kernels.
I'll prepare fix for this.

@astj
Copy link
Contributor

astj commented Jul 30, 2020

@azusa Hi. This problem should be fixed by #658 and released at 0.62.0 today.
So I'd like to close this issue now. (Feel free to reopen if the problem still exists)

Thank you again for reporting!

@astj astj closed this as completed Jul 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants