<%inherit file="//layout/admin_lite.html"/> <%def name="title()">${_('Licensing')} - ${parent.title()} <%def name="get_breadcrumbs()"> <% return [ [_('Manager'), ['manager']], [_('Licensing'), ['manager','system','licensing']] ] %> <%def name="message_renderer(messages)"> % for cat, details in messages.items(): <% friendly_message = category_map.get(cat) if not friendly_message: friendly_message = dict( single=_('%s ' + cat + ' message'), plural=_('%s ' + cat + ' messages') ) %> ${ungettext(friendly_message['single'], friendly_message['plural'], details['count']) % details['count']} % if len(details['slaves']) > 0: ${_('reported by')} ${ungettext('%s indexer', '%s indexers', len(details['slaves'])) % len(details['slaves'])} % endif % if cat not in ('pool_over_quota', 'stack_over_quota', 'orphan_slave', 'pool_warning_count', 'pool_violated_slave_count'): ${i18n.format_timedelta(details['latest_time']) | h} % else: ${_('Correct by midnight to avoid violation')} ${_('Learn more')} % endif % endfor
% if can_be_remote_master: ${_('This server is acting as a master license server')} % else: ${_('This server is acting as a standalone license server')} % endif

${_('%s license group') % active_group_name | h}

${_('This server is configured to use licenses from the %s license group') % h(active_group_name)}

${_('Add license')}

<% category_map = { 'license_window': { 'single': _('%s license window warning'), 'plural': _('%s license window warnings') }, 'pool_over_quota': { 'single': _('%s pool quota overage warning'), 'plural': _('%s pool quota overage warnings') }, 'orphan_slave': { 'single': _('%s orphaned indexer'), 'plural': _('%s orphaned indexers') }, 'pool_warning_count': { 'single': _('%s pool warning'), 'plural': _('%s pool warnings') }, 'pool_violated_slave_count': { 'single': _('%s pool violation'), 'plural': _('%s pool violations') }, 'stack_over_quota': { 'single': _('%s stack quota overage warning'), 'plural': _('%s stack quota overage warnings') } } %>

${_('Alerts')}

${_('Licensing alerts notify you of excessive indexing warnings and licensing misconfigurations.')} ${_('Learn more')}

Current
% if len(soft_messages) == 0: % else: ${message_renderer(soft_messages)} % endif
${_('No licensing alerts')}
Permanent
% if len(hard_messages) == 0: % else: ${message_renderer(hard_messages)} % endif
${_('No licensing violations')}
% if can_edit_pools: % if len(stack_table) == 0:

${_('There are currently no stacks associated with the %s license type. No usage information is available.') % h(active_group_name)}

% endif % for stack in stack_table:

${_('%s stack') % stack['label'] | h}

${_('Learn more')}
<% working_pools = [x for x in pool_table if x['stack_name'] == stack['name']] pool_count = len(working_pools) show_pool_info = True %> % if can_edit_pools: <% catchall_within_stack = set(catchall_pool_names) & set([x['name'] for x in working_pools]) %> % if len(catchall_within_stack) > 0:

* ${_('%s is currently a default license pool. Slave indexers can be automatically added to this pool by pointing them to the splunkd port on this machine.') % h(catchall_within_stack.pop())}

% endif % endif % for license in [x for x in license_table if x['stack_name'] == stack['name']]: % endfor
${_('Licenses')} ${_('Volume')} ${_('Expiration')} ${_('Status')}  
${license['label'] | h} ${i18n.format_bytes(license['quota_bytes'], output_units='MB', mantissa=0) | h} ${i18n.format_datetime(license['expiration_time']) | h} % if license['status'] == 'VALID': ${_('valid')} % elif license['status'] == 'REVOKED': ${_('revoked')} % elif license['status'] == 'EXPIRED': ${_('expired')} % else: ${license['status']|h} % endif % if license['can_remove']: ${_('Delete')} % endif
${_('Effective daily volume')} ${i18n.format_bytes(stack['quota_bytes'], output_units='MB', mantissa=0)| h}
% if pool_count == 0:

${_('There are no pools configured in the %s stack') % h(stack['label'])}

% else: % if show_pool_info: % endif % if show_pool_info: % endif <% meter_max_width = 100 %> % for pool in working_pools: % if show_pool_info: <% pool_usage_width = 1 try: pool_usage_width = max(1, int(meter_max_width * (pool['used_bytes'] / pool['quota_bytes']))) pool_usage_width = min(meter_max_width, pool_usage_width) except: pass %> % if pool['name'] not in [row['pool_name'] for row in slave_table]: % endif % endif % for slave in slave_table: % if slave['pool_name'] == pool['name']: <% slave_usage_width = max(1, (slave['used_perc'] or 0) * meter_max_width) slave_usage_width = min(meter_max_width, slave_usage_width) %> % if show_pool_info: % endif % endif % endfor % endfor
${_('Pools')}${_('Indexers')} ${_('Volume used today')}  
${pool['name'] | h} % if can_edit_pools and pool['name'] in catchall_pool_names: * % endif   ${i18n.format_bytes(pool['used_bytes'], output_units='MB', mantissa=0)|h} / ${i18n.format_bytes(pool['quota_bytes'], output_units='MB', mantissa=0)|h} % if can_edit_pools: <% qs = dict(pool_name=pool['name'], stack_name=pool['stack_name'], return_to=cherrypy.request.relative_uri) %> ${_('Edit')} | ${_('Delete')} % endif
${_('No indexers have reported into this pool today')}
${slave['name']|h}   ${i18n.format_bytes(slave['used_bytes'], mantissa=0, output_units='MB') | h} % if slave['used_perc'] is None: ${_('(N/A)')} % elif slave['used_perc'] > 0 and slave['used_perc'] < .01: (>${i18n.format_percent(0)|h}) % else: (${i18n.format_percent(slave['used_perc']) | h}) % endif
% endif % if can_edit_pools: % endif
% endfor % endif

${_('Local server information') | h}

% if not can_edit_pools and len(license_table) > 0: % endif % if not can_edit_pools and len(stack_table) > 0: % else: % endif
${_('Indexer name')} ${local_slave_name | h}
${_('License expiration')} ${i18n.format_datetime(license_table[0]['expiration_time'])| h}
${_('Licensed daily volume')} ${i18n.format_bytes(stack_table[0]['quota_bytes'], output_units='MB', mantissa=0)| h}
${_('Volume used today')} ${i18n.format_bytes(local_used_bytes, output_units='MB', mantissa=0) | h} % if stack_table[0]['quota_bytes']: ${_('(%s of quota)') % h(i18n.format_percent(local_used_bytes / stack_table[0]['quota_bytes']))} % endif
${_('Volume used today')} ${i18n.format_bytes(local_used_bytes, output_units='MB', mantissa=0) | h}
${_('Warning count')} ${i18n.format_number(local_warning_count) | h}
${_('Debug information')} ${_('All license details')}
${_('All indexer details')}