Changeset 806bda2 in nscp


Ignore:
Timestamp:
03/24/11 21:37:24 (2 years ago)
Author:
Michael Medin <michael@…>
Branches:
stable
Children:
f3da50a
Parents:
aa3965b
Message:
  • Added check_updates.vbs script
  • Added a lot of useful(?) aliases
  • Added magic modifier (shamelessly stolen from check_mk) to CheckDriveSize
Files:
1 added
13 edited

Legend:

Unmodified
Added
Removed
  • AutoBuild.h

    raa3965b r806bda2  
    33// change the FALSE to TRUE for autoincrement of build number 
    44#define INCREMENT_VERSION TRUE 
    5 #define FILEVER        0,3,9,289 
    6 #define PRODUCTVER     0,3,9,289 
    7 #define STRFILEVER     _T("0.3.9.289") 
    8 #define STRPRODUCTVER  _T("0.3.9.289") 
    9 #define STRPRODUCTDATE  _T("2011-03-15") 
     5#define FILEVER        0,3,9,295 
     6#define PRODUCTVER     0,3,9,295 
     7#define STRFILEVER     _T("0.3.9.295") 
     8#define STRPRODUCTVER  _T("0.3.9.295") 
     9#define STRPRODUCTDATE  _T("2011-03-22") 
    1010#endif // AUTOBUILD_H 
  • NSC.dist

    r3136203 r806bda2  
    208208alias_cpu=checkCPU warn=80 crit=90 time=5m time=1m time=30s 
    209209alias_cpu_ex=checkCPU warn=$ARG1$ crit=$ARG2$ time=5m time=1m time=30s 
     210alias_mem=checkMem MaxWarn=80% MaxCrit=90% ShowAll=long type=physical type=virtual type=paged type=page 
     211alias_up=checkUpTime MinWarn=1d MinWarn=1h 
     212 
    210213alias_disk=CheckDriveSize MinWarn=10% MinCrit=5% CheckAll FilterType=FIXED 
     214alias_disk_loose=CheckDriveSize MinWarn=10% MinCrit=5% CheckAll FilterType=FIXED ignore-unreadable 
     215alias_volumes=CheckDriveSize MinWarn=10% MinCrit=5% CheckAll=volumes FilterType=FIXED 
     216alias_volumes_loose=CheckDriveSize MinWarn=10% MinCrit=5% CheckAll=volumes FilterType=FIXED ignore-unreadable  
     217 
    211218alias_service=checkServiceState CheckAll 
    212 alias_process=checkProcState $ARG1$=started 
    213 alias_mem=checkMem MaxWarn=80% MaxCrit=90% ShowAll type=physical 
    214 alias_up=checkUpTime MinWarn=1d MinWarn=1h 
     219alias_service_ex=checkServiceState CheckAll "exclude=Net Driver HPZ12" "exclude=Pml Driver HPZ12" exclude=stisvc 
     220alias_process=checkProcState "$ARG1$=started" 
     221alias_process_stopped=checkProcState "$ARG1$=stopped" 
     222alias_process_count=checkProcState MaxWarnCount=$ARG2$ MaxCritCount=$ARG3$ "$ARG1$=started" 
     223alias_process_hung=checkProcState MaxWarnCount=1 MaxCritCount=1 "$ARG1$=hung" 
     224 
     225alias_event_log=CheckEventLog file=application file=system MaxWarn=1 MaxCrit=1 "filter=generated gt -2d AND severity NOT IN ('success', 'informational') AND source != 'SideBySide'" truncate=800 unique descriptions "syntax=%severity%: %source%: %message% (%count%)" 
     226 
     227alias_file_size=CheckFiles "filter=size > $ARG2$" "path=$ARG1$" MaxWarn=1 MaxCrit=1 "syntax=%filename% %size%" max-dir-depth=10 
    215228alias_file_age=checkFile2 filter=out "file=$ARG1$" filter-written=>1d MaxWarn=1 MaxCrit=1 "syntax=%filename% %write%" 
    216 alias_file_size=checkFile2 filter=out "file=$ARG1$" filter-size=>$ARG2$ MaxWarn=1 MaxCrit=1 "syntax=%filename% %size%" 
    217 alias_file_size_in_dir=checkFile2 filter=out pattern=*.txt "file=$ARG1$" filter-size=>$ARG2$ MaxWarn=1 MaxCrit=1 "syntax=%filename% %size%" 
    218 alias_event_log_old=CheckEventLog file=application file=system filter=new filter=out MaxWarn=1 MaxCrit=1 filter-generated=>2d filter-severity==success filter-severity==informational truncate=800 unique descriptions  "syntax=%severity%: %source%: %message% (%count%)" 
    219 alias_event_log_new=CheckEventLog file=application file=system MaxWarn=1 MaxCrit=1 "filter=generated gt -2d AND severity NOT IN ('success', 'informational')" truncate=800 unique descriptions "syntax=%severity%: %source%: %message% (%count%)" 
    220 alias_event_log=alias_event_log_new 
     229 
     230alias_sched_all=CheckTaskSched "filter=exit_code ne 0" "syntax=%title%: %exit_code%" warn=>0 
     231alias_sched_long=CheckTaskSched "filter=status = 'running' AND most_recent_run_time < -$ARG1$" "syntax=%title% (%most_recent_run_time%)" warn=>0 
     232alias_sched_task=CheckTaskSched "filter=title eq '$ARG1$' AND exit_code ne 0" "syntax=%title% (%most_recent_run_time%)" warn=>0 
     233 
     234alias_updates=check_updates -warning 0 -critical 0 
    221235 
    222236check_ok=CheckOK Everything is fine! 
     
    228242;check_battery=check_battery.vbs 
    229243;check_printer=check_printer.vbs 
     244;check_updates=check_updates.vbs 
    230245 
    231246 
  • changelog

    raa3965b r806bda2  
    66 * Fix depend onservice LanManWorkStation (old win) 
    77 * Fix RtlStringFromGUID problem on NT4 
     8 
     92011-03-24 MickeM 
     10 * Added check_updates.vbs script 
     11 * Added a lot of useful(?) aliases 
     12 
     132011-03-22 MickeM 
     14 * Added magic modifier (shamelessly stolen from check_mk) to CheckDriveSize 
    815 
    9162011-03-17 MickeM 
  • include/checkHelpers.hpp

    raa3965b r806bda2  
    2323#include <string> 
    2424#include <strEx.h> 
     25#include <math.h> 
    2526 
    2627#define MAKE_PERFDATA_SIMPLE(alias, value, unit) _T("'") + alias + _T("'=") + value + unit 
     
    109110    {} 
    110111    CheckContainer(std::wstring data_, TContents warn_, TContents crit_)  
    111       : data(data_), warn(warn_), crit(crit_), show(showUnknown)  
     112      : data(data_), warn(warn_), crit(crit_), show(showUnknown), perfData(true) 
    112113    {} 
    113114    CheckContainer(std::wstring data_, std::wstring alias_, TContents warn_, TContents crit_)  
    114       : data(data_), alias(alias_), warn(warn_), crit(crit_), show(showUnknown)  
     115      : data(data_), alias(alias_), warn(warn_), crit(crit_), show(showUnknown), perfData(true) 
    115116    {} 
    116117    CheckContainer(const TThisType &other)  
    117       : data(other.data), alias(other.alias), warn(other.warn), crit(other.crit), show(other.show)  
     118      : data(other.data), alias(other.alias), warn(other.warn), crit(other.crit), show(other.show), perfData(other.perfData) 
     119 
    118120    {} 
     121    CheckContainer<TContents>& operator =(const CheckContainer<TContents> &other) { 
     122      warn = other.warn; 
     123      crit = other.crit; 
     124      data = other.data; 
     125      alias = other.alias; 
     126      show = other.show; 
     127      perfData = other.perfData; 
     128      return *this; 
     129    } 
    119130    std::wstring getAlias() { 
    120131      if (alias.empty()) 
     
    174185  }; 
    175186 
     187  template <class TContents> 
     188  struct MagicCheckContainer : public CheckContainer<TContents> { 
     189    typedef CheckContainer<TContents> tParent; 
     190 
     191    MagicCheckContainer() : tParent() {} 
     192    MagicCheckContainer(std::wstring data_, TContents warn_, TContents crit_) : tParent(data_, warn_, crit_) {} 
     193    MagicCheckContainer(std::wstring data_, std::wstring alias_, TContents warn_, TContents crit_) : tParent(data_, alias_, warn_, crit_) {} 
     194    MagicCheckContainer(const TThisType &other) : tParent(other) {} 
     195 
     196    MagicCheckContainer<TContents>& operator =(const MagicCheckContainer<TContents> &other) { 
     197      tParent::operator =(other); 
     198      return *this; 
     199    } 
     200 
     201 
     202    void set_magic(double magic) { 
     203      warn.max_.set_magic(magic); 
     204      warn.min_.set_magic(magic); 
     205      crit.max_.set_magic(magic); 
     206      crit.min_.set_magic(magic); 
     207    } 
     208 
     209  }; 
    176210 
    177211  template <class value_type> 
     
    625659      return (value*100)/total; 
    626660    } 
     661 
     662    TTypeValue adjust_upper_magic(TTypeValue percentage, double normal, double magic) { 
     663      if (magic == 0) 
     664        return percentage; 
     665      return 100 - ( (100 - percentage) * pow(total / normal, magic) / (value / normal) ); 
     666    } 
     667    TTypeValue adjust_lower_magic(TTypeValue percentage, double normal, double magic) { 
     668      if (magic == 0) 
     669        return percentage; 
     670      return ( (percentage) * pow(total / normal, magic) / (value / normal) ); 
     671    } 
     672 
     673 
    627674  }; 
    628675 
     
    672719    InternalValue upper; 
    673720    InternalValue lower; 
    674  
    675     NumericPercentageBounds() : type_(none), upper(true), lower(false) { 
     721    double normal_size; 
     722    double magic; 
     723 
     724    NumericPercentageBounds() : type_(none), upper(true), lower(false), magic(0), normal_size(20*1024*1024) { 
    676725      upper.setParent(this); 
    677726      lower.setParent(this); 
    678727    } 
    679728 
    680     NumericPercentageBounds(const NumericPercentageBounds &other) { 
     729    NumericPercentageBounds(const NumericPercentageBounds &other)  
     730      : type_(other.type_) 
     731      , value_(other.value_) 
     732      , magic(other.magic) 
     733      , normal_size(other.normal_size) 
     734      , upper(other.upper) 
     735      , lower(other.lower) 
     736    { 
     737      upper.setParent(this); 
     738      lower.setParent(this); 
     739 
     740    } 
     741 
     742    NumericPercentageBounds& operator =(const NumericPercentageBounds &other) { 
    681743      type_ = other.type_; 
    682744      value_ = other.value_; 
     745      magic = other.magic; 
     746      normal_size = other.normal_size; 
     747      upper = other.upper; 
     748      lower = other.lower; 
     749      upper.setParent(this); 
     750      lower.setParent(this); 
     751      return *this; 
    683752    } 
    684753    checkResultType check(TType value) const { 
    685754      if (type_ == percentage_lower) { 
    686         if (value.getLowerPercentage() == value_) 
     755        if (value.getLowerPercentage() == value.adjust_lower_magic(value_, normal_size, magic)) 
    687756          return same; 
    688         else if (value.getLowerPercentage() > value_) 
     757        else if (value.getLowerPercentage() > value.adjust_lower_magic(value_, normal_size, magic)) 
    689758          return above; 
    690759      } else if (type_ == percentage_upper) { 
    691         if (value.getUpperPercentage() == value_) 
     760        if (value.getUpperPercentage() == value.adjust_upper_magic(value_, normal_size, magic)) 
    692761          return same; 
    693         else if (value.getUpperPercentage() > value_) 
     762        else if (value.getUpperPercentage() > value.adjust_upper_magic(value_, normal_size, magic)) 
    694763          return above; 
    695764      } else if (type_ == value_lower) { 
     
    727796      return value_; 
    728797    } 
     798    void set_magic(double magic_) { 
     799      magic = magic_; 
     800    } 
     801 
    729802    std::wstring gatherPerfData(std::wstring alias, TType &value, typename TType::TValueType warn, typename TType::TValueType crit) { 
    730803      unsigned int value_p, warn_p, crit_p; 
     
    852925  class MaxMinStateBounds { 
    853926  public: 
    854     TNumericHolder max; 
    855     TNumericHolder min; 
     927    TNumericHolder max_; 
     928    TNumericHolder min_; 
    856929    TStateHolder state; 
    857930    typedef MaxMinStateBounds<TValueType, TNumericHolder, TStateHolder > TMyType; 
     
    860933 
    861934    MaxMinStateBounds() {} 
    862     MaxMinStateBounds(const MaxMinStateBounds &other) { 
     935    MaxMinStateBounds(const MaxMinStateBounds &other) : state(other.state), max_(other.max_), min_(other.min_) {} 
     936    MaxMinStateBounds & operator =(const MaxMinStateBounds &other) { 
    863937      state = other.state; 
    864       max = other.max; 
    865       min = other.min; 
     938      max_ = other.max_; 
     939      min_ = other.min_; 
     940      return *this; 
    866941    } 
    867942    bool hasBounds() { 
    868       return state.hasBounds() ||  max.hasBounds() || min.hasBounds(); 
     943      return state.hasBounds() ||  max_.hasBounds() || min_.hasBounds(); 
    869944    } 
    870945 
     
    888963      if (state.hasBounds()) { 
    889964        // @todo 
    890       } else if (max.hasBounds()) { 
    891         return max.gatherPerfData(alias, value.count, warn.max.getPerfBound(value.count), crit.max.getPerfBound(value.count)); 
    892       } else if (min.hasBounds()) { 
    893         return min.gatherPerfData(alias, value.count, warn.min.getPerfBound(value.count), crit.min.getPerfBound(value.count)); 
     965      } else if (max_.hasBounds()) { 
     966        return max_.gatherPerfData(alias, value.count, warn.max_.getPerfBound(value.count), crit.max_.getPerfBound(value.count)); 
     967      } else if (min_.hasBounds()) { 
     968        return min_.gatherPerfData(alias, value.count, warn.min_.getPerfBound(value.count), crit.min_.getPerfBound(value.count)); 
    894969      } 
    895970      return _T(""); 
     
    902977        message = lable + _T(": ") + formatState(TStateHolder::toStringShort(value.state), type); 
    903978        return true; 
    904       } else if ((max.hasBounds())&&(max.check(value.count) != below)) { 
     979      } else if ((max_.hasBounds())&&(max_.check(value.count) != below)) { 
    905980        message = lable + _T(": ") + formatAbove(TNumericHolder::toStringShort(value.count), type); 
    906981        return true; 
    907       } else if ((min.hasBounds())&&(min.check(value.count) != above)) { 
     982      } else if ((min_.hasBounds())&&(min_.check(value.count) != above)) { 
    908983        message = lable + _T(": ") + formatBelow(TNumericHolder::toStringShort(value.count), type); 
    909984        return true; 
     
    10111086  class MaxMinBounds { 
    10121087  public: 
    1013     THolder max; 
    1014     THolder min; 
     1088    THolder max_; 
     1089    THolder min_; 
    10151090    typedef MaxMinBounds<THolder > TMyType; 
    10161091 
     
    10191094 
    10201095    MaxMinBounds() {} 
    1021     MaxMinBounds(const MaxMinBounds &other) { 
    1022       max = other.max; 
    1023       min = other.min; 
     1096    MaxMinBounds(const MaxMinBounds &other) : max_(other.max_), min_(other.min_) {} 
     1097    MaxMinBounds& operator=(const MaxMinBounds &other) { 
     1098      max_ = other.max_; 
     1099      min_ = other.min_; 
     1100      return *this; 
    10241101    } 
    10251102    bool hasBounds() { 
    1026       return max.hasBounds() || min.hasBounds(); 
     1103      return max_.hasBounds() || min_.hasBounds(); 
    10271104    } 
    10281105    static std::wstring toStringLong(typename THolder::TValueType &value) { 
     
    10331110    } 
    10341111    std::wstring gatherPerfData(std::wstring alias, typename THolder::TValueType &value, TMyType &warn, TMyType &crit) { 
    1035       if (max.hasBounds()) { 
    1036         return max.gatherPerfData(alias, value, warn.max.getPerfBound(value), crit.max.getPerfBound(value)); 
    1037       } else if (min.hasBounds()) { 
    1038         return min.gatherPerfData(alias, value, warn.min.getPerfBound(value), crit.min.getPerfBound(value)); 
     1112      if (max_.hasBounds()) { 
     1113        return max_.gatherPerfData(alias, value, warn.max_.getPerfBound(value), crit.max_.getPerfBound(value)); 
     1114      } else if (min_.hasBounds()) { 
     1115        return min_.gatherPerfData(alias, value, warn.min_.getPerfBound(value), crit.min_.getPerfBound(value)); 
    10391116      } else { 
    10401117        NSC_LOG_MESSAGE_STD(_T("Missing bounds for maxmin-bounds check: ") + alias); 
    1041         return min.gatherPerfData(alias, value, 0, 0); 
     1118        return min_.gatherPerfData(alias, value, 0, 0); 
    10421119      } 
    10431120      return _T(""); 
     
    10481125    } 
    10491126    bool check(typename THolder::TValueType &value, std::wstring lable, std::wstring &message, ResultType type) { 
    1050       if ((max.hasBounds())&&(max.check(value) != below)) { 
     1127      if ((max_.hasBounds())&&(max_.check(value) != below)) { 
    10511128        message = lable + _T(": ") + formatAbove(THolder::toStringLong(value), type); 
    10521129        return true; 
    1053       } else if ((min.hasBounds())&&(min.check(value) != above)) { 
     1130      } else if ((min_.hasBounds())&&(min_.check(value) != above)) { 
    10541131        message = lable + _T(": ") + formatBelow(THolder::toStringLong(value), type); 
    10551132        return true; 
  • include/utils.h

    r1b3afb4 r806bda2  
    3838 
    3939#define MAP_OPTIONS_DISK_ALL(obj, postfix, pfUpper, pfLower) \ 
    40       else if (p__.first == _T("MaxWarn") pfUpper) { obj.warn.max.upper = p__.second; } \ 
    41       else if (p__.first == _T("MaxCrit") pfUpper) { obj.crit.max.upper = p__.second; } \ 
    42       else if (p__.first == _T("MinWarn") pfUpper) { obj.warn.min.upper = p__.second; } \ 
    43       else if (p__.first == _T("MinCrit") pfUpper) { obj.crit.min.upper = p__.second; } \ 
    44       else if (p__.first == _T("MaxWarn") pfLower) { obj.warn.max.lower = p__.second; } \ 
    45       else if (p__.first == _T("MaxCrit") pfLower) { obj.crit.max.lower = p__.second; } \ 
    46       else if (p__.first == _T("MinWarn") pfLower) { obj.warn.min.lower = p__.second; } \ 
    47       else if (p__.first == _T("MinCrit") pfLower) { obj.crit.min.lower = p__.second; } \ 
    48       else if (p__.first == _T("MaxWarn") postfix) { obj.warn.max.lower = p__.second; } \ 
    49       else if (p__.first == _T("MaxCrit") postfix) { obj.crit.max.lower = p__.second; } \ 
    50       else if (p__.first == _T("MinWarn") postfix) { obj.warn.min.upper = p__.second; } \ 
    51       else if (p__.first == _T("MinCrit") postfix) { obj.crit.min.upper = p__.second; }  
     40      else if (p__.first == _T("MaxWarn") pfUpper) { obj.warn.max_.upper = p__.second; } \ 
     41      else if (p__.first == _T("MaxCrit") pfUpper) { obj.crit.max_.upper = p__.second; } \ 
     42      else if (p__.first == _T("MinWarn") pfUpper) { obj.warn.min_.upper = p__.second; } \ 
     43      else if (p__.first == _T("MinCrit") pfUpper) { obj.crit.min_.upper = p__.second; } \ 
     44      else if (p__.first == _T("MaxWarn") pfLower) { obj.warn.max_.lower = p__.second; } \ 
     45      else if (p__.first == _T("MaxCrit") pfLower) { obj.crit.max_.lower = p__.second; } \ 
     46      else if (p__.first == _T("MinWarn") pfLower) { obj.warn.min_.lower = p__.second; } \ 
     47      else if (p__.first == _T("MinCrit") pfLower) { obj.crit.min_.lower = p__.second; } \ 
     48      else if (p__.first == _T("MaxWarn") postfix) { obj.warn.max_.lower = p__.second; } \ 
     49      else if (p__.first == _T("MaxCrit") postfix) { obj.crit.max_.lower = p__.second; } \ 
     50      else if (p__.first == _T("MinWarn") postfix) { obj.warn.min_.upper = p__.second; } \ 
     51      else if (p__.first == _T("MinCrit") postfix) { obj.crit.min_.upper = p__.second; }  
    5252 
    5353#define MAP_OPTIONS_NUMERIC_ALL(obj, postfix) \ 
    54       else if (p__.first == (_T("MaxWarn") postfix)) { obj.warn.max = p__.second; } \ 
    55       else if (p__.first == (_T("MaxCrit") postfix)) { obj.crit.max = p__.second; } \ 
    56       else if (p__.first == (_T("MinWarn") postfix)) { obj.warn.min = p__.second; } \ 
    57       else if (p__.first == (_T("MinCrit") postfix)) { obj.crit.min = p__.second; } 
     54      else if (p__.first == (_T("MaxWarn") postfix)) { obj.warn.max_ = p__.second; } \ 
     55      else if (p__.first == (_T("MaxCrit") postfix)) { obj.crit.max_ = p__.second; } \ 
     56      else if (p__.first == (_T("MinWarn") postfix)) { obj.warn.min_ = p__.second; } \ 
     57      else if (p__.first == (_T("MinCrit") postfix)) { obj.crit.min_ = p__.second; } 
    5858 
    5959#define MAP_OPTIONS_EXACT_NUMERIC_ALL(obj, postfix) \ 
     
    7575#define MAP_OPTIONS_STR(value, obj) \ 
    7676      else if (p__.first == value) { obj = p__.second; } 
     77#define MAP_OPTIONS_DOUBLE(value, obj) \ 
     78      else if (p__.first == value) { obj = strEx::stod(p__.second); } 
     79 
    7780#define MAP_OPTIONS_STR2INT(value, obj) \ 
    7881      else if (p__.first == value) { obj = _wtoi(p__.second.c_str()); } 
  • modules/CheckDisk/CheckDisk-2005.vcproj

    raa3965b r806bda2  
    663663    </Configuration> 
    664664    <Configuration 
     665      Name="OP5|Win32" 
     666      IntermediateDirectory="$(ConfigurationName)" 
     667      ConfigurationType="1" 
     668      > 
     669      <Tool 
     670        Name="VCPreBuildEventTool" 
     671      /> 
     672      <Tool 
     673        Name="VCCustomBuildTool" 
     674      /> 
     675      <Tool 
     676        Name="VCXMLDataGeneratorTool" 
     677      /> 
     678      <Tool 
     679        Name="VCWebServiceProxyGeneratorTool" 
     680      /> 
     681      <Tool 
     682        Name="VCMIDLTool" 
     683      /> 
     684      <Tool 
     685        Name="VCCLCompilerTool" 
     686      /> 
     687      <Tool 
     688        Name="VCManagedResourceCompilerTool" 
     689      /> 
     690      <Tool 
     691        Name="VCResourceCompilerTool" 
     692      /> 
     693      <Tool 
     694        Name="VCPreLinkEventTool" 
     695      /> 
     696      <Tool 
     697        Name="VCLinkerTool" 
     698      /> 
     699      <Tool 
     700        Name="VCALinkTool" 
     701      /> 
     702      <Tool 
     703        Name="VCManifestTool" 
     704      /> 
     705      <Tool 
     706        Name="VCXDCMakeTool" 
     707      /> 
     708      <Tool 
     709        Name="VCBscMakeTool" 
     710      /> 
     711      <Tool 
     712        Name="VCFxCopTool" 
     713      /> 
     714      <Tool 
     715        Name="VCAppVerifierTool" 
     716      /> 
     717      <Tool 
     718        Name="VCWebDeploymentTool" 
     719      /> 
     720      <Tool 
     721        Name="VCPostBuildEventTool" 
     722      /> 
     723    </Configuration> 
     724    <Configuration 
    665725      Name="OP5|x64" 
    666726      OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)" 
  • modules/CheckDisk/CheckDisk.cpp

    raa3965b r806bda2  
    209209  std::wstring strCheckAll; 
    210210  bool ignore_unreadable = false; 
     211  float magic = 0; 
    211212 
    212213  MAP_OPTIONS_BEGIN(args) 
     
    224225    //MAP_OPTIONS_BOOL_TRUE(CHECK_ALL, bCheckAll) 
    225226    MAP_OPTIONS_STR(CHECK_ALL, strCheckAll) 
     227    MAP_OPTIONS_DOUBLE(_T("magic"), magic) 
    226228    MAP_OPTIONS_BOOL_TRUE(CHECK_ALL_OTHERS, bCheckAllOthers) 
    227229    MAP_OPTIONS_SECONDARY_BEGIN(_T(":"), p2) 
     
    380382        value.total = totalNumberOfBytes.QuadPart; 
    381383        drive.setDefault(tmpObject); 
     384        drive.set_magic(magic); 
    382385        drive.runCheck(value, returnCode, message, perf); 
    383386      } else { 
     
    426429    MAP_OPTIONS_STR_AND(_T("File"), tmpObject.data, paths.push_back(tmpObject)) 
    427430    MAP_OPTIONS_SHOWALL(tmpObject) 
    428     MAP_OPTIONS_STR(_T("MaxWarn"), tmpObject.warn.max) 
    429     MAP_OPTIONS_STR(_T("MinWarn"), tmpObject.warn.min) 
    430     MAP_OPTIONS_STR(_T("MaxCrit"), tmpObject.crit.max) 
    431     MAP_OPTIONS_STR(_T("MinCrit"), tmpObject.crit.min) 
     431    MAP_OPTIONS_STR(_T("MaxWarn"), tmpObject.warn.max_) 
     432    MAP_OPTIONS_STR(_T("MinWarn"), tmpObject.warn.min_) 
     433    MAP_OPTIONS_STR(_T("MaxCrit"), tmpObject.crit.max_) 
     434    MAP_OPTIONS_STR(_T("MinCrit"), tmpObject.crit.min_) 
    432435    MAP_OPTIONS_BOOL_TRUE(_T("debug"), debug) 
    433436    MAP_OPTIONS_BOOL_FALSE(IGNORE_PERFDATA, bPerfData) 
  • modules/CheckDisk/CheckDisk.h

    r349a44a r806bda2  
    6060 
    6161private: 
    62   typedef checkHolders::CheckContainer<checkHolders::MaxMinPercentageBoundsDiskSize> DriveContainer; 
     62  typedef checkHolders::MagicCheckContainer<checkHolders::MaxMinPercentageBoundsDiskSize> DriveContainer; 
    6363}; 
  • modules/CheckEventLog/CheckEventLog-2005.vcproj

    raa3965b r806bda2  
    354354    </Configuration> 
    355355    <Configuration 
     356      Name="Distribution|Win32" 
     357      IntermediateDirectory="$(ConfigurationName)" 
     358      ConfigurationType="1" 
     359      > 
     360      <Tool 
     361        Name="VCPreBuildEventTool" 
     362      /> 
     363      <Tool 
     364        Name="VCCustomBuildTool" 
     365      /> 
     366      <Tool 
     367        Name="VCXMLDataGeneratorTool" 
     368      /> 
     369      <Tool 
     370        Name="VCWebServiceProxyGeneratorTool" 
     371      /> 
     372      <Tool 
     373        Name="VCMIDLTool" 
     374      /> 
     375      <Tool 
     376        Name="VCCLCompilerTool" 
     377      /> 
     378      <Tool 
     379        Name="VCManagedResourceCompilerTool" 
     380      /> 
     381      <Tool 
     382        Name="VCResourceCompilerTool" 
     383      /> 
     384      <Tool 
     385        Name="VCPreLinkEventTool" 
     386      /> 
     387      <Tool 
     388        Name="VCLinkerTool" 
     389      /> 
     390      <Tool 
     391        Name="VCALinkTool" 
     392      /> 
     393      <Tool 
     394        Name="VCManifestTool" 
     395      /> 
     396      <Tool 
     397        Name="VCXDCMakeTool" 
     398      /> 
     399      <Tool 
     400        Name="VCBscMakeTool" 
     401      /> 
     402      <Tool 
     403        Name="VCFxCopTool" 
     404      /> 
     405      <Tool 
     406        Name="VCAppVerifierTool" 
     407      /> 
     408      <Tool 
     409        Name="VCWebDeploymentTool" 
     410      /> 
     411      <Tool 
     412        Name="VCPostBuildEventTool" 
     413      /> 
     414    </Configuration> 
     415    <Configuration 
    356416      Name="Distribution|x64" 
    357417      OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\modules" 
     
    731791        ImportLibrary="$(OutDir)/CheckEventLog.lib" 
    732792        TargetMachine="17" 
     793      /> 
     794      <Tool 
     795        Name="VCALinkTool" 
     796      /> 
     797      <Tool 
     798        Name="VCManifestTool" 
     799      /> 
     800      <Tool 
     801        Name="VCXDCMakeTool" 
     802      /> 
     803      <Tool 
     804        Name="VCBscMakeTool" 
     805      /> 
     806      <Tool 
     807        Name="VCFxCopTool" 
     808      /> 
     809      <Tool 
     810        Name="VCAppVerifierTool" 
     811      /> 
     812      <Tool 
     813        Name="VCWebDeploymentTool" 
     814      /> 
     815      <Tool 
     816        Name="VCPostBuildEventTool" 
     817      /> 
     818    </Configuration> 
     819    <Configuration 
     820      Name="OP5|Win32" 
     821      IntermediateDirectory="$(ConfigurationName)" 
     822      ConfigurationType="1" 
     823      > 
     824      <Tool 
     825        Name="VCPreBuildEventTool" 
     826      /> 
     827      <Tool 
     828        Name="VCCustomBuildTool" 
     829      /> 
     830      <Tool 
     831        Name="VCXMLDataGeneratorTool" 
     832      /> 
     833      <Tool 
     834        Name="VCWebServiceProxyGeneratorTool" 
     835      /> 
     836      <Tool 
     837        Name="VCMIDLTool" 
     838      /> 
     839      <Tool 
     840        Name="VCCLCompilerTool" 
     841      /> 
     842      <Tool 
     843        Name="VCManagedResourceCompilerTool" 
     844      /> 
     845      <Tool 
     846        Name="VCResourceCompilerTool" 
     847      /> 
     848      <Tool 
     849        Name="VCPreLinkEventTool" 
     850      /> 
     851      <Tool 
     852        Name="VCLinkerTool" 
    733853      /> 
    734854      <Tool 
  • modules/CheckExternalScripts/CheckExternalScripts-2005.vcproj

    raa3965b r806bda2  
    350350    </Configuration> 
    351351    <Configuration 
     352      Name="Distribution|Win32" 
     353      IntermediateDirectory="$(ConfigurationName)" 
     354      ConfigurationType="1" 
     355      > 
     356      <Tool 
     357        Name="VCPreBuildEventTool" 
     358      /> 
     359      <Tool 
     360        Name="VCCustomBuildTool" 
     361      /> 
     362      <Tool 
     363        Name="VCXMLDataGeneratorTool" 
     364      /> 
     365      <Tool 
     366        Name="VCWebServiceProxyGeneratorTool" 
     367      /> 
     368      <Tool 
     369        Name="VCMIDLTool" 
     370      /> 
     371      <Tool 
     372        Name="VCCLCompilerTool" 
     373      /> 
     374      <Tool 
     375        Name="VCManagedResourceCompilerTool" 
     376      /> 
     377      <Tool 
     378        Name="VCResourceCompilerTool" 
     379      /> 
     380      <Tool 
     381        Name="VCPreLinkEventTool" 
     382      /> 
     383      <Tool 
     384        Name="VCLinkerTool" 
     385      /> 
     386      <Tool 
     387        Name="VCALinkTool" 
     388      /> 
     389      <Tool 
     390        Name="VCManifestTool" 
     391      /> 
     392      <Tool 
     393        Name="VCXDCMakeTool" 
     394      /> 
     395      <Tool 
     396        Name="VCBscMakeTool" 
     397      /> 
     398      <Tool 
     399        Name="VCFxCopTool" 
     400      /> 
     401      <Tool 
     402        Name="VCAppVerifierTool" 
     403      /> 
     404      <Tool 
     405        Name="VCWebDeploymentTool" 
     406      /> 
     407      <Tool 
     408        Name="VCPostBuildEventTool" 
     409      /> 
     410    </Configuration> 
     411    <Configuration 
    352412      Name="Distribution|x64" 
    353413      OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\modules" 
     
    722782        ImportLibrary="$(OutDir)/CheckExternalScripts.lib" 
    723783        TargetMachine="17" 
     784      /> 
     785      <Tool 
     786        Name="VCALinkTool" 
     787      /> 
     788      <Tool 
     789        Name="VCManifestTool" 
     790      /> 
     791      <Tool 
     792        Name="VCXDCMakeTool" 
     793      /> 
     794      <Tool 
     795        Name="VCBscMakeTool" 
     796      /> 
     797      <Tool 
     798        Name="VCFxCopTool" 
     799      /> 
     800      <Tool 
     801        Name="VCAppVerifierTool" 
     802      /> 
     803      <Tool 
     804        Name="VCWebDeploymentTool" 
     805      /> 
     806      <Tool 
     807        Name="VCPostBuildEventTool" 
     808      /> 
     809    </Configuration> 
     810    <Configuration 
     811      Name="OP5|Win32" 
     812      IntermediateDirectory="$(ConfigurationName)" 
     813      ConfigurationType="1" 
     814      > 
     815      <Tool 
     816        Name="VCPreBuildEventTool" 
     817      /> 
     818      <Tool 
     819        Name="VCCustomBuildTool" 
     820      /> 
     821      <Tool 
     822        Name="VCXMLDataGeneratorTool" 
     823      /> 
     824      <Tool 
     825        Name="VCWebServiceProxyGeneratorTool" 
     826      /> 
     827      <Tool 
     828        Name="VCMIDLTool" 
     829      /> 
     830      <Tool 
     831        Name="VCCLCompilerTool" 
     832      /> 
     833      <Tool 
     834        Name="VCManagedResourceCompilerTool" 
     835      /> 
     836      <Tool 
     837        Name="VCResourceCompilerTool" 
     838      /> 
     839      <Tool 
     840        Name="VCPreLinkEventTool" 
     841      /> 
     842      <Tool 
     843        Name="VCLinkerTool" 
    724844      /> 
    725845      <Tool 
  • modules/CheckHelpers/CheckHelpers-2005.vcproj

    raa3965b r806bda2  
    345345    </Configuration> 
    346346    <Configuration 
     347      Name="Distribution|Win32" 
     348      IntermediateDirectory="$(ConfigurationName)" 
     349      ConfigurationType="1" 
     350      > 
     351      <Tool 
     352        Name="VCPreBuildEventTool" 
     353      /> 
     354      <Tool 
     355        Name="VCCustomBuildTool" 
     356      /> 
     357      <Tool 
     358        Name="VCXMLDataGeneratorTool" 
     359      /> 
     360      <Tool 
     361        Name="VCWebServiceProxyGeneratorTool" 
     362      /> 
     363      <Tool 
     364        Name="VCMIDLTool" 
     365      /> 
     366      <Tool 
     367        Name="VCCLCompilerTool" 
     368      /> 
     369      <Tool 
     370        Name="VCManagedResourceCompilerTool" 
     371      /> 
     372      <Tool 
     373        Name="VCResourceCompilerTool" 
     374      /> 
     375      <Tool 
     376        Name="VCPreLinkEventTool" 
     377      /> 
     378      <Tool 
     379        Name="VCLinkerTool" 
     380      /> 
     381      <Tool 
     382        Name="VCALinkTool" 
     383      /> 
     384      <Tool 
     385        Name="VCManifestTool" 
     386      /> 
     387      <Tool 
     388        Name="VCXDCMakeTool" 
     389      /> 
     390      <Tool 
     391        Name="VCBscMakeTool" 
     392      /> 
     393      <Tool 
     394        Name="VCFxCopTool" 
     395      /> 
     396      <Tool 
     397        Name="VCAppVerifierTool" 
     398      /> 
     399      <Tool 
     400        Name="VCWebDeploymentTool" 
     401      /> 
     402      <Tool 
     403        Name="VCPostBuildEventTool" 
     404      /> 
     405    </Configuration> 
     406    <Configuration 
    347407      Name="Distribution|x64" 
    348408      OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\modules" 
     
    714774        ImportLibrary="$(OutDir)/CheckDisk.lib" 
    715775        TargetMachine="17" 
     776      /> 
     777      <Tool 
     778        Name="VCALinkTool" 
     779      /> 
     780      <Tool 
     781        Name="VCManifestTool" 
     782      /> 
     783      <Tool 
     784        Name="VCXDCMakeTool" 
     785      /> 
     786      <Tool 
     787        Name="VCBscMakeTool" 
     788      /> 
     789      <Tool 
     790        Name="VCFxCopTool" 
     791      /> 
     792      <Tool 
     793        Name="VCAppVerifierTool" 
     794      /> 
     795      <Tool 
     796        Name="VCWebDeploymentTool" 
     797      /> 
     798      <Tool 
     799        Name="VCPostBuildEventTool" 
     800      /> 
     801    </Configuration> 
     802    <Configuration 
     803      Name="OP5|Win32" 
     804      IntermediateDirectory="$(ConfigurationName)" 
     805      ConfigurationType="1" 
     806      > 
     807      <Tool 
     808        Name="VCPreBuildEventTool" 
     809      /> 
     810      <Tool 
     811        Name="VCCustomBuildTool" 
     812      /> 
     813      <Tool 
     814        Name="VCXMLDataGeneratorTool" 
     815      /> 
     816      <Tool 
     817        Name="VCWebServiceProxyGeneratorTool" 
     818      /> 
     819      <Tool 
     820        Name="VCMIDLTool" 
     821      /> 
     822      <Tool 
     823        Name="VCCLCompilerTool" 
     824      /> 
     825      <Tool 
     826        Name="VCManagedResourceCompilerTool" 
     827      /> 
     828      <Tool 
     829        Name="VCResourceCompilerTool" 
     830      /> 
     831      <Tool 
     832        Name="VCPreLinkEventTool" 
     833      /> 
     834      <Tool 
     835        Name="VCLinkerTool" 
    716836      /> 
    717837      <Tool 
  • modules/CheckSystem/CheckSystem-2005.vcproj

    raa3965b r806bda2  
    348348    </Configuration> 
    349349    <Configuration 
     350      Name="Distribution|Win32" 
     351      IntermediateDirectory="$(ConfigurationName)" 
     352      ConfigurationType="1" 
     353      > 
     354      <Tool 
     355        Name="VCPreBuildEventTool" 
     356      /> 
     357      <Tool 
     358        Name="VCCustomBuildTool" 
     359      /> 
     360      <Tool 
     361        Name="VCXMLDataGeneratorTool" 
     362      /> 
     363      <Tool 
     364        Name="VCWebServiceProxyGeneratorTool" 
     365      /> 
     366      <Tool 
     367        Name="VCMIDLTool" 
     368      /> 
     369      <Tool 
     370        Name="VCCLCompilerTool" 
     371      /> 
     372      <Tool 
     373        Name="VCManagedResourceCompilerTool" 
     374      /> 
     375      <Tool 
     376        Name="VCResourceCompilerTool" 
     377      /> 
     378      <Tool 
     379        Name="VCPreLinkEventTool" 
     380      /> 
     381      <Tool 
     382        Name="VCLinkerTool" 
     383      /> 
     384      <Tool 
     385        Name="VCALinkTool" 
     386      /> 
     387      <Tool 
     388        Name="VCManifestTool" 
     389      /> 
     390      <Tool 
     391        Name="VCXDCMakeTool" 
     392      /> 
     393      <Tool 
     394        Name="VCBscMakeTool" 
     395      /> 
     396      <Tool 
     397        Name="VCFxCopTool" 
     398      /> 
     399      <Tool 
     400        Name="VCAppVerifierTool" 
     401      /> 
     402      <Tool 
     403        Name="VCWebDeploymentTool" 
     404      /> 
     405      <Tool 
     406        Name="VCPostBuildEventTool" 
     407      /> 
     408    </Configuration> 
     409    <Configuration 
    350410      Name="Distribution|x64" 
    351411      OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\modules" 
     
    722782        ImportLibrary="$(OutDir)/CheckSystem.lib" 
    723783        TargetMachine="17" 
     784      /> 
     785      <Tool 
     786        Name="VCALinkTool" 
     787      /> 
     788      <Tool 
     789        Name="VCManifestTool" 
     790      /> 
     791      <Tool 
     792        Name="VCXDCMakeTool" 
     793      /> 
     794      <Tool 
     795        Name="VCBscMakeTool" 
     796      /> 
     797      <Tool 
     798        Name="VCFxCopTool" 
     799      /> 
     800      <Tool 
     801        Name="VCAppVerifierTool" 
     802      /> 
     803      <Tool 
     804        Name="VCWebDeploymentTool" 
     805      /> 
     806      <Tool 
     807        Name="VCPostBuildEventTool" 
     808      /> 
     809    </Configuration> 
     810    <Configuration 
     811      Name="OP5|Win32" 
     812      IntermediateDirectory="$(ConfigurationName)" 
     813      ConfigurationType="1" 
     814      > 
     815      <Tool 
     816        Name="VCPreBuildEventTool" 
     817      /> 
     818      <Tool 
     819        Name="VCCustomBuildTool" 
     820      /> 
     821      <Tool 
     822        Name="VCXMLDataGeneratorTool" 
     823      /> 
     824      <Tool 
     825        Name="VCWebServiceProxyGeneratorTool" 
     826      /> 
     827      <Tool 
     828        Name="VCMIDLTool" 
     829      /> 
     830      <Tool 
     831        Name="VCCLCompilerTool" 
     832      /> 
     833      <Tool 
     834        Name="VCManagedResourceCompilerTool" 
     835      /> 
     836      <Tool 
     837        Name="VCResourceCompilerTool" 
     838      /> 
     839      <Tool 
     840        Name="VCPreLinkEventTool" 
     841      /> 
     842      <Tool 
     843        Name="VCLinkerTool" 
    724844      /> 
    725845      <Tool 
  • modules/CheckSystem/CheckSystem.cpp

    raa3965b r806bda2  
    390390  MAP_OPTIONS_BEGIN(arguments) 
    391391    MAP_OPTIONS_NUMERIC_ALL(tmpObject, _T("")) 
    392     MAP_OPTIONS_STR(_T("warn"), tmpObject.warn.max) 
    393     MAP_OPTIONS_STR(_T("crit"), tmpObject.crit.max) 
     392    MAP_OPTIONS_STR(_T("warn"), tmpObject.warn.max_) 
     393    MAP_OPTIONS_STR(_T("crit"), tmpObject.crit.max_) 
    394394    MAP_OPTIONS_BOOL_FALSE(IGNORE_PERFDATA, bPerfData) 
    395395    MAP_OPTIONS_STR_AND(_T("time"), tmpObject.data, list.push_back(tmpObject)) 
     
    454454  MAP_OPTIONS_BEGIN(arguments) 
    455455    MAP_OPTIONS_NUMERIC_ALL(bounds, _T("")) 
    456     MAP_OPTIONS_STR(_T("warn"), bounds.warn.min) 
    457     MAP_OPTIONS_STR(_T("crit"), bounds.crit.min) 
     456    MAP_OPTIONS_STR(_T("warn"), bounds.warn.min_) 
     457    MAP_OPTIONS_STR(_T("crit"), bounds.crit.min_) 
    458458    MAP_OPTIONS_BOOL_FALSE(IGNORE_PERFDATA, bPerfData) 
    459459    MAP_OPTIONS_STR(_T("Alias"), bounds.data) 
     
    10411041    MAP_OPTIONS_STR(_T("InvalidStatus"), invalidStatus) 
    10421042    MAP_OPTIONS_STR_AND(_T("Counter"), tmpObject.data, counters.push_back(tmpObject)) 
    1043     MAP_OPTIONS_STR(_T("MaxWarn"), tmpObject.warn.max) 
    1044     MAP_OPTIONS_STR(_T("MinWarn"), tmpObject.warn.min) 
    1045     MAP_OPTIONS_STR(_T("MaxCrit"), tmpObject.crit.max) 
    1046     MAP_OPTIONS_STR(_T("MinCrit"), tmpObject.crit.min) 
     1043    MAP_OPTIONS_STR(_T("MaxWarn"), tmpObject.warn.max_) 
     1044    MAP_OPTIONS_STR(_T("MinWarn"), tmpObject.warn.min_) 
     1045    MAP_OPTIONS_STR(_T("MaxCrit"), tmpObject.crit.max_) 
     1046    MAP_OPTIONS_STR(_T("MinCrit"), tmpObject.crit.min_) 
    10471047    MAP_OPTIONS_BOOL_FALSE(IGNORE_PERFDATA, bPerfData) 
    10481048    MAP_OPTIONS_STR(_T("Alias"), tmpObject.data) 
Note: See TracChangeset for help on using the changeset viewer.