source: nscp/modules/CheckDisk/CheckDisk.h @ f42280d

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

* empty log message *

  • Property mode set to 100644
File size: 1.5 KB
Line 
1NSC_WRAPPERS_MAIN();
2#include <config.h>
3#include <strEx.h>
4#include <utils.h>
5#include <checkHelpers.hpp>
6
7class CheckDisk {
8private:
9
10public:
11        CheckDisk();
12        virtual ~CheckDisk();
13        // Module calls
14        bool loadModule();
15        bool unloadModule();
16
17        std::string getModuleName() {
18                return "CheckDisk";
19        }
20        std::string getModuleDescription() {
21                return "CheckDisk can check various file and disk related things.\nThe current version has commands to check Size of hard drives and directories.";
22        }
23        NSCModuleWrapper::module_version getModuleVersion() {
24                NSCModuleWrapper::module_version version = {0, 0, 1 };
25                return version;
26        }
27
28        bool hasCommandHandler();
29        bool hasMessageHandler();
30        NSCAPI::nagiosReturn handleCommand(const strEx::blindstr command, const unsigned int argLen, char **char_args, std::string &message, std::string &perf);
31
32        // Check commands
33        NSCAPI::nagiosReturn CheckFileSize(const unsigned int argLen, char **char_args, std::string &message, std::string &perf);
34        NSCAPI::nagiosReturn CheckDriveSize(const unsigned int argLen, char **char_args, std::string &message, std::string &perf);
35        NSCAPI::nagiosReturn CheckFile(const unsigned int argLen, char **char_args, std::string &message, std::string &perf);
36        NSCAPI::nagiosReturn getFileAge(const unsigned int argLen, char **char_args, std::string &message, std::string &perf);
37
38private:
39        typedef checkHolders::CheckConatiner<checkHolders::MaxMinBoundsDiscSize> PathConatiner;
40        typedef checkHolders::CheckConatiner<checkHolders::MaxMinPercentageBoundsDiskSize> DriveConatiner;
41};
Note: See TracBrowser for help on using the repository browser.