Page 1 of 1
Error -'/usr/local/nagios/bin/wmic: No suchfile or directory
Posted: Mon Aug 10, 2015 2:35 pm
by abhilash.patlolla
hello all,
My requirement is to checks a if remote windows process is running and its CPU, Memory usage, Threads and file handles, and disk IO (or all of the above) if selects processes by name.
I have used the plugin - '
Check Windows Process (WMI)' provided in the Nagios Exchange. URL:
https://exchange.nagios.org/directory/P ... 29/details
I have ran the command at command line as shown in the attachment Error. But, I am getting an error -
'sh: /usr/local/nagios/bin/wmic: No such file or directory'.
Could you please help me with this query.
Thanks,
Abhilash
402-999-3929
Re: Error -'/usr/local/nagios/bin/wmic: No suchfile or direc
Posted: Mon Aug 10, 2015 3:12 pm
by tgriep
It look like the writer of that plugin hard coded the wmic programs path to a nonstandard location.
You can either edit that plugin and change the path for wmic from
to
This is the default location for the wmic program.
Or, you could create a link to it by running the following.
Code: Select all
ln -s /usr/local/bin/wmic /usr/local/nagios/bin/wmic
Re: Error -'/usr/local/nagios/bin/wmic: No suchfile or direc
Posted: Mon Aug 10, 2015 3:27 pm
by abhilash.patlolla
Thank you for the update.
But, after the modification I get 'NTSTATUS: NT_STATUS_ACCESS_DENIED' errors.
Please find the attached pictures which describe about the errors.
Could you suggest me the possible solutions.
Re: Error -'/usr/local/nagios/bin/wmic: No suchfile or direc
Posted: Mon Aug 10, 2015 3:50 pm
by tgriep
It looks like the Windows system isn't configured to be monitored with WMI. Take a look at this document for how to setup WMI on your Windows system.
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
Re: Error -'/usr/local/nagios/bin/wmic: No suchfile or direc
Posted: Tue Aug 11, 2015 10:46 am
by abhilash.patlolla
Hello,
Thanks for your reply. I have followed whatever that is mentioned in the document. I have installed the WMI client on the Nagios XI server. I tried to install the WMI in the Windows 2008 server which I want to monitor. I created a user - 'wmiagent' and followed the steps mentioned in the document.
But, I still get the same error - 'NTSTATUS: NT_STATUS_ACCESS_DENIED'.
When I try to monitor the windows server using the WMI Wizard, I get this status message 'A valid MODE and/or SUBMODE must be specified'
Please find the attached images for the details.
Could you let me know the possible solution. Thanks !!
Re: Error -'/usr/local/nagios/bin/wmic: No suchfile or direc
Posted: Tue Aug 11, 2015 11:05 am
by abhilash.patlolla
I was able to solve the first error - ''.
But I get a response that 'CRITICAL: The process doesn't appear to be running'. I have tried with processes running on the windows server but I get the same error.
Please find the attched pictures.
Could anyone please post their ideas about this error.
Re: Error -'/usr/local/nagios/bin/wmic: No suchfile or direc
Posted: Tue Aug 11, 2015 5:19 pm
by tmcdonald
Looking at the output, there are two spaces between "The" and "process". I looked at the code and there is a variable there that never appears to be set.
Given the problems we saw with this script earlier, you might have better luck reaching out to the author for assistance. His information is on the Exchange page you linked.
Moving forward our standard way of monitoring a Windows machine is to either use NSClient++ or NCPA:
https://assets.nagios.com/downloads/nag ... ios-XI.pdf
https://assets.nagios.com/downloads/nag ... ios-XI.pdf