U
U
unwrecker2017-06-09 17:09:48
linux
unwrecker, 2017-06-09 17:09:48

Why doesn't zabbix see all mounted partitions?

There is Zabbix 3 with a standard template "Mounted filesystem discovery". It detects the root partition and /boot and absolutely does not want to see non-standard mount points (in my case /stor and /db), while zabbix-agent sees them:

spoiler
$ zabbix_agent -t vfs.fs.discovery 
vfs.fs.discovery                              [s|{
  "data":[
    {
      "{#FSNAME}":"\/",
      "{#FSTYPE}":"rootfs"},
    {
      "{#FSNAME}":"\/sys",
      "{#FSTYPE}":"sysfs"},
    {
      "{#FSNAME}":"\/proc",
      "{#FSTYPE}":"proc"},
    {
      "{#FSNAME}":"\/dev",
      "{#FSTYPE}":"devtmpfs"},
    {
      "{#FSNAME}":"\/dev\/pts",
      "{#FSTYPE}":"devpts"},
    {
      "{#FSNAME}":"\/run",
      "{#FSTYPE}":"tmpfs"},
    {
      "{#FSNAME}":"\/",
      "{#FSTYPE}":"ext4"},
    {
      "{#FSNAME}":"\/sys\/fs\/cgroup",
      "{#FSTYPE}":"tmpfs"},
    {
      "{#FSNAME}":"\/sys\/fs\/fuse\/connections",
      "{#FSTYPE}":"fusectl"},
    {
      "{#FSNAME}":"\/sys\/kernel\/debug",
      "{#FSTYPE}":"debugfs"},
    {
      "{#FSNAME}":"\/sys\/kernel\/security",
      "{#FSTYPE}":"securityfs"},
    {
      "{#FSNAME}":"\/run\/lock",
      "{#FSTYPE}":"tmpfs"},
    {
      "{#FSNAME}":"\/run\/shm",
      "{#FSTYPE}":"tmpfs"},
    {
      "{#FSNAME}":"\/run\/user",
      "{#FSTYPE}":"tmpfs"},
    {
      "{#FSNAME}":"\/sys\/fs\/pstore",
      "{#FSTYPE}":"pstore"},
    {
      "{#FSNAME}":"\/sys\/fs\/cgroup\/cpuset",
      "{#FSTYPE}":"cgroup"},
    {
      "{#FSNAME}":"\/sys\/fs\/cgroup\/cpu",
      "{#FSTYPE}":"cgroup"},
    {
      "{#FSNAME}":"\/sys\/fs\/cgroup\/cpuacct",
      "{#FSTYPE}":"cgroup"},
    {
      "{#FSNAME}":"\/sys\/fs\/cgroup\/memory",
      "{#FSTYPE}":"cgroup"},
    {
      "{#FSNAME}":"\/sys\/fs\/cgroup\/devices",
      "{#FSTYPE}":"cgroup"},
    {
      "{#FSNAME}":"\/sys\/fs\/cgroup\/freezer",
      "{#FSTYPE}":"cgroup"},
    {
      "{#FSNAME}":"\/sys\/fs\/cgroup\/blkio",
      "{#FSTYPE}":"cgroup"},
    {
      "{#FSNAME}":"\/sys\/fs\/cgroup\/perf_event",
      "{#FSTYPE}":"cgroup"},
    {
      "{#FSNAME}":"\/sys\/fs\/cgroup\/hugetlb",
      "{#FSTYPE}":"cgroup"},
    {
      "{#FSNAME}":"\/boot",
      "{#FSTYPE}":"ext4"},
    {
      "{#FSNAME}":"\/stor",
      "{#FSTYPE}":"ext4"},
    {
      "{#FSNAME}":"\/db",
      "{#FSTYPE}":"ext4"},
    {
      "{#FSNAME}":"\/run\/rpc_pipefs",
      "{#FSTYPE}":"rpc_pipefs"},
    {
      "{#FSNAME}":"\/sys\/fs\/cgroup\/systemd",
      "{#FSTYPE}":"cgroup"},
    {
      "{#FSNAME}":"\/proc\/fs\/nfsd",
      "{#FSTYPE}":"nfsd"},
    {
      "{#FSNAME}":"\/mnt\/backup-host",
      "{#FSTYPE}":"nfs4"}]}]

All the tips I found came down to editing the "@File systems for discovery" regexp or even deleting the filter in discovery conditions. I tried it: a bunch of system sections appeared among the elements (such as /sys/kernel/debug), but I still don’t have the ones I need ... There is a feeling that there is also an implicit check for compliance with something.
Yes, the agent is active, if that matters.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
U
unwrecker, 2017-11-02
@unwrecker

The error was that zabbix was looking for mount points on its own server.
The thing is that child elements in templates are not automatically replaced, and inside the detection rules, the agent type remains passive.
To fix it, you need to go to: "Template OS Linux Active" -> "Discovery rules" -> "Mounted filesystem discovery" -> "Prototypes of data elements"
And for each element, replace the type with active. Repeat the same for discovering network interfaces.

N
nikolayvaganov, 2017-06-15
@nikolayvaganov

fs what?

A
Adam_West, 2017-06-29
@Adam_West

I can assume that there is a filter / regular filter in the discovery settings.

M
marchelly, 2017-08-08
@marchelly

answer here:
https://www.zabbix.com/documentation/3.4/manual/re...
you need to edit the regular expression:
^(btrfs|ext2|ext3|ext4|jfs|reiser|xfs|ffs|ufs|jfs| jfs2|vxfs|hfs|refs|ntfs|fat32|zfs|cifs)$

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question