Exemple #1
0
class IPrintGraphPointInfo(IGraphPointInfo):
    """
    Adapts Print Graph Points
    """
    vname = schema.TextLine(title=_t(u'Vname'))
    format = schema.TextLine(title=_t(u'Format'))
    strftime = schema.TextLine(title=_t(u'Strftime'))
Exemple #2
0
class IProcessDataSourceInfo(IInfo):
    '''
    Info interface for ProcessDataSource.

    Extends IInfo instead of IRRDDataSourceInfo because we want to
    reduce the set of options available.
    '''

    newId = schema.TextLine(title=_t(u'Name'),
                            xtype='idfield',
                            description=_t(u'The name of this datasource'))

    type = schema.TextLine(title=_t(u'Type'), readonly=True)

    enabled = schema.Bool(title=_t(u'Enabled'))

    severity = schema.TextLine(title=_t(u'Severity'),
                               group=_t(u'Event Information'),
                               readonly=True)

    eventClass = schema.TextLine(title=_t(u'Event Class'),
                                 group=_t(u'Event Information'),
                                 readonly=True)

    component = schema.TextLine(title=_t(u'Component'),
                                group=_t(u'Event Information'),
                                readonly=True)
Exemple #3
0
class IFanInfo(IComponentInfo):
    """
    Info adapter for Fan components.
    """
    state = schema.TextLine(title=u'State', group='Overview', readonly=True)
    type = schema.TextLine(title=u'Type', group='Overview', readonly=True)
    rpm = schema.Int(title=u'RPM', group='Overview', readonly=True)
Exemple #4
0
class IHadoopServiceNodeInfo(IComponentInfo):
    '''
    API Info interface for HadoopServiceNode.
    '''
    device = schema.Entity(title=_t(u'Device'))
    node_type = schema.TextLine(title=_t(u'Node Type'))
    health_state = schema.TextLine(title=_t(u'Health State'))
Exemple #5
0
class IIpInterfaceInfo(IComponentInfo):
    """
    Info adapter for IPInterface components.
    """
    interfaceName = schema.TextLine(title=_t(u"Interface Name"),
                                    group="Overview",
                                    order=1)

    description = schema.Text(title=_t(u"Description"),
                              group="Overview",
                              order=2)

    adminStatus = schema.TextLine(title=_t(u"Administrative Status"),
                                  group="Overview",
                                  readonly=True,
                                  order=3)

    operStatus = schema.TextLine(title=_t(u"Operational Status"),
                                 group="Overview",
                                 readonly=True,
                                 order=4)

    status = schema.TextLine(
        title=_t(u"Status"),
        group="Overview",
        description=u"Are there any active status events for this component?"
        u" for this component?",
        readonly=True,
        order=5)

    ipAddress = schema.Entity(title=_t(u"IP Address (Primary)"),
                              group="Overview",
                              description=u"Primary IP address",
                              order=6)

    ipAddresses = schema.List(title=_t(u'IP Addresses (All)'),
                              group="Details",
                              order=7)

    macaddress = schema.TextLine(title=_t(u"MAC Address"),
                                 group="Details",
                                 order=8)

    type = schema.TextLine(title=_t(u"Type"), group="Details", order=9)

    speed = schema.TextLine(title=_t(u"Speed"),
                            group="Details",
                            readonly=True,
                            order=10)

    duplex = schema.TextLine(title=_t(u"Duplex Mode"),
                             group="Details",
                             readonly=True,
                             order=11)

    mtu = schema.TextLine(title=_t(u"MTU"), group="Details", order=12)

    ifindex = schema.TextLine(title=_t(u"SNMP Index"),
                              group="Details",
                              order=13)
class IHttpBinActionContentInfo(IInfo):
    hbSource = schema.TextLine(title=_t(u"Source"),
                               description=_t(u"Source Field"),
                               default=u"Zenoss")

    hbEventClass = schema.TextLine(title=_t(u"Event Class"),
                                   description=_t(u"event_class Field"),
                                   default=u"${evt/eventClass}")

    hbDescription = schema.TextLine(title=_t(u"Short Description"),
                                    description=_t(u"Short description Field"),
                                    default=u"${evt/summary}")

    hbFullDescription = schema.Text(
        title=_t(u"Full description"),
        description=_t(u"Full multiline description"),
        default=u'\n'.join([
            "device=${evt/tag}",
            "deviceTitle=${dev/titleOrId}",
            "componentTitle=${component/titleOrId}",
            "collector=${evt/monitor}",
            "message=${evt/message}",
        ]))

    skipfails = schema.Bool(
        title=_t(u"Skip fails in TALES evaluation?"),
        description=_t(u"Skip bad TALES expression"),
        default=True,
    )
class IEnclosureInfo(IComponentInfo):
    enclosure_status = schema.TextLine(title=_t(u'Enclosure Status'))
    error_status = schema.TextLine(title=_t(u'Error Status'))
    parent_id = schema.TextLine(title=_t(u'Parent Enclosure ID'))
    docked_id = schema.TextLine(title=_t(u'Docked Enclosure ID'))
    temperature_sensor_count = schema.Int(
        title=_t(u'Number of Temperature Sensors'))
class IXenServerXenAPIDataPointInfo(IDataPointInfo):
    '''
    API Info interface for XenServerXenAPIDataPoint.
    '''

    path = schema.TextLine(title=_t(u'Path'))
    rpn = schema.TextLine(title=_t(u'RPN'))
class IServiceDataSourceInfo(IInfo):
    """
    Provide the UI information for the WinRS Service datasource.
    """
    newId = schema.TextLine(title=_t(u'Name'),
                            xtype="idfield",
                            description=_t(u'The name of this datasource'))
    type = schema.TextLine(title=_t(u'Type'), readonly=True)
    enabled = schema.Bool(title=_t(u'Enabled'))

    severity = schema.TextLine(title=_t(u'Severity'), xtype='severity')

    reindex = schema.Bool(title=_t(
        'Update services immediately.  This could take several minutes to complete.'
    ))

    cycletime = schema.TextLine(title=_t(u'Cycle Time (seconds)'))

    alertifnot = schema.Choice(
        group=_t('Service Status'),
        title=_t('Alert if service is NOT in this state'),
        vocabulary=SimpleVocabulary.fromValues([STATE_RUNNING, STATE_STOPPED]),
    )

    startmode = schema.Text(group=_t('Service Options'),
                            xtype='startmodegroup')

    in_exclusions = schema.TextLine(
        group=_t('Service Options'),
        title=_t(
            'Inclusions(+)/Exclusions(-) separated by commas.  Regex accepted')
    )
Exemple #10
0
class IOSProcessInfo(IComponentInfo):
    """
    Info adapter for OSProcess components.
    """
    processClass = schema.Entity(title=_t(u"Process Class"),
                                 group="Overview",
                                 order=1)
    getMonitoredProcesses = schema.TextLine(
        title=u"Process(es) identified by the most recent model",
        group="Details",
        readonly=True,
        order=-1)
    processName = schema.TextLine(title=_t(u"Process Set Name"),
                                  group="Overview",
                                  readonly=True,
                                  order=-1)
    description = schema.Text(title=_t(u"Description"),
                              group="Overview",
                              readonly=True,
                              order=2)
    alertOnRestart = schema.Bool(title=_t(u"Alert on Restart"),
                                 group="Details",
                                 alwaysEditable=True)
    failSeverity = schema.Int(title=_t(u"Fail Severity"),
                              xtype="severity",
                              group="Details",
                              alwaysEditable=True)
    minProcessCount = schema.Int(title=u"Min Process Count",
                                 group="Details",
                                 alwaysEditable=True)
    maxProcessCount = schema.Int(title=u"Max Process Count",
                                 group="Details",
                                 alwaysEditable=True)
class IFileSystemInfo(IComponentInfo):
    """
    Info adapter for FileSystem components.
    """
    mount = schema.TextLine(title=u"Mount Point", group="Overview", order=-1)
    storageDevice = schema.TextLine(title=u"Storage Device", group="Details")
    type = schema.TextLine(title=u"Type", group="Details")
    blockSize = schema.Int(title=u"Block Size", group="Details")
    totalBlocks = Attribute("Total Blocks")
    totalBytes = schema.Int(title=u"Total Bytes",
                            readonly=True,
                            group="Details")
    usedBytes = schema.Int(title=u"Used Bytes", readonly=True, group="Details")
    availableBytes = schema.Int(title=u"Available Bytes",
                                readonly=True,
                                group="Details")
    capacityBytes = schema.Int(title=u"Capacity Bytes",
                               readonly=True,
                               group="Details")
    totalFiles = schema.Int(title=u"Total Files", group="Details")
    availableFiles = schema.Int(title=u"Available Files",
                                readonly=True,
                                group="Details")
    capacityFiles = schema.Int(title=u"Capacity Files",
                               readonly=True,
                               group="Details")
    maxNameLength = schema.Int(title=u"Maximum Name Length", group="Details")

    mediatype = schema.TextLine(title=_t(u'Media Type'), readonly=True)
class IRPCMonitorDataSourceInfo(IRRDDataSourceInfo):
    cycletime = schema.Int(title=_t(u'Cycle Time (seconds)'))
    rpcServer = schema.TextLine(title=_t(u'RPC Server'))
    rpcCommand = schema.TextLine(title=_t(u'RPC Command'))
    port = schema.Int(title=_t(u'Port'))
    protocol = schema.Choice(title=_t(u'Protocol'),
                             vocabulary="rpcMonitorProtocolVocabulary")
class IZenPackCodeInfo(IComponentInfo):
    '''
    API Info interface for ZenPackCodeContainer.
    '''

    path = schema.TextLine(title=_t(u'Path'))
    zenpack_state = schema.TextLine(title=_t(u'Tests status'))
Exemple #14
0
class IColorGraphPointInfo(IGraphPointInfo):
    """
    Abstract interface for every graph point that has a color field
    """
    color = schema.TextLine(title=_t('Color (Hex value RRGGBB)'),
                            vtype='hexnumber')
    legend = schema.TextLine(title=_t('Legend'))
class IHadoopDataNodeInfo(IComponentInfo):
    '''
    API Info interface for HadoopDataNode.
    '''
    device = schema.Entity(title=_t(u'Device'))
    health_state = schema.TextLine(title=_t(u'Health State'))
    last_contacted = schema.TextLine(title=_t(u'Last Contacted'))
    hbase_device = schema.TextLine(title=_t(u'HBase Device'))
Exemple #16
0
class IZooKeeperInfo(IComponentInfo):
    '''
    API Info interface for ZooKeeper.
    '''
    mode = schema.TextLine(title=_t(u'Mode'))
    node_count = schema.TextLine(title=_t(u'Node Count'))
    zookeeper_version = schema.TextLine(title=_t(u'ZooKeeper Version'))
    zxid = schema.TextLine(title=_t(u'Zxid'))
Exemple #17
0
class IBaseComponentInfo(IComponentInfo):
    '''
    Abstract base API Info interface for components.
    '''

    endpoint = schema.Entity(title=_t('Endpoint'))
    xenapi_ref = schema.TextLine(title=_t(u'XenAPI Reference'))
    xenapi_uuid = schema.TextLine(title=_t(u'XenAPI UUID'))
class InrpeComponentInfo(IComponentInfo):
    title = schema.TextLine(title=_t(u"Title"))
    nrpe_cmd = schema.TextLine(title=_t(u"Command"))
    nrpe_args = schema.TextLine(title=_t(u"Arguments"))
    nrpe_timeout = schema.Int(title=_t(u"Timeout"))
    nrpe_min = schema.Int(title=_t(u"Min Threshold"))
    nrpe_max = schema.Int(title=_t(u"Max Threshold"))
    nrpe_type = schema.Int(title=_t(u"Check type"))
Exemple #19
0
class IEndpointInfo(IDeviceInfo):
    username = schema.TextLine(title=_t(u"Username"))
    project_id = schema.TextLine(title=_t(u"Project ID"))
    auth_url = schema.TextLine(title=_t(u"Auth URL"))
    region_name = schema.TextLine(title=_t(u"Region Name"))
    serverCount = schema.Int(title=_t(u"Total Servers"))
    flavorCount = schema.Int(title=_t(u"Total Flavors"))
    imageCount = schema.Int(title=_t(u"Total Images"))
Exemple #20
0
class IExpansionCardInfo(IComponentInfo):
    """
    Info adapter for ExpansionCard components.
    """
    slot = schema.TextLine(title=_t(u'Slot'), group='Overview', readonly=True)
    serialNumber = schema.TextLine(title=_t(u'Serial Number'), readonly=True)
    product = schema.Entity(title=_t(u'Model'), readonly=True)
    manufacturer = schema.Entity(title=_t(u'Manufacturer'), readonly=True)
Exemple #21
0
class IDigMonitorDataSourceInfo(IRRDDataSourceInfo):
    timeout = schema.Int(title=_t(u'Timeout (seconds)'))
    cycletime = schema.Int(title=_t(u'Cycle Time (seconds)'))
    dnsServer = schema.TextLine(title=_t(u'DNS Server'))
    recordName = schema.TextLine(title=_t(u'Record Name'))
    port = schema.Int(title=_t(u'Port'))
    recordType = schema.Choice(title=_t(u'Record Type'),
                               vocabulary="dnsMonitorRecordTypeVocabulary")
Exemple #22
0
class INtpMonitorDataSourceInfo(IRRDDataSourceInfo):
    timeout = schema.Int(title=_t(u'Timeout (seconds)'))
    cycletime = schema.TextLine(title=_t(u'Cycle Time (seconds)'))
    hostname = schema.TextLine(title=_t(u'Host Name'),
                               group=_t(u'Ntp'))
    warning = schema.Int(title=_t(u'Warning Response Time (seconds)'),
                           group=_t(u'Ntp'))
    critical = schema.Int(title=_t(u'Critical Response Time (seconds)'),
                           group=_t(u'Ntp'))
Exemple #23
0
class IWinPerfDataSourceInfo(IInfo):
    name = schema.TextLine(title=_t(u"Name"),
                           xtype="idfield",
                           description=_t(u"The name of this datasource"))
    type = schema.TextLine(title=_t(u"Type"), readonly=True)
    counter = schema.TextLine(
        title=_t(u"Perf Counter"),
        description=_t(u"Example: \Memory\Available bytes "))
    enabled = schema.Bool(title=_t(u"Enabled"))
Exemple #24
0
class ICiscoEnvMonVoltageSensorInfo(IComponentInfo):
    """ CiscoEnvMonVoltageSenso Interface """

    lv_threshold_string = schema.TextLine(
        title=_t(u'Low Voltage Shutdown Threshold'))
    voltage_threshold_high = schema.TextLine(
        title=_t(u'High Voltage Shutdown Threshold'))
    voltage_last_shutdown = schema.TextLine(
        title=_t(u'Voltage reading at last emergency shutdown'))
Exemple #25
0
class IEC2AccountInfo(IDeviceInfo):
    '''
    API Info interface for EC2Account.
    '''

    ec2accesskey = schema.TextLine(title=_t(u'EC2 Access Key'))
    ec2secretkey = schema.TextLine(title=_t(u'EC2 Secret Key'))
    linuxDeviceClass = schema.Entity(title=_t(u'Linux Device Class'))
    windowsDeviceClass = schema.Entity(title=_t(u'Windows Device Class'))
class ICommandDataSourceInfo(IBasicDataSourceInfo):
    """
    Adapts basic datasource infos of type CMD
    """
    usessh = schema.Bool(title=_t(u'Use SSH'))
    component = schema.TextLine(title=_t(u'Component'))
    eventKey = schema.TextLine(title=_t(u'Event Key'))
    commandTemplate = schema.Text(title=_t(u'Command Template'),
                                  xtype='twocolumntextarea')
class IAggregateInfo(IComponentInfo):
    aggr_name = schema.TextLine(title=_t('Aggregate Name'))
    aggr_state = schema.TextLine(title=_t('Aggregate State'))
    mount_state = schema.TextLine(title=_t('Mount State'))
    raid_size = schema.Int(title=_t('RAID Size'))
    raid_status = schema.TextLine(title=_t('RAID Status'))
    disk_count = schema.Int(title=_t('Disk Count'))
    volume_count = schema.Int(title=_t('Volume Count'))
    plex_count = schema.Int(title=_t('Plex Count'))
    total_bytes = schema.Int(title=_t('Total Bytes'))
Exemple #28
0
class IPortCheckDataSourceInfo(IRRDDataSourceInfo):
    """
    Provide the UI information for the PortCheck datasource.
    """

    cycletime = schema.TextLine(title=_t(u'Cycle Time (seconds)'))

    strategy = schema.TextLine(group=_t('Port Check'),
                               title=_t('Port Check'),
                               xtype='portcheck')
class ISNMPDataSourceInfo(IInfo):
    """
    Adaps a basic Datasource of type SNMP
    """
    newId = schema.TextLine(title=_t(u'Name'),
                            xtype="idfield",
                            description=_t(u'The name of this datasource'))
    type = schema.TextLine(title=_t(u'Type'), readonly=True)
    oid = schema.TextLine(title=_t(u'OID'))
    enabled = schema.Bool(title=_t(u'Enabled'))
Exemple #30
0
class IShellDataSourceInfo(IRRDDataSourceInfo):
    """
    Provide the UI information for the Shell datasource.
    """

    cycletime = schema.TextLine(title=_t(u'Cycle Time (seconds)'))

    strategy = schema.TextLine(group=_t(WINRS_SOURCETYPE),
                               title=_t('Strategy'),
                               xtype='winrsstrategy')