Error -'/usr/local/nagios/bin/wmic: No suchfile or directory

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
abhilash.patlolla
Posts: 8
Joined: Sat Aug 01, 2015 5:03 pm

Error -'/usr/local/nagios/bin/wmic: No suchfile or directory

Post 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
You do not have the required permissions to view the files attached to this post.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Error -'/usr/local/nagios/bin/wmic: No suchfile or direc

Post 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

Code: Select all

/usr/local/nagios/bin
to

Code: Select all

/usr/local/bin
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
Be sure to check out our Knowledgebase for helpful articles and solutions!
abhilash.patlolla
Posts: 8
Joined: Sat Aug 01, 2015 5:03 pm

Re: Error -'/usr/local/nagios/bin/wmic: No suchfile or direc

Post 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.
You do not have the required permissions to view the files attached to this post.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Error -'/usr/local/nagios/bin/wmic: No suchfile or direc

Post 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
Be sure to check out our Knowledgebase for helpful articles and solutions!
abhilash.patlolla
Posts: 8
Joined: Sat Aug 01, 2015 5:03 pm

Re: Error -'/usr/local/nagios/bin/wmic: No suchfile or direc

Post 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 !!
You do not have the required permissions to view the files attached to this post.
abhilash.patlolla
Posts: 8
Joined: Sat Aug 01, 2015 5:03 pm

Re: Error -'/usr/local/nagios/bin/wmic: No suchfile or direc

Post 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.
You do not have the required permissions to view the files attached to this post.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Error -'/usr/local/nagios/bin/wmic: No suchfile or direc

Post 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
Former Nagios employee
Locked