source: nscp/modules/CheckSystem/CheckSystem.h @ d656933

0.4.00.4.10.4.2stable
Last change on this file since d656933 was d656933, checked in by Michael Medin <michael@…>, 8 years ago

+ Added multitasking to socket listsner (it can now handle multiple connections)

  • Fixed bug in NSClientListener now "seqv" in check_nt shouldn't happen. + Added COUNTER support to NSClient and CheckSystem
  • Property mode set to 100644
File size: 1.6 KB
Line 
1#pragma once
2#include "PDHCollector.h"
3
4NSC_WRAPPERS_MAIN();
5
6class CheckSystem {
7private:
8        PDHCollectorThread pdhThread;
9
10public:
11        typedef enum { started, stopped } states;
12        typedef struct rB {
13                NSCAPI::nagiosReturn code_;
14                std::string msg_;
15                std::string perf_;
16                rB(NSCAPI::nagiosReturn code, std::string msg) : code_(code), msg_(msg) {}
17                rB() : code_(NSCAPI::returnUNKNOWN) {}
18        } returnBundle;
19
20public:
21        CheckSystem();
22        virtual ~CheckSystem();
23        // Module calls
24        bool loadModule();
25        bool unloadModule();
26        std::string getModuleName();
27        NSCModuleWrapper::module_version getModuleVersion();
28        bool hasCommandHandler();
29        bool hasMessageHandler();
30        NSCAPI::nagiosReturn handleCommand(const std::string command, const unsigned int argLen, char **char_args, std::string &msg, std::string &perf);
31
32
33        NSCAPI::nagiosReturn checkCPU(const std::string command, const unsigned int argLen, char **char_args, std::string &msg, std::string &perf);
34        NSCAPI::nagiosReturn checkUpTime(const std::string command, const unsigned int argLen, char **char_args, std::string &msg, std::string &perf);
35        NSCAPI::nagiosReturn checkServiceState(const std::string command, const unsigned int argLen, char **char_args, std::string &msg, std::string &perf);
36        NSCAPI::nagiosReturn checkMem(const std::string command, const unsigned int argLen, char **char_args, std::string &msg, std::string &perf);
37        NSCAPI::nagiosReturn checkProcState(const std::string command, const unsigned int argLen, char **char_args, std::string &msg, std::string &perf);
38        NSCAPI::nagiosReturn checkCounter(const std::string command, const unsigned int argLen, char **char_args, std::string &msg, std::string &perf);
39
40
41};
Note: See TracBrowser for help on using the repository browser.