Ad Widget

Collapse

Trying to monitor mapped file shares/network volumes on Windows

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jerrylenk
    Member
    Zabbix Certified Specialist
    • May 2010
    • 62

    #1

    Trying to monitor mapped file shares/network volumes on Windows

    Hi all,

    I want an item that informs me if a network share is mapped to drive letter H: on a Windows 2k3/windows XP machine.
    I tried: vfs.file.exists[H:] ,but it obviously only works for files, so I put an empty "dummy.file" into the shared directory:
    vfs.file.exists["H:\dummy.file"] - returns 0
    The same on a local drive
    vfs.file.exists["C:\dummy.file"] - returns 1.

    Different approach: I enable RemoteCommands and try:
    zabbix-get -s winhost -k system.run[dir h:] - returns:
    "Das System kann den angegebenen Pfad nicht finden." I.e. Cannot find that path.
    again,
    system.run[dir c:] - returns the directory listing alright.

    Now HERE comes the funny part: I stop the zabbix_agentd service on the Windows host and run zabbix_agent from the cmd prompt, and ...
    vfs.file.exists["H:\dummy.file"] - returns 1!
    system.run[dir h:] returns the dir contents!

    Then I edit the properties for the windows service to run as MYDOMAIN\mylogin instead of "local system user" -- again, it does NOT work.

    That is, it does work, but mapped network shares seem invisible to the agentd when it runs as service. Even with my credentials.

    Any suggestions on how to change this?

    Regards, Jerry
  • sosher
    Junior Member
    • Jun 2006
    • 12

    #2
    Mapped Drives

    If I am not mistaken,
    Mapped Drives applies only to interactive logons,
    You can not map drives to a service.

    Comment

    • jerrylenk
      Member
      Zabbix Certified Specialist
      • May 2010
      • 62

      #3
      Yes, you're right.
      I realize by now that this behaviour is normal.
      Our windows guy could not even think of a reason why there should be anything like a boot-time mounted nfs share, and in fact, why?

      Thanx anyway, Jerry

      Comment

      • m4rv1n
        Junior Member
        • Feb 2011
        • 14

        #4
        Hello,
        have you solved?
        i'm in you situation.
        i think about a command execute by agent that call a script, the script mount the nfs and check the file.

        the problem is: as service, i can map nfs with the same letter of user logged in?

        have you a good script to check this on windows host?
        thanks

        Comment

        Working...