class IHttpMonitorDataSourceInfo(IRRDDataSourceInfo): timeout = schema.Int(title=_t(u'Timeout (seconds)')) cycletime = schema.Int(title=_t(u'Cycle Time (seconds)')) hostname = schema.TextLine(title=_t(u'Host Name'), group=_t('HTTP Monitor')) port = schema.Int(title=_t(u'Port'), group=_t('HTTP Monitor')) ipAddress = schema.TextLine(title=_t(u'IP Address or Proxy Address'), group=_t('HTTP Monitor')) url = schema.TextLine(title=_t(u'URL'), group=_t('HTTP Monitor')) useSsl = schema.Bool(title=_t(u'Use SSL?'), group=_t('HTTP Monitor')) regex = schema.TextLine(title=_t(u'Regular Expression'), group=_t('HTTP Monitor')) caseSensitive = schema.Bool(title=_t(u'Case Sensitive'), group=_t('HTTP Monitor')) basicAuthUser = schema.TextLine(title=_t(u'Basic Auth User'), group=_t('HTTP Monitor')) invert = schema.Bool(title=_t(u'Invert Expression'), group=_t('HTTP Monitor')) basicAuthPass = schema.Password(title=_t(u'Basic Auth Password'), group=_t('HTTP Monitor')) onRedirect = schema.Choice(title=_t(u'Redirect Behavior'), vocabulary='httpMonitorRedirectVocabulary', group=_t('HTTP Monitor')) proxyAuthUser = schema.TextLine(title=_t(u'Proxy User'), group=_t('Proxy Credentials')) proxyAuthPassword = schema.Password(title=_t(u'Proxy Password'), group=_t('Proxy Credentials'))
class IMailTxDataSourceInfo(IRRDDataSourceInfo): cycleTime = schema.Int(title=_t(u'Cycle Time (seconds)')) timeout = schema.Int(title=_t(u"Timeout (seconds)")) toAddress = schema.TextLine(title=_t(u"To Address")) fromAddress = schema.TextLine(title=_t(u"From Address")) messageBody = schema.TextLine(title=_t(u'Message Body'), xtype="twocolumntextarea") # SMTP fields smtpHost = schema.TextLine(title=_t(u'SMTP Host'), group=_t(u'SMTP')) smtpPort = schema.Int(title=_t(u'SMTP Port'), group=_t(u'SMTP')) smtpUsername = schema.TextLine(title=_t(u'SMTP Username'), group=_t(u'SMTP')) smtpPassword = schema.Password(title=_t(u'SMTP Password'), group=_t(u'SMTP')) smtpAuth = schema.Choice(title=_t(u'Transport Security'), vocabulary="transportSecurity", group=_t(u'SMTP')) # POP fields popHost = schema.TextLine(title=_t(u'POP Host'), group=_t(u'POP')) popPort = schema.Int(title=_t(u'POP Port'), group=_t(u'POP')) popUsername = schema.TextLine(title=_t(u'POP Username'), group=_t(u'POP')) popPassword = schema.Password(title=_t(u'POP Password'), group=_t(u'POP')) popAuth = schema.Choice(title=_t(u'Transport Security'), vocabulary="transportSecurity", group=_t(u'POP')) popAllowInsecureLogin = schema.Bool(title=_t(u'Allow Insecure Logins?'), group=_t(u'POP'))
class IAltEmailHostActionContentInfo(IEmailActionContentInfo): email_from = schema.Text( title=_t(u'From Address for Emails'), description=_t( u'The user from which the e-mail originated on the Zenoss server.' ), default=u'*****@*****.**') host = schema.Text( title=_t(u'SMTP Host'), description=_t(u'Simple Mail Transport Protocol (aka E-mail server).'), ) port = schema.Int( title=_t(u'SMTP Port (usually 25)'), description=_t( u'TCP/IP port to access Simple Mail Transport Protocol (aka E-mail server).' ), default=25) useTls = schema.Bool( title=_t(u'Use TLS?'), description=_t(u'Use Transport Layer Security for E-mail?'), default=False) user = schema.Text( title=_t(u'SMTP Username (blank for none)'), description=_t(u'Use this only if authentication is required.'), ) password = schema.Password( title=_t(u'SMTP Password (blank for none)'), description=_t(u'Use this only if authentication is required.'), )
class IMySqlMonitorDataSourceInfo(IBasicDataSourceInfo): usessh = schema.Bool(title=_t(u"Use SSH")) cycletime = schema.Int(title=_t(u'Cycle Time (seconds)')) timeout = schema.Int(title=_t(u'Timeout (seconds)')) hostname = schema.TextLine(title=_t(u'MySQL Host'), group=_t(u'MySQL')) username = schema.TextLine(title=_t(u'MySQL Username'), group=_t(u'MySQL')) port = schema.TextLine(title=_t(u'MySQL Port'), group=_t(u'MySQL')) password = schema.Password(title=_t(u'MySQL Password'), group=_t(u'MySQL')) versionFivePlus = schema.Bool(title=_t(u'MySQL Version 5+'), group=_t(u'MySQL'))
class ILDAPMonitorDataSourceInfo(IRRDDataSourceInfo): cycletime = schema.Int(title=_t(u'Cycle Time (seconds)')) timeout = schema.Int(title=_t(u'Timeout (seconds)')) ldapServer = schema.TextLine(title=_t(u'LDAP Server'), group=_t(u'LDAP')) ldapBindDN = schema.TextLine(title=_t(u'Bind Distinguished Name'), group=_t(u'LDAP')) useSSL = schema.Bool(title=_t(u'Use SSL?'), group=_t(u'LDAP')) ldapBaseDN = schema.TextLine(title=_t(u'Base Distinguished Name'), group=_t(u'LDAP')) ldapBindVersion = schema.TextLine(title=_t(u'Bind Version'), group=_t(u'LDAP')) ldapBindPassword = schema.Password(title=_t(u'Bind Password'), group=_t(u'LDAP')) port = schema.Int(title=_t(u'Port'), group=_t(u'LDAP'))
class IHttpMonitorDataSourceInfo(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('HTTP Monitor')) port = schema.Int(title=_t(u'Port'), group=_t('HTTP Monitor')) ipAddress = schema.TextLine(title=_t(u'IP Address or Proxy Address'), group=_t('HTTP Monitor')) url = schema.TextLine(title=_t(u'URL'), group=_t('HTTP Monitor')) useSsl = schema.Bool(title=_t(u'Use SSL?'), group=_t('HTTP Monitor')) basicAuthUser = schema.TextLine(title=_t(u'Basic Auth User'), group=_t('HTTP Monitor')) basicAuthPass = schema.Password(title=_t(u'Basic Auth Password'), group=_t('HTTP Monitor')) onRedirect = schema.Bool(title=_t(u'Follow redirect?'), group=_t('HTTP Monitor')) proxyAuthUser = schema.TextLine(title=_t(u'Proxy User'), group=_t('Proxy Credentials')) proxyAuthPassword = schema.Password(title=_t(u'Proxy Password'), group=_t('Proxy Credentials'))
class ISplunkDataSourceInfo(IBasicDataSourceInfo): timeout = schema.Int(title=_t(u"Timeout (seconds)")) component = schema.Text(title=_t(u"Component")) eventKey = schema.Text(title=_t(u"Event Key")) splunkServer = schema.Text(title=_t(u"Splunk Server"), group=_t('Splunk')) splunkUsername = schema.Text(title=_t(u"Splunk Username"), group=_t('Splunk')) splunkPort = schema.Int(title=_t(u"Splunk Port"), group=_t('Splunk')) splunkPassword = schema.Password(title=_t(u"Splunk Password"), group=_t('Splunk')) splunkSearch = schema.Text(title=_t(u"Search"), group=_t('Splunk'))
class ISNMPv3ActionContentInfo(ISnmpTrapActionContentInfo): # hide unused fields version = schema.Text(title=_t(u''), xtype="hidden") community = schema.Text(title=_t(u''), xtype="hidden") securityEngineId = schema.TextLine(title=_t(u'Security Engine ID'), default=u'0x0102030405') contextEngineId = schema.TextLine(title=_t(u'Context Engine ID'), ) contextName = schema.TextLine(title=_t(u'Context Name')) authProto = schema.Choice(title=_t(u"Authentication Protocol"), vocabulary=SimpleVocabulary.fromValues( ['None', 'MD5', 'SHA']), default=_t(u'None')) securityName = schema.TextLine(title=_t(u'Security Name')) securityPassphrase = schema.Password(title=_t(u'Security Passphrase')) privProto = schema.Choice(title=_t(u"Privacy Protocol"), vocabulary=SimpleVocabulary.fromValues( ['None', 'DES', 'AES']), default=_t(u'None')) privacyPassphrase = schema.Password(title=_t(u'Privacy Passphrase'))
class IJMXDataSourceInfo(IRRDDataSourceInfo): # Connection Info jmxPort = schema.TextLine( title=_t(u'Management Port'), group=_t(u'JMX Connection and Metadata Infomation')) jmxProtocol = schema.Choice( title=_t(u'Protocol'), group=_t(u'JMX Connection and Metadata Infomation'), vocabulary='jmxProtocolVocabulary') jmxRawService = schema.TextLine( title=_t(u'Raw Service URL (advanced users only)'), group=_t(u'JMX Connection and Metadata Infomation')) rmiContext = schema.TextLine( title=_t(u'RMI Context (URL context when using RMI Protocol)'), group=_t(u'JMX Connection and Metadata Infomation')) objectName = schema.TextLine( title=_t(u'Object Name'), group=_t(u'JMX Connection and Metadata Infomation')) # Authentication username = schema.TextLine( title=_t(u'Username'), group=_t(u'JMX Remote Authentication Information')) authenticate = schema.TextLine( title=_t(u'Auth Enabled'), group=_t(u'JMX Remote Authentication Information')) password = schema.Password( title=_t(u'Password'), group=_t(u'JMX Remote Authentication Information')) # Operation attributeName = schema.TextLine( title=_t(u'Attribute Name'), group=_t(u'JMX Attribute and Operation Configuration')) attributePath = schema.TextLine( title=_t(u'Attribute Path'), group=_t(u'JMX Attribute and Operation Configuration')) operationParamValues = schema.TextLine( title=_t(u'Parameter Values'), group=_t(u'JMX Attribute and Operation Configuration')) operationName = schema.TextLine( title=_t(u'Operation Name'), group=_t(u'JMX Attribute and Operation Configuration')) operationParamTypes = schema.TextLine( title=_t(u'Parameter Types'), group=_t(u'JMX Attribute and Operation Configuration'))
class ISlackActionContentInfo(IActionContentInfo): slackUrl = schema.TextLine( title=_t(u'Slack URL'), order=90, ) proxyUrl = schema.TextLine( title=_t(u'Proxy URL'), order=100, ) proxyUsername = schema.TextLine( title=_t(u'Proxy username'), order=110, ) proxyPassword = schema.Password( title=_t(u'Proxy password'), order=120, )
class IHipChatActionContentInfo(IActionContentInfo): hipChatUrl = schema.TextLine( title=_t(u'HipChat URL'), order=90, ) proxyUrl = schema.TextLine( title=_t(u'Proxy URL'), order=100, ) proxyUsername = schema.TextLine( title=_t(u'Proxy username'), order=110, ) proxyPassword = schema.Password( title=_t(u'Proxy password'), order=120, ) message_body = schema.Text( title=_t(u'Message Body'), description = _t(u'The template for the HipChat message'), order=130, default = textwrap.dedent(text = u''' Device: ${evt/device} Component: ${evt/component} Severity: ${evt/severity} Time: ${evt/lastTime} Message: ${evt/message} <a href="${urls/eventUrl}">Event Detail</a> <a href="${urls/ackUrl}">Acknowledge</a> <a href="${urls/closeUrl}">Close</a> <a href="${urls/eventsUrl}">Device Events</a> ''') )
class IFancyEmailActionContentInfo(IInfo): body_content_type = schema.Choice( title=_t(u'Body Content Type'), vocabulary=SimpleVocabulary.fromValues(getNotificationBodyTypes()), description=_t(u'The content type of the body for emails.'), default=u'html') subject_format = schema.TextLine( title=_t(u'Message (Subject) Format'), description=_t(u'The template for the subject for emails.'), default=_t(u'[Z] ${evt/device} ${evt/summary}')) # body_format includes the following event fields which MUST exist and be non-null: # Standard fields # evt/device , evt/ipAddress , evt/count , evt/summary , evt/component , evt/eventClass , # evt/firstTime , evt/lastTime , evt/message # Customised fields created in a root-level event transform - see root_transform.txt # evt/utcTime , evt/sevColour , evt/sevBackgroundColour, evt/SevString , evt/Category , evt/Site , evt/explanation , evt/resolution # The evt/sevColour , evt/sevBackgroundColour, evt/SevString fields are used by the notification to output text values for # severity (Critical, Error, etc) and to colour-code this string. # # Any image files are found in this directory. The "image0" in the <br><img src="cid:image0"><br> line # MUST match the "image0" in msgImage.add_header('Content-ID', '<image0>') in the executeBatch function. # and the same for "image2" in the clear_body_format # Note that in the following html you need to avoid linefeeds, especially in the table, # otherwise you will find lots of blank lines in the email body_format = schema.Text( title=_t(u'Body Format'), description=_t(u'The template for the body for emails.'), default=textwrap.dedent(text=u''' <div > <span style="font-family: arial"><img src="cid:image0"> <b><u> <span style="text-transform: uppercase; background-color: ${evt/sevBackgroundColour}; color: ${evt/sevColour}; font-size: 200%"> ${evt/SevString} Severity Incident at ${evt/Site}    Category: ${evt/Category}</span></u> </b> <font style=" color: #173048; font-weight:bold; font-size:18px; " > Device: </font> <span style="text-transform: uppercase"> ${evt/device}</span>    <font style=" color: #173048; font-weight:bold; font-size:18px; " > IP Address: </font> <span style="text-transform: uppercase"> ${evt/ipAddress} </span>    <font style=" color: #173048; font-weight:bold; font-size:18px; " > Time: </font> <span style="text-transform: uppercase"> ${evt/utcTime} (UTC) </span> <font style=" color: #173048; font-weight:bold; font-size:20px; " > Summary: </font> <span style="text-transform: uppercase"> ${evt/summary} </span> <table border="1" width="75%" style=" border:1px solid #173048; border-collapse: collapse; border-spacing: 0; padding: 5px; font-family:arial,helvetica,sans-serif;"> <tr> <td style="color: #ffffff; background-color: #173048; font-weight:bold;" >Device</td> <td><b><font size="3">${evt/device}</font></b></td> </tr> <tr> <td style="color: #ffffff; background-color: #173048; font-weight:bold;" >IPAddress</td> <td><b><font size="3" >${evt/ipAddress}</font></b></td> </tr> <tr> <td style="color: #ffffff; background-color: #173048; font-weight:bold;" >Site</td> <td><b><font size="3" >${evt/Site}</font></b></td> </tr> </tr> <tr> <td style="color: #ffffff; background-color: #173048; font-weight:bold;" >Region</td> <td><b><font size="3" >${evt/Region}</font></b></td> </tr> <tr> <td style="color: #ffffff; background-color: #173048; font-weight:bold;" >Component</td> <td><b><font size="3" >${evt/component}</font></b></td> </tr> <tr> <td style="color: #ffffff; background-color: #173048; font-weight:bold;" >Category</td> <td><b><font size="3" >${evt/Category}</font></b></td> </tr> <tr> <td style="color: #ffffff; background-color: #173048; font-weight:bold;" >Count</td> <td><b><font size="3" > ${evt/count} </font> </b> </td> </tr> <tr> <td style="color: #ffffff; background-color: #173048; font-weight:bold;" >Explanation</td> <td><b><font size="3" >${evt/explanation}</font></b></td> </tr> <tr> <td style="color: #ffffff; background-color: #173048; font-weight:bold;" >Resolution</td> <td><b><font size="3" >${evt/resolution}</font></b></td> </tr> <tr> <td style="color: #ffffff; background-color: #173048; font-weight:bold;" >First Time</td> <td><b><font size="3" >${evt/firstTime}</font></b></td> </tr> <tr> <td style="color: #ffffff; background-color: #173048; font-weight:bold;" >Last Time</td> <td><b><font size="3" >${evt/lastTime}</font></b></td> </tr> </table> Message: <b> <font size="3" color="Blue">${evt/message}</font> </b> <a href="${urls/eventUrl}">Event Detail</a> <a href="${urls/eventsUrl}">Device Events</a> <br><img src="cid:image1"><br> </span> </div> ''')) clear_subject_format = schema.TextLine( title=_t(u'Clear Message (Subject) Format'), description=_t(u'The template for the subject for CLEAR emails.'), default=_t(u'[Z] CLEAR: ${evt/device} ${clearEvt/summary}')) clear_body_format = schema.Text( title=_t(u'Body Format'), description=_t(u'The template for the body for CLEAR emails.'), default=textwrap.dedent(text=u''' <span style="font-family: arial"><img src="cid:image0"> <b><u> <span style="text-transform: uppercase; background-color: #71E671; color: black; font-size: 200%"> Cleared ${evt/SevString} Severity Incident at ${evt/Site}    Category: ${evt/Category}</span></u> </b> Device: <b> <font size="4" color="Blue"><span style="text-transform: uppercase"> ${evt/device}</span></font> </b>   IP Address:<b> <font size="4" color="Blue"> ${evt/ipAddress} </font> </b>   Time: <b> <font size="4" color="Blue">${evt/utcTime} (UTC)</font> </b>   Original Severity: <b> <font size="4" color=${evt/sevBackgroundColour}>${evt/SevString} </font> </b> Summary: <b> <font size="3" color="Blue">${evt/summary}</font> </b> <table border="1" style="width:100%; font-family:arial;"><tr><td>Device</td><td><b><font size="3" color="Blue">${evt/device}</font></b></td></tr><tr><td>IPAddress</td><td><b><font size="3" color="Blue">${evt/ipAddress}</font></b></td></tr><tr><td>Site</td><td><b><font size="3" color="Blue">${evt/Site}</font></b></td></tr><tr><td>Region</td><td><b><font size="3" color="Blue">${evt/Region}</font></b></td></tr><tr><td>Component</td><td><b><font size="3" color="Blue">${evt/component}</font></b></td></tr><tr><td>Category</td><td><b><font size="3" color="Blue">${evt/Category}</font></b></td></tr><tr><td>Count</td><td><b><font size="3" color="Blue">${evt/count}</font></b></td></tr><tr><td>Explanation</td><td><b><font size="3" color="Blue">${evt/explanation}</font></b></td></tr><tr><td>Resolution</td><td><b><font size="3" color="Blue">${evt/resolution}</font></b></td></tr><tr><td>First Time</td><td><b><font size="3" color="Blue">${evt/firstTime}</font></b></td></tr><tr><td>Last Time</td><td><b><font size="3" color="Blue">${evt/lastTime}</font></b></td></tr></table> Message: <b> <font size="3" color="Blue">${evt/message}</font> </b> <a href="${urls/reopenUrl}">Reopen</a> <br><img src="cid:image2"><br> </span> ''')) email_from = schema.Text( title=_t(u'From Address for Emails'), description=_t( u'The user from which the e-mail originated on the Zenoss server.' ), ) host = schema.Text( title=_t(u'SMTP Host'), description=_t(u'Simple Mail Transport Protocol (aka E-mail server).'), ) port = schema.Int( title=_t(u'SMTP Port (usually 25)'), description=_t( u'TCP/IP port to access Simple Mail Transport Protocol (aka E-mail server).' ), ) useTls = schema.Bool( title=_t(u'Use TLS?'), description=_t(u'Use Transport Layer Security for E-mail?')) user = schema.Text( title=_t(u'SMTP Username (blank for none)'), description=_t(u'Use this only if authentication is required.'), ) password = schema.Password( title=_t(u'SMTP Password (blank for none)'), description=_t(u'Use this only if authentication is required.'), )
class IEmailActionContentInfo(IActionContentInfo): body_content_type = schema.Choice( title=_t(u'Body Content Type'), vocabulary=SimpleVocabulary.fromValues(getNotificationBodyTypes()), description=_t(u'The content type of the body for emails.'), default=u'html') subject_format = schema.TextLine( title=_t(u'Message (Subject) Format'), description=_t(u'The template for the subject for emails.'), default=_t(u'[zenoss] ${evt/device} ${evt/summary}')) body_format = schema.Text( title=_t(u'Body Format'), description=_t(u'The template for the body for emails.'), default=textwrap.dedent(text=u''' Device: ${evt/device} Component: ${evt/component} Severity: ${evt/severity} Time: ${evt/lastTime} Message: ${evt/message} <a href="${urls/eventUrl}">Event Detail</a> <a href="${urls/ackUrl}">Acknowledge</a> <a href="${urls/closeUrl}">Close</a> <a href="${urls/eventsUrl}">Device Events</a> ''')) clear_subject_format = schema.TextLine( title=_t(u'Clear Message (Subject) Format'), description=_t(u'The template for the subject for CLEAR emails.'), default=_t(u'[zenoss] CLEAR: ${evt/device} ${clearEvt/summary}')) clear_body_format = schema.Text( title=_t(u'Body Format'), description=_t(u'The template for the body for CLEAR emails.'), default=textwrap.dedent(text=u''' Event: '${evt/summary}' Cleared by: '${evt/clearid}' At: ${evt/stateChange} Device: ${evt/device} Component: ${evt/component} Severity: ${evt/severity} Message: ${evt/message} <a href="${urls/reopenUrl}">Reopen</a> ''')) email_from = schema.Text( title=_t(u'From Address for Emails'), description=_t( u'The user from which the e-mail originated on the Zenoss server.' ), ) host = schema.Text( title=_t(u'SMTP Host'), description=_t(u'Simple Mail Transport Protocol (aka E-mail server).'), ) port = schema.Int( title=_t(u'SMTP Port (usually 25)'), description=_t( u'TCP/IP port to access Simple Mail Transport Protocol (aka E-mail server).' ), ) useTls = schema.Bool( title=_t(u'Use TLS?'), description=_t(u'Use Transport Layer Security for E-mail?')) user = schema.Text( title=_t(u'SMTP Username (blank for none)'), description=_t(u'Use this only if authentication is required.'), ) password = schema.Password( title=_t(u'SMTP Password (blank for none)'), description=_t(u'Use this only if authentication is required.'), )
class IJIRAActionContentInfo(IInfo): jira_instance = schema.TextLine( title=_t(u'JIRA Target Instance'), description=_t(u'Base URL for JIRA instance to report issues'), ) jira_user = schema.TextLine( title=_t(u'JIRA UserID'), description=_t(u'Set JIRA reporter UserID'), ) jira_password = schema.Password( title=_t(u'JIRA Password'), description=_t(u'Set JIRA reporter password'), ) issue_project = schema.TextLine( title=_t(u'JIRA Project'), description=_t(u'Set Issue Project'), ) issue_type = schema.TextLine( title=_t(u'IssueType'), description=_t(u'Set IssueType'), default=u'Incident', ) issue_priority_key = schema.TextLine( title=_t(u'Issue Priority'), description=_t(u'Set issue priority (use Priority Key)'), ) issue_summary = schema.TextLine( title=_t(u'Issue Summary'), description=_t(u'Set issue summary content'), default=u'Device : ${evt/device} (${evt/ipAddress}) | ${evt/summary}', ) issue_description = schema.Text( title=_t(u'Issue Description'), description=_t(u'Set issue description content'), default=textwrap.dedent(text=u'''\\\\ _master_ : *Zenoss Instance* _notification_ : *${notification/name}* _trigger_ : *${trigger/name}* *[ device information ]* {quote} _environment_ : *${dev/getProductionStateString}* _device_ : *${evt/device}* _ipaddress_ : *${evt/ipAddress}* {quote} {quote} _priority_ : *${dev/getPriorityString}* _icmp_ : *${dev/getPingStatusString}* {quote} {quote} _groups_ : *${evt/DeviceGroups}* _systems_ : *${evt/Systems}* _location_ : *${evt/Location}* {quote} *[ event information ]* {quote} _component_ : *${evt/component}* _event class_ : *${evt/eventClass}* _event key_ : *${evt/eventKey}* _message_ : *${evt/message}* {quote} {quote} _severity_ : *${evt/severity}* _count_ : *${evt/count}* _detected_ : *${evt/firstTime}* _last_ : *${evt/lastTime}* {quote} {quote} _agent_ : *${evt/agent}* _monitor_ : *${evt/monitor}* {quote} _reference links_ : [ [event details | ${urls/eventUrl}] | [device details | ${urls/deviceUrl}] | [device events | ${urls/eventsUrl}] ] \\\\ \\\\''')) clear_issue_description = schema.Text( title=_t(u'Descripton on CLEAR'), description=_t(u'Set issue comment content when event cleared'), default=textwrap.dedent(text=u'''\\\\ [ *event-cleared* ] _notification_ : *${notification/name}* _trigger_ : *${trigger/name}* {quote} _cleared by_ : *${evt/clearid}* _cleared at_ : *${evt/stateChange}* {quote} {quote} _monitor_ : *${evt/monitor}* _count_ : *${evt/count}* _last_ : *${evt/lastTime}* {quote} \\\\''')) customfield_keypairs = schema.Text( title=_t(u'CustomField KeyPairs'), description=_t( u'Define customfield keypair values (Format [json] : {"key1":"value1", ...})' ), default=u'', ) event_rawdata = schema.Text( title=_t(u'Event Raw Data'), description=_t( u'Define event raw data (Format [json] : {"key1":"value1", ...}) default: will use raw EventObject' ), ) service_group_root = schema.TextLine( title=_t(u'Service Group Roots'), description=_t(u'Service Group Roots (list separated by comma)'), default=u'^/(dcs|commercial|consumer|coretech|is)/(.*);^uncategorised$', )
class IAWSEmailHostActionContentInfo(IInfo): body_content_type = schema.Choice( title=_t(u'Body Content Type'), vocabulary=SimpleVocabulary.fromValues( actions.getNotificationBodyTypes()), description=_t(u'The content type of the body for emails.'), default=u'html') subject_format = schema.TextLine( title=_t(u'Message (Subject) Format'), description=_t(u'The template for the subject for emails.'), default=_t(u'[zenoss] ${evt/device} ${evt/summary}')) body_format = schema.Text( title=_t(u'Body Format'), description=_t(u'The template for the body for emails.'), default=textwrap.dedent(text=u''' Device: ${evt/device} Component: ${evt/component} Severity: ${evt/severity} Time: ${evt/lastTime} Message: ${evt/message} <a href="${urls/eventUrl}">Event Detail</a> <a href="${urls/ackUrl}">Acknowledge</a> <a href="${urls/closeUrl}">Close</a> <a href="${urls/eventsUrl}">Device Events</a> ''')) clear_subject_format = schema.TextLine( title=_t(u'Clear Message (Subject) Format'), description=_t(u'The template for the subject for CLEAR emails.'), default=_t(u'[zenoss] CLEAR: ${evt/device} ${clearEvt/summary}')) clear_body_format = schema.Text( title=_t(u'Body Format'), description=_t(u'The template for the body for CLEAR emails.'), default=textwrap.dedent(text=u''' Event: '${evt/summary}' Cleared by: '${evt/clearid}' At: ${evt/stateChange} Device: ${evt/device} Component: ${evt/component} Severity: ${evt/severity} Message: ${evt/message} <a href="${urls/reopenUrl}">Reopen</a> ''')) email_from = schema.Text( title=_t(u'From Address for Emails'), description=_t( u'The user from which the e-mail originated on the Zenoss server.' ), default=u'*****@*****.**') aws_account_name = schema.Text( title=_t(u'AWS Account Name'), description=_t(u'Name of the AWS account you\'ll be using.'), ) aws_region = schema.Choice( title=_t(u'AWS Region'), vocabulary=SimpleVocabulary.fromValues(getSESRegions()), description=_t(u'List of available AWS Regions.'), default=getSESRegions()[0]) aws_access_key = schema.Text( title=_t(u'AWS Access Key'), description=_t(u'Access Key for the AWS account.'), ) aws_secret_key = schema.Password( title=_t(u'AWS Secret Key'), description=_t(u'Secret Key for the AWS account.'), )