diff --git a/XenModel/Actions/NRPE/NRPEHostConfiguration.cs b/XenModel/Actions/NRPE/NRPEHostConfiguration.cs index 31154b329..c9668a98a 100644 --- a/XenModel/Actions/NRPE/NRPEHostConfiguration.cs +++ b/XenModel/Actions/NRPE/NRPEHostConfiguration.cs @@ -44,6 +44,7 @@ public class NRPEHostConfiguration : ICloneable, IEquatable enableDict = new Dictionary + { + { "enable", "true" } + }; + try + { + string controlResult = Host.call_plugin(host.Connection.Session, host.opaque_ref, NRPEHostConfiguration.XAPI_NRPE_PLUGIN_NAME, + NRPEHostConfiguration.XAPI_NRPE_CONTROL, enableDict); + log.InfoFormat("Run NRPE {0}, return: {1}", NRPEHostConfiguration.XAPI_NRPE_CONTROL, controlResult); + } + catch (Exception e) + { + log.ErrorFormat("Run NRPE {0} failed, error: {1}", NRPEHostConfiguration.XAPI_NRPE_CONTROL, e.Message); + } + } + string nrpeUpdateStatusMethod = enableNRPE ? NRPEHostConfiguration.XAPI_NRPE_ENABLE : NRPEHostConfiguration.XAPI_NRPE_DISABLE; string result = Host.call_plugin(host.Connection.Session, host.opaque_ref, NRPEHostConfiguration.XAPI_NRPE_PLUGIN_NAME,