in reply to nrpe + wmi problem

habshi:

Your code is getting rows from the query, but prints "has no mapped drive". So perhaps the string returned for mapped drives under linux doesn't match "\\storage\shared"? If you print the value, you may see another string for mapped drives. (I don't use WMI so I don't know. But what if the reported drive under linux matched the unix path format, and reported something like "//storage/shared"?)

...roboticus

When your only tool is a hammer, all problems look like your thumb.

Replies are listed 'Best First'.
Re^2: nrpe + wmi problem
by habshi (Initiate) on Jun 20, 2011 at 13:09 UTC
    Hi, first thanks for reply.
    Second, I wrote the code wrong here, putted the if statement in wrong place(it's not original code, as the original has bit more stuff, but it's not relevant for this problem).
    I have fixed the code in the first post, but in case of that you have seen it would print nothing...
    I do think that the problem is some way related to the linux machine, but I don't understand how, as the script running on windows machine and just return the output to linux via nrpe...