Ad Widget

Collapse

SMB share monitoring

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ArnoAnderson
    Junior Member
    • Aug 2020
    • 2

    #1

    SMB share monitoring

    Hello,

    I have a Dell/EMC Unity storage that share it disks via smb protocol, and this disks are mapped on a Windows Server: \\storage\share1.

    I tried to monitoring the disc using vfs.fs.size[\\servernas\share1,pfree] and vfs.fs.size[X:,pfree] but unsuccesfuly. So I tried to get the information on storage directly via SNMP and EMC Unity REST-API v3 template, but the template only shows the total pool size, not the disks separately.

    Does anyone know how I can monitor the size of these disks?

  • ArnoAnderson
    Junior Member
    • Aug 2020
    • 2

    #2
    zabbix agent is ok and get the correct information:
    zabbix_agentd.exe -t vfs.fs.discovery
    vfs.fs.discovery [s|{"data":[{"{#FSNAME}":"C:","{#FSTYPE}":"NTFS","{#FSDRIVE TYP E}":"fixed"},{"{#FSNAME}":"D:","{#FSTYPE}":"UNKN OW N","{#FSDRIVETYPE}":"cdrom"},{"{#FSNAME}":"X:", "{# FSTYPE}":"NTFS","{#FSDRIVETYPE}":"remote"},{"{#FSN AME}":"Y:","{#FSTYPE}":"NTFS","{#FSDRIVETYPE}":"re mote"},{"{#FSNAME}":"Z:","{#FSTYPE}":"NTFS","{#FSD RIVETYPE}":"remote"}]}]​


    But the results on Zabbix Server using vfs.fs.discovery is incomplete:
    {"data":[{"{#FSNAME}":"C:","{#FSTYPE}":"NTFS","{#FSDRIVE TYP E}":"fixed"},{"{#FSNAME}":"D:","{#FSTYPE}":"UNKN OW N","{#FSDRIVETYPE}":"cdrom"}]}​

    Comment

    • Hamardaban
      Senior Member
      Zabbix Certified SpecialistZabbix Certified Professional
      • May 2019
      • 2713

      #3
      You have at LLD a filter configured that removes all fs that have "{#FSDRIVETYPE}":"remote"

      Comment


      • ArnoAnderson
        ArnoAnderson commented
        Editing a comment
        Hi Hamardaban, thanks for the response,

        I still learning how to use Zabbix. Is the filter located in "Mounted Filesystem Discovery"?

        {#FSDRIVETYPE} matches {$VFS.FS.FSDRIVETYPE.MATCHES}
        {#FSDRIVETYPE} does not match {$VFS.FS.FSDRIVETYPE.NOT_MATCHES}
        {#FSNAME} matches {$VFS.FS.FSNAME.MATCHES}
        {#FSNAME} does not match {$VFS.FS.FSNAME.NOT_MATCHES}
        {#FSTYPE} matches {$VFS.FS.FSTYPE.MATCHES}
        {#FSTYPE} does not match {$VFS.FS.FSTYPE.NOT_MATCHES}
    • Hamardaban
      Senior Member
      Zabbix Certified SpecialistZabbix Certified Professional
      • May 2019
      • 2713

      #4
      -> https://www.zabbix.com/documentation...scovery#filter

      Comment


      • ArnoAnderson
        ArnoAnderson commented
        Editing a comment
        The problem was the old zabbix-agent version (3.0). After update apparently the server found the smb share units, because this error appear:

        Cannot obtain filesystem information: [0x0000052E] The user name or password is incorrect.

        Where I can put this information? I tried to insert in MACROS field, using {$USER} and {$PASSWORD} macros, but didn't work.
    • liujun0253
      Junior Member
      • Oct 2021
      • 9

      #5

      I also encountered the same problem, and I found that even if I removed the flitter in [vfs.fs.discovery], I still couldn't find the remote share. The output of two different commands is as follows;


      c:\Program Files\Zabbix Agent>zabbix_agentd.exe -t vfs.fs.discovery
      vfs.fs.discovery [s|[{"{#FSNAME}":"C:","{#FSTYPE}":"NTFS","{#FSLABEL }": "","{#FSDRIVETYPE}":"fixed"},{"{#FSNAME}":"D:" ,"{# FSTYPE}":"NTFS","{#FSLABEL}":"","{#FSDRIVETYPE}":" fixed"},{"{#FSNAME}":"G:","{#FSTYPE}":"NTFS","{#FS LABEL}":"","{#FSDRIVETYPE}":"fixed"},{"{#FSNAME}": "Y:","{#FSTYPE}":"NTFS","{#FSLABEL}":"usb3","{ #FSD RIVETYPE}":"remote"},{"{#FSNAME}":"Z:","{#FSTYPE}" :"NTFS","{#FSLABEL}":"usb4","{#FSDRIVETYPE}":"r emo te"}]]

      c:\Program Files\Zabbix Agent>zabbix_get.exe -s 127.0.0.1 -k vfs.fs.discovery
      [{"{#FSNAME}":"C:","{#FSTYPE}":"NTFS","{#FSLABEL }": "","{#FSDRIVETYPE}":"fixed"},{"{#FSNAME}":"D:" ,"{# FSTYPE}":"NTFS","{#FSLABEL}":"","{#FSDRIVETYPE}":" fixed"},{"{#FSNAME}":"G:","{#FSTYPE}":"NTFS","{#FS LABEL}":"","{#FSDRIVETYPE}":"fixed"}]​

      Comment

      Working...