1

Topic: Windows Share Folder and check_mk the agent

Good afternoon, the plug-in for check_mk capable to display mapped network drives is necessary.
With windows it is a little familiar, the decision start net use through bat a file, or power shell and Win32_MappedLogicalDisk sees
The plug-in, on idea, enough simple and at start from command line, questions does not arise. But when handling through the agent, the data is not returned.
Probably any group politicians or still something, can who knows or prompts keywords for
Tested on Windows 7.
P.S: With gdr-PSProvider ' FileSystem ' - the same result.
[img=http://sysadmins.ru/files/000000000171_960.jpg]
[img=http://sysadmins.ru/files/000000000172_460.jpg]
[img=http://sysadmins.ru/files/000000000173_120.jpg]
[img=http://sysadmins.ru/files/000000000174_186.jpg]

2

Re: Windows Share Folder and check_mk the agent

User-Man wrote:

The plug-in, on idea, enough simple and at start from command line, questions does not arise.
But when handling through the agent, the data is not returned.

Display of network shares to letters of disks - local for a session. In certain cases - even for separate processes of one session.
"Agent" assumes service which works in absolutely separate session and cannot collect the data on displays of network shares at different users in different sessions.

3

Re: Windows Share Folder and check_mk the agent

Basil A. Sidorov;
There is a possibility, from this, a separate session, requests all users and their network shares?

4

Re: Windows Share Folder and check_mk the agent

You try to implement the inadequate decision of the unknown task.
Sound the purpose, but do not try to stretch an owl on the globe.
P.S. Probably - it is possible, but personally I will not smoke so much MSDN .

5

Re: Windows Share Folder and check_mk the agent

Basil A. Sidorov;
The task is enough  simple,  the connected disks of the user ().
For the general monitoring the agent (service) is used - as a matter of fact deduces the text information on port 6556.
On it the purpose: to receive on an output of port 6556 text information on all connected disks available in system, all users. Well or at least, one - specific.

6

Re: Windows Share Folder and check_mk the agent

It is clear that such amount of manuals hurriedly not to master, on it and I ask, who can solved similar tasks.

7

Re: Windows Share Folder and check_mk the agent

Even in initial idiotic setting there is a simple decision.
the script receives the list of the displayed disks, adds result in the directory on a disk, whence this information is read out by service of the agent.
Adjustment of access rights and formation of names of files - is left as house exercise.
P.S. Setting idiotic because the displayed disks, inherently - ephemeral essence.
Anything useful of this "zephyr" it is not derived. With similar success it is possible to fabricate the data.

8

Re: Windows Share Folder and check_mk the agent

User-Man wrote:

the Task is enough  simple,  the connected disks of the user ().

you not from that end solve the task.
Network shares can be used without any display to disks - directly on unc. Therefore: [spoiler net help session]

 NET SESSION
[\\_] [/DELETE] [/list]
Command NET SESSION completes current communication sessions between the given computer and
Other computers of a network or deduces their list. At usage of a command without
Parameters convergence on all current communication sessions with the interesting are deduced
The computer.
This command is used only on servers.
\\_ The Output of convergence on sessions for the specified computer.
/DELETE session End between the local computer and the computer with
The specified name; all are thus closed opened on it
The computer files for this communication session. If parameter
_ It is lowered, all communication sessions are closed.
/LIST Display of convergence in the list, instead of in the table.
NET HELP _ | MORE - page review of help. 

[/spoiler] [spoiler net help file]

 Syntax of the given command:
NET FILE
[id [/CLOSE]]
Command NET FILE closes the general file and removes file locks. When
The command is used without parameters, the list of open files is deduced on
The server which turnes on the identification number, appropriated to the opened
To file, a way to a file, user name and an amount of locks.
This command works only on computers with triggered service of the server.
Number Sets identification number of a file.
/CLOSE Closes an open file and removes locks of this file. This command
It is necessary to enter on that server where the general file is allocated.
NET HELP _ | MORE - page review of help. 

[/spoiler] On the server for which monitoring is conducted.
P.S. That for a habit or to invent  decisions or to do in accuracy "as it is told".
You experts or where?