I have added two Exchange servers with the NRPE plugin.
For some reason the Databases’ check returns the error below:
UNKNOWN: Command error:
I actually use the same plugin/check on other Exchange servers without any issues.
There are no details on the error even if I run it from the poller itself
Any idea on this?
Thanks
Page 1 / 1
hello,
Can you run the plugin locally on the exchange server? you should have a “centreon_plugins.exe” somewhere in your nsclient folder (usually “C:\Program Files\centreon-nsclient\NSClient++\scripts\centreon” if you did the setup of nsclient provided by centreon)
(also you may need to update this executable with the latest/current version, it is regurlaly updated with the github repository of the centreon plugins)
normally this command is running like on the linux poller so “centreon_plugins.exe --plugin=$ARG1$ --mode=$ARG2$ …..”
your check should look like “.\centreon_plugins.exe --plugin=apps::microsoft::exchange::local::plugin --mode=databases …...”,
replace “...” by your check options (look at what your check is running from the poller, beware the centreon plugin is a wrapper for the linux command line, so there should be some quotes you have to remove
the point is : is the plugin.exe running correctly on the server, is it present on the server, can it work without issue (it unpacks a lot of perl file in c:\windows\temp, some antivirus don’t like that)
it should also help to run the check with --debug and --verbose that return more information on the local windows than trough the check_nrpe on the poller
hope that helps you to identify where the problem lies
I don’t know if this is because the database is in a DAG
Hey gael.regina,
did you ever find a solution. I seem to have run into the same issue.
Try running the NRPE command manually from the command line on the Exchange servers. This can help you identify if the issue is specific to the NRPE execution or if it's related to the Nagios server.
/path/to/nrpe -H localhost -c command_name
Replace "/path/to/nrpe" with the actual path to the NRPE executable and "command_name" with the specific command you are trying to execute doing crm data enrichment.
If the NRPE command runs successfully manually but still returns an "UNKNOWN: Command error" when executed from Nagios, check the plugin's output. The plugin might be encountering an issue when running in the Nagios environment. Capture the plugin output to understand what's causing the problem.
hi,
this was during my christmas break and I totally missed the answers above, sorry for the late reply
what I can see from the output, the underlying powershell script that the centreon plugin is running has a problem with this
this is basically what the script does, it gets the database in list, and then get the information it needs to process them later, here I took the relevant part, remove any filtering and just print the output
on the only exchange 2016 server I still manage (all my clients have gone on o365) this is not working, because I think microsoft changed something on the way “databasesize” works :
$DB.DatabaseSize will return a string, not a magic value where you can get the bytes/MB/GB automatically with the “.ToBytes()” or “.ToGB()”
but the message is different on your case, it’s a null value error, not a “method not found” error.
could you try to run the snippet above in the powershell for exchange ,
it should print 5 line for each Database, I got only 1 Db, so it printed the name, the servername, the mounted status, then 2 error for the 2 size
can you check if you get a similar error
and also this line
$MountedDB"0].DatabaseSize | GM
look for all the “typename”
in my case, it says only system.string on the “databasesize” properties.
and I found a windows 2019/exch2019 still running somewhere
the last command I gave above returns correctly the information of size and TypeName of the property is not string