Changeset 6b690bf in nscp for modules/CheckWMI


Ignore:
Timestamp:
02/03/08 17:15:14 (5 years ago)
Author:
Michael Medin <michael@…>
Branches:
master, 0.4.0, 0.4.1, 0.4.2, stable
Children:
b5ef837
Parents:
8b206ee
Message:

+ Added API for scripts to register commands

+ Added command descriptions (for some modules)

  • Fixed issue in NRPE that displayed a console window when running commands
  • New improved "inject" dialog from the system tray Lists avalible commands, and shows command descriptions and a lot of other improvments.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/CheckWMI/CheckWMI.cpp

    r99e4d8f r6b690bf  
    4343 
    4444bool CheckWMI::loadModule() { 
     45  try { 
     46    NSCModuleHelper::registerCommand(_T("CheckWMIValue"), _T("Run a WMI query and check the resulting value (the values of each row determin the state).")); 
     47    NSCModuleHelper::registerCommand(_T("CheckWMI"), _T("Run a WMI query and check the resulting rows (the number of hits determine state).")); 
     48  } catch (NSCModuleHelper::NSCMHExcpetion &e) { 
     49    NSC_LOG_ERROR_STD(_T("Failed to register command: ") + e.msg_); 
     50  } catch (...) { 
     51    NSC_LOG_ERROR_STD(_T("Failed to register command.")); 
     52  } 
    4553  return wmiQuery.initialize(); 
    4654} 
Note: See TracChangeset for help on using the changeset viewer.