Hi!
I have the following problem in CheckMk 1.6.0p19. By putting the nfsiostat script in the agent path on the CentOS 7.X machine there seems to be some problems:
Hi,
did you check the parameters for this service? Whats about the parameters for this service in service discovery? Looks like, that default parameter matching.
I’ve raised this before. The plugin does not take into account that the first result returned by nfsiostat always returns average stats for the FS since it has been mounted. To work properly, i.e. monitor the current stats of the mount, the agent needs to ignore the first result and instead return the next result.
Per nfsiostat man page:
<interval>
specifies the amount of time in seconds between each report. The first report contains statistics for the time since each file
system was mounted. Each subsequent report contains statistics collected during the interval since the previous report.
A simple fix might be: nfsiostat 5 2 | sed 1,10d | paste -sd " " - | tr -s ' '
This returns 2 results from iostat with a 5-second gap to generate a small average. The first 10 lines (= the first set of stats) are then removed by sed.
Update:
It’s not a simple fix. The above doesn’t take into account multiple NFS mounts. It also doesn’t take into account the fact that nfsiostat has changed output format over the years
You probably want to mark program code as “preformatted text” to prevent the forum software from mangling it (it swallows the inner ‘<…>’ tags for example).
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.