We've moved to a new support system!

The Nagios Answer Hub is a place where you can get help with technical questions from our experts. There, you can quickly open tickets and join discussion boards.

Request Nagios Answer Hub access here: https://info.nagios.com/answer-hub-access-new-users

After completing the access form, you will be given access to a portal where new tickets can be created. We will keep the old customer forum sections and ticket system available for current cases to be resolved.

Go to the Answer Hub

powershell nsclient - cannot access file it is being used

Engage with the community of users including those using the open source solutions.
Includes Nagios Core, Plugins, and NCPA

powershell nsclient - cannot access file it is being used

Postby netanelp » Mon Mar 14, 2022 2:48 am

Hey guys,
I'm using nsclient on one of my windows machines and for some reason I keep getting an 'UNKNOWN' status on the check every one in a while.
I'm running a powershell script with this command:
Code: Select all
Check_test = cmd /c echo scripts\check_test "vm-test"; exit($lastexitcode) | powershell.exe -Command - 2> $null


The check itself works and most of the time i'm getting a correct reading but sometimes i'm getting the following.
powershell.exe -command - 2> $null) returned an invalid return code: 255: The process cannot access the file because it is being used by another process.


-Running from the cli nagios machine gets the result back just fine all the time.


What is locking this file?nagios itself?
netanelp
 
Posts: 5
Joined: Mon Aug 02, 2021 3:47 am

Return to Community Support

Who is online

Users browsing this forum: No registered users and 13 guests