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

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

2006-03-05 MickeM

  • Fixed -v FILEAGE check_nt (NSClient) check.
  • Added licence agreement header to all files
  • Property mode set to 100644
File size: 3.0 KB
Line 
1/**************************************************************************
2*   Copyright (C) 2004-2007 by Michael Medin <michael@medin.name>         *
3*                                                                         *
4*   This code is part of NSClient++ - http://trac.nakednuns.org/nscp      *
5*                                                                         *
6*   This program is free software; you can redistribute it and/or modify  *
7*   it under the terms of the GNU General Public License as published by  *
8*   the Free Software Foundation; either version 2 of the License, or     *
9*   (at your option) any later version.                                   *
10*                                                                         *
11*   This program is distributed in the hope that it will be useful,       *
12*   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
13*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
14*   GNU General Public License for more details.                          *
15*                                                                         *
16*   You should have received a copy of the GNU General Public License     *
17*   along with this program; if not, write to the                         *
18*   Free Software Foundation, Inc.,                                       *
19*   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
20***************************************************************************/
21NSC_WRAPPERS_MAIN();
22#include <config.h>
23#include <strEx.h>
24#include <utils.h>
25#include <checkHelpers.hpp>
26
27class CheckDisk {
28private:
29
30public:
31        CheckDisk();
32        virtual ~CheckDisk();
33        // Module calls
34        bool loadModule();
35        bool unloadModule();
36
37        std::string getModuleName() {
38                return "CheckDisk";
39        }
40        std::string getModuleDescription() {
41                return "CheckDisk can check various file and disk related things.\nThe current version has commands to check Size of hard drives and directories.";
42        }
43        NSCModuleWrapper::module_version getModuleVersion() {
44                NSCModuleWrapper::module_version version = {0, 0, 1 };
45                return version;
46        }
47
48        bool hasCommandHandler();
49        bool hasMessageHandler();
50        NSCAPI::nagiosReturn handleCommand(const strEx::blindstr command, const unsigned int argLen, char **char_args, std::string &message, std::string &perf);
51
52        // Check commands
53        NSCAPI::nagiosReturn CheckFileSize(const unsigned int argLen, char **char_args, std::string &message, std::string &perf);
54        NSCAPI::nagiosReturn CheckDriveSize(const unsigned int argLen, char **char_args, std::string &message, std::string &perf);
55        NSCAPI::nagiosReturn CheckFile(const unsigned int argLen, char **char_args, std::string &message, std::string &perf);
56        NSCAPI::nagiosReturn getFileAge(const unsigned int argLen, char **char_args, std::string &message, std::string &perf);
57
58private:
59        typedef checkHolders::CheckConatiner<checkHolders::MaxMinBoundsDiscSize> PathConatiner;
60        typedef checkHolders::CheckConatiner<checkHolders::MaxMinPercentageBoundsDiskSize> DriveConatiner;
61};
Note: See TracBrowser for help on using the repository browser.