Changeset 40970de in nscp for modules/NSCAAgent/NSCAAgent.h


Ignore:
Timestamp:
02/11/10 19:44:30 (3 years ago)
Author:
Michael Medin <michael@…>
Branches:
master, 0.4.0, 0.4.1, 0.4.2
Children:
47bcf6f
Parents:
1d4878e
Message:

Preliminary NSCA support (much is hard coded right now so only a PoC not a finished concept)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/NSCAAgent/NSCAAgent.h

    r5da0459 r40970de  
    2121#pragma once 
    2222 
    23 #include "NSCAThread.h" 
    2423#include <CheckMemory.h> 
    2524 
    2625NSC_WRAPPERS_MAIN(); 
    27 NSC_WRAPPERS_CLI(); 
    2826 
    29 class NSCAAgent { 
     27class NSCAAgent : public NSCModuleHelper::SimpleNotificationHandler { 
    3028private: 
    31   CheckMemory memoryChecker; 
    32   int processMethod_; 
    33 //  NSCAThreadImpl pdhThread; 
    34   std::list<NSCAThreadImpl*> extra_threads; 
    3529 
    36 public: 
     30  std::string hostname_; 
     31  std::wstring nscahost_; 
     32  unsigned int nscaport_; 
     33  unsigned int payload_length_; 
     34  bool cacheNscaHost_; 
     35  std::string password_; 
     36  int encryption_method_; 
     37  unsigned int timeout_; 
     38  int time_delta_; 
    3739 
    3840public: 
     
    6668    return std::wstring(_T("Passive check support (needs NSCA on nagios server).\nAvalible crypto are: ")) + getCryptos(); 
    6769  } 
    68  
    69   bool hasCommandHandler(); 
    70   bool hasMessageHandler(); 
    71   NSCAPI::nagiosReturn handleCommand(const strEx::blindstr command, const unsigned int argLen, TCHAR **char_args, std::wstring &msg, std::wstring &perf); 
    72   int commandLineExec(const TCHAR* command, const unsigned int argLen, TCHAR** args); 
     70  bool hasNotificationHandler() { return true; } 
    7371 
    7472  std::wstring getCryptos(); 
    7573 
     74  NSCAPI::nagiosReturn handleSimpleNotification(const std::wstring channel, const std::wstring command, NSCAPI::nagiosReturn code, std::wstring msg, std::wstring perf); 
     75 
     76 
    7677}; 
Note: See TracChangeset for help on using the changeset viewer.