Filter:   InfoImg
download entityProps.py
Language: Python
LOC: 152
Project Info
QOS
Server: SourceForge
Type: cvs
[Show Code]






[Show Code]
...ge\q\qos\qos\qos\qosserver\
   auth_handler.py
   BaseObject.py
   collector.py
   ConfData.db.orig
   config_server.py
   counter.py
   DataLogFile.py
   default_handler.py
   downtimer.py
   englishUnits.py
   entityHeaders.py
   entityProps.py
   event_loop.py
   http_date.py
   http_server.py
   log.py
   logger.py
   m_syslog.py
   medusa_gif.py
   monitor.py
   normalDate.py
   pop.py
   Process.py
   producers.py
   qos.db.seed
   qos_server.py
   qosreport.py
   qosserver.init
   rangefind.py
   report_server.py
   reportData.py
   reportDowntime.py
   reportMultiDowntime.py
   reportMultiplot.py
   rpc_server.py
   sendmail.py
   StateDb.py
   status_handler.py

#
# entityProps.py -- Entity property listings
#
# Doug White
#
# This and the entityHeaders module should be merged with the entity code
# itself instead of maintaining this metadata externally.

# How this works:
# If a entity has a key in this dictionary, it will list the properties
# that affect that entity's operation. If there is no key, the DEFAULT
# key has the standard two entity properties (status, triggers).
#
# Inside of the entity key is a dictionary of properties. The associated
# values have the following characteristics:
#
#  . List: Set of valid values for the key ('on', 'off')
#  . Dictionary: Property accepts a table of entries; if the dictionary
#    is populated then those are the valid values.  An empty dictionary
#    indicates there is no defined properties in that subtable.
#  . Empty string: Accepts arbitrary text value
#
# Optional items must be listed in the magic key 'optional'.
#
# The magic key 'subents' means the Entity has a subentity list, and the
# definitions in the key are the format for each subentity entry.
#
# Implied properties:
# . The top-level Entity property list has 'type'
# . each subentity has 'name'
#
# Problems:
#  . optional properties like 'notify'
#  . Handling things with implied units (like triggers)
#  . Boolean keys (present=active), a deriviative case of optional props

properties = {
    'DEFAULT' : {
    'status': ['on', 'off'],
    'triggers': {'level':['critical','warn','info'],
                 'trigger':'',
                 }
    },

    'Cpu' : {
    'status': ['on', 'off'],
    'triggers': {'level':['critical','warn','info'],
                 'trigger':'',
                 }
    },

    'Mem' : {
    'status': ['on', 'off'],
    'triggers': {'level':['critical','warn','info'],
                 'trigger':'',
                 }
    },

    'Disk' : {
    'status': ['on', 'off'],
    'triggers': {'level':['critical','warn','info'],
                 'trigger':'',
                 }
    },

    'Command' : {
    'subents': {'name':'',
                'status':['on', 'off'],
                'badMesg':'',
                'command':'',
                'goodMesg':'',
                'triggers': {'level':['critical','warn','info'],
                             'trigger':'',
                             },
                },
    },

    'DirQue' : {
    'status': ['on', 'off'],
    'subents': {'name':'',
                'status':['on', 'off'],
                'dir':'',
                'triggers': {'level':['critical','warn','info'],
                             'trigger':'',
                             },
                },
    },

    'DNS' : {
    'subents': {'name':'',
                'optional':['seconds'],
                'status':['on', 'off'],
                'dnsName':'',
                'ipAddress':'',
                'seconds':'', # optional
                'Server':'',
                'triggers': {'level':['critical','warn','info'],
                             'trigger':'',
                             },
                },
    },

    'OraTbSpc' : {
    'status': ['on', 'off'],
    'OraHome':'',
    'OraSID':'',
    'OraUserPass':'',
    'triggers': {'level':['critical','warn','info'],
                 'trigger':'',
                 }
    },

    'Ping' : {
    'subents':{'status':['on', 'off'],
               'pingHost':'',
               'triggers': {'level':['critical','warn','info'],
                            'trigger':'',
                            },
               },
    },

    'Snmp' : {
    'subents': {'name':'',
                'status':['on', 'off'],
                'community':'',
                'host':'',
                'oid':'',
                'triggers': {'level':['critical','warn','info'],
                             'trigger':'',
                             },
                },
    },
    
    'Tcp' : {
    'subents':{'name':'',
                'optional': ['goodPhrase','tcpHelo',],
               'status':['on', 'off'],
               'goodPhrase':'', # optional
               'tcpHelo':'', #optional
               'tcpHost':'',
               'tcpPort':'',
               'triggers': {'level':['critical','warn','info'],
                            'trigger':'',
                            },
               },
    },

    'Transaction' : {
    'subents':{'optional': ['goodPhrase','tcpHelo',],
               'name':'',
               'status':['on', 'off'],
               'startUrl':'',
               'steps': { 'action':'',
                          'fields':'', # magic!
                          'goodPhrase':'',
                          'method':['get','post'],
                          },
               'triggers': {'level':['critical','warn','info'],
                            'trigger':'',
                            },
               },
    },

    
    'Web' : {
    'subents':{'optional': ['auth','cookie','errorPhrase','goodPhrase','noHostPing','webPort',],
               'name':'',
               'status':['on', 'off'],
               'auth':'', # optional
               'cookie':'', # optional
               'errorPhrase':'', # optional
               'goodPhrase':'', # optional
               'noHostPing':'', # boolean
               'webHost':'',
               'webPort':'', # optional
               'webUrl':'',
               'triggers': {'level':['critical','warn','info'],
                            'trigger':'',
                            },
               },
    },

    'WebSsl' : {
    'subents':{'optional': ['auth','cookie','errorPhrase','goodPhrase','noHostPing','sslCertFile','sslKeyFile','webPort',],
               'name':'',
               'status':['on', 'off'],
               'auth':'', # optional
               'cookie':'', # optional
               'errorPhrase':'', # optional
               'goodPhrase':'', # optional
               'noHostPing':'', # boolean
               'sslCertFile':'', # optional
               'sslKeyFile':'', # optional
               'webHost':'',
               'webPort':'', # optional
               'webUrl':'',
               'triggers': {'level':['critical','warn','info'],
                            'trigger':'',
                            },
               },
    },

# end of file
}