Ad Widget

Collapse

monitor network path

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • m4rv1n
    Junior Member
    • Feb 2011
    • 14

    #1

    monitor network path

    Hello,
    i want to monitor i a network path is reachable, a folder exist and a file exist.
    all the things depends by the upper level (file from folder, folder from path).

    the path is a samba share and i don't want to static map it in my zabbix server and don't want to install zabbix agent (and can't).
    the path is reachable from windows by //192.168.1.1/share and from unix by smb://192.168.1.1/share

    the share folder contain other folder that change day by day (is named with date, example 20110204).

    the system hosting zabbix server is a ubuntu server 10.04 and zabbix is 1.8.2 with normal setup.

    thanks.
  • wooks
    Junior Member
    • Oct 2010
    • 8

    #2
    did you sort this

    Hi,
    did you find a way to test an smb path? I want to write a similar test.

    Comment

    • m4rv1n
      Junior Member
      • Feb 2011
      • 14

      #3
      test smb

      Hi,
      in this case, i've maked a script that try to connect to the share and return me an exit code to use with trigger.
      if you have mounted it, you can check /etc/mtab for a availibilty control to the system.
      in case of failure, you can try to umount filesystem and re-check.

      Comment

      • wooks
        Junior Member
        • Oct 2010
        • 8

        #4
        Figured it out

        Hi
        Thanks for the reply.
        I figured out a way to do this. On the samba server I am using the built in command 'smbget' to get and download (locally) a hidden test file in the first SMS fileshare. It is dotted to hide it from the users (.smb-test).
        If it gets the file it is exit 0 if fails exit 1.
        Now I just send the value to a key and trigger using zabbix trapper. Simple.

        Comment

        • m4rv1n
          Junior Member
          • Feb 2011
          • 14

          #5
          yes

          this was my first way, but i've to get the .file from shared, this was a problem when i can't have this file or when it was acidentally deleted from user.
          some user not look when do a rm -Rf * and i get alarm on console.
          a mount + create + download + delete is the full test.

          Comment

          • dikolal
            Junior Member
            • Mar 2013
            • 1

            #6
            could you describe the solution in detail

            Hi
            Could you describe this solution and list a text of script, that you wrote
            Thanks

            Comment

            Working...