Skip to content

Inconsistent disk plugin behavior using autofs with different types of maps #3430

@oplehto

Description

@oplehto

Directions

Bug report

We moved from using NIS mapping autofs NFS mounts to using ones defined in regular text files. All of the sudden all of our servers started mounting all the filesystems defined in the autofs files. We tracked this down to Telegraf which started triggering all of our autofs mounts after the aforementioned change.

I found an (undocumented) ignore_fs parameter which can be used to fix this:

 [[inputs.disk]]
   interval = "300s"
   ignore_fs = ["autofs"]

What made this challenging to debug was that we had been running with the old Telegraf config for ages with Telegraf happily ignoring the NIS mapped autofs filesystems. Thus it was not the most obvious suspect.

This solves the immediate issue, but the underlying bug (inconsistent autofs behavior based on map) should be addressed and documentation improved.

System info:

Telegraf v1.4.1 9cf19df
RHEL 7.3

Steps to reproduce:

  1. Set up an autofs configuration for NFS mounts using NIS maps and regular text file maps
  2. Run telegraf with the inputs.disk plugin and see if the autofs mounts are triggered in either or both cases

Expected behavior:

Telegraf should either consistently mount or not mount the autofs mounts regardless of how the mounts are mapped (NIS, LDAP, file etc.)

It should clearly stated that autofs mounts may be triggered by the disk plugin unless they are ignored with the ignore_fs option (which itself should be documented!).

I feel that unmounted autofs filesystems should not be touched by the collector at all unless explicitly defined to do so. However I understand that changing this might cause issues for other users.

Actual behavior:

Telegraf disk plugin ignores autofs mounts when they are mapped via NIS but then triggers them when they are mapped in a regular file.

Additional info:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions