Hi guys,
I’m trying to use the Centreon Exchange plugin to monitor our Exchange servers, but the checks I’ve configured so far return “$ENV{ExchangeInstallPath} is undefined. Please install PowerShell extensions for Exchange”, but there isn’t much out there for people experiencing this error, so I’m a little stuck and hoping someone can help me out here.
My check command is:
object CheckCommand "check_exchange" {
import "plugin-check-command"
command = [ PluginDir + "/centreon-plugins-master/centreon_plugins.pl", ]
arguments = {
"--plugin" = "apps::exchange::2010::local::plugin"
"--mode" = "$check_mode$"
"--remote-host" = "$address$"
"--critical" = "$critical$"
"--warning" = "$warning$"
"--remote-user" = "$user$"
"--remote-password" = "$userpass$"
"--command" = "powershell.exe; Add-PSSnapin Microsoft.Exchange.Management.PowerShell.SnapIn"
"--ps-display" = "--ps-display"
}
}
I’ve tried a few variations upon the command - originally it was just “powershell.exe”, I tried this one, and I’ve also tried a much longer and more convoluted one to import the modules manually. All three yield the same results, so I’m pretty confused by now.
My check is defined as follows, but I think it’s pretty safe to assume that
apply Service "Centreon Exchange Replication" {
import "check_exchange"
vars.check_mode = "replication-health"
vars.warning = "8"
vars.critical = "10"
assign where "exchange-servers" in host.groups
}
Could somebody point out where I’m going wrong here please?
Thanks