]> Frank Brehm's Git Trees - my-stuff/nagios.git/commitdiff
Objektdefinitionen fertig.
authorFrank Brehm <frank@brehm-online.com>
Sun, 5 Dec 2010 09:50:03 +0000 (09:50 +0000)
committerFrank Brehm <frank@brehm-online.com>
Sun, 5 Dec 2010 09:50:03 +0000 (09:50 +0000)
git-svn-id: http://svn.brehm-online.com/svn/my-stuff/nagios/trunk@141 ec8d2aa5-1599-4edb-8739-2b3a1bc399aa

bin/nagios/cfg/struct.py

index 571d11514524f6593262ee35a005e31e71d06c55..cdf14018ed1ab78c88a2af6f67aaf6938c075fa4 100755 (executable)
@@ -179,6 +179,10 @@ class NagiosConfigStruct(object):
                 argval = checktype_tupel[1][argkey]
                 args[argkey] = argval
 
+        if args['deprecated']:
+            self.logger.warn( "Using of a deprecated {0} property {1!r} in {2!r}({3}).".format(
+                object_type, key, file, rownum) )
+
         try:
             res = verifier.verify_property( value, checktype_tupel[0], args )
         except NagiosVerifyError as e:
@@ -205,8 +209,8 @@ Returns None if the key is invalid."""
                 'max_check_attempts':           ( 'int',      None ),
                 'check_interval':               ( 'int',      None ),
                 'retry_interval':               ( 'int',      None ),
-                'normal_check_interval':        ( 'int',      None ),
-                'retry_check_interval':         ( 'int',      None ),
+                'normal_check_interval':        ( 'int',      { 'deprecated': True, } ),
+                'retry_check_interval':         ( 'int',      { 'deprecated': True, } ),
                 'active_checks_enabled':        ( 'bool',     None ),
                 'passive_checks_enabled':       ( 'bool',     None ),
                 'check_period':                 ( 'string',   None ),
@@ -253,11 +257,11 @@ Returns None if the key is invalid."""
                 'max_check_attempts':           ( 'int',      None ),
                 'check_interval':               ( 'int',      None ),
                 'retry_interval':               ( 'int',      None ),
-                'normal_check_interval':        ( 'int',      None ),
-                'retry_check_interval':         ( 'int',      None ),
+                'normal_check_interval':        ( 'int',      { 'deprecated': True, } ),
+                'retry_check_interval':         ( 'int',      { 'deprecated': True, } ),
                 'active_checks_enabled':        ( 'bool',     None ),
                 'passive_checks_enabled':       ( 'bool',     None ),
-                'parallelize_check':            ( 'bool',     None ),
+                'parallelize_check':            ( 'bool',     { 'deprecated': True, } ),
                 'check_period':                 ( 'string',   None ),
                 'failure_prediction_enabled':   ( 'bool',     None ),
                 'obsess_over_service':          ( 'bool',     None ),
@@ -364,6 +368,47 @@ Returns None if the key is invalid."""
                 'escalation_period':     ( 'string',   None ),
                 'escalation_options':    ( 'set',      { 'valid_values': set( [ 'w', 'u', 'c', 'r' ] ) } ), #[w,u,c,r]
             },
+            'hostdependency': {
+                'dependent_host_name':           ( 'array',    None ),
+                'dependent_hostgroup_name':      ( 'array',    None ),
+                'host_name':                     ( 'array',    None ),
+                'hostgroup_name':                ( 'array',    None ),
+                'inherits_parent':               ( 'bool',     None ),
+                'execution_failure_criteria':    ( 'set',      { 'valid_values': set( [ 'o', 'd', 'u', 'p', 'n' ] ) } ), #[o,d,u,p,n]
+                'notification_failure_criteria': ( 'set',      { 'valid_values': set( [ 'o', 'd', 'u', 'p', 'n' ] ) } ), #[o,d,u,p,n]
+                'dependency_period':             ( 'string',   None ),
+            },
+            'hostescalation': {
+                'host_name':             ( 'string',    None ),
+                'hostgroup_name':        ( 'array',    None ),
+                'contacts':              ( 'array',    None ),
+                'contact_groups':        ( 'array',    None ),
+                'first_notification':    ( 'int',      None ),
+                'last_notification':     ( 'int',      None ),
+                'notification_interval': ( 'int',      None ),
+                'escalation_period':     ( 'string',   None ),
+                'escalation_options':    ( 'set',      { 'valid_values': set( [ 'd', 'u', 'r' ] ) } ), #[d,u,r]
+            },
+            'hostextinfo': {
+                'host_name':       ( 'string',   None ),
+                'notes':           ( 'string',   None ),
+                'notes_url':       ( 'string',   None ),
+                'action_url':      ( 'string',   None ),
+                'icon_image':      ( 'string',   None ),
+                'icon_image_alt':  ( 'string',   None ),
+                'vrml_image':      ( 'string',   None ),
+                'statusmap_image': ( 'string',   None ),
+                '2d_coords':       ( 'intarray', { 'count_min': 2, 'count_max': 2 } ),
+                '3d_coords':       ( 'intarray', { 'count_min': 3, 'count_max': 3 } ),
+            },
+            'serviceextinfo': {
+                'host_name':                    ( 'array',    None ),
+                'service_description':          ( 'string',   None ),
+                'notes':                        ( 'string',   None ),
+                'notes_url':                    ( 'string',   None ),
+                'icon_image':                   ( 'string',   None ),
+                'icon_image_alt':               ( 'string',   None ),
+            },
         }
         
         if object_type not in key_def: