Question

UNKNOWN: Command error: Exchange NRPE plugin check DATABASES

  • 21 September 2022
  • 3 replies
  • 140 views

Badge +1

Hi,

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


3 replies

Userlevel 4
Badge +10

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

Badge +1

Thanks for the tips!

I will give it a shot and let you know

Badge +1

So I just ran into it and I have more details on

UNKNOWN: Command error: #< CLIXML - <Objs Version="1.1.0.1" xmlns="http://schemas.microsoft.com/powershell/2004/04"><Obj S="progress" RefId="0"><TN RefId="0"><T>System.Management.Automation.PSCustomObject</T><T>System.Object</T></TN><MS><I64 N="SourceId">1</I64><PR N="Record"><AV>Preparing modules for first use.</AV><AI>0</AI><Nil /><PI>-1</PI><PC>-1</PC><T>Completed</T><SR>-1</SR><SD> </SD></PR></MS></Obj><S S="Error">You cannot call a method on a null-valued expression._x000D__x000A_</S><S S="Error">At line:110 char:5_x000D__x000A_</S><S S="Error">+     $item.size = $DB.DatabaseSize.ToBytes().ToString()_x000D__x000A_</S><S S="Error">+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~_x000D__x000A_</S><S S="Error">    + CategoryInfo          : InvalidOperation: (:) [], ParentContainsErrorRecordException_x000D__x000A_</S><S S="Error">    + FullyQualifiedErrorId : InvokeMethodOnNull_x000D__x000A_</S><S S="Error"> _x000D__x000A_</S></Objs>

So I will look into it 

I don’t know if this is because the database is in a DAG

Reply