%doc> This page displays detailed technical about search jobs. Variables available to this template are: jobObject: the splunk.search.SearchJob object jobProperties: a static dict of all the properties from splunkd %doc> <%inherit file="/layout/message.html" /> <%namespace name="lib" file="/lib.html" import="*" /> <%! import splunk.appserver.mrsparkle.lib.i18n as i18n import splunk.util title = 'Search job inspector' %> <% # determine CSS class explanationClass = 'ok' if jobProperties['isZombie']: explanationClass = 'zombie' elif jobProperties['isFailed']: explanationClass = 'failed' elif jobProperties['isPaused']: explanationClass = 'paused' elif jobProperties['isDone']: if jobProperties['resultCount'] == 0: explanationClass = 'noresults' elif len(jobProperties['messages']) > 0: explanationClass = 'messaged' else: explanationClass = 'ok' # determine date time formatting earliestTime = splunk.util.parseISO(jobProperties['earliestTime']) if splunk.util.dt2epoch(earliestTime) == 0: earliestTime = _('(earliest indexed event)') else: earliestTime = i18n.format_datetime_microseconds(earliestTime) latestTime = splunk.util.parseISO(jobProperties.get('latestTime', '')) if splunk.util.dt2epoch(latestTime) == 0: latestTime = _('(latest indexed event)') else: latestTime = i18n.format_datetime_microseconds(latestTime) %> <%def name="renderJobMessages()"> % if len(jobProperties['messages']) > 0:
${_('The following messages were returned by the search subsystem:')}
${_('This search has encountered a fatal error and has been marked as zombied.')}
% elif jobProperties['isFailed']:${_('This search did not successfully execute. Any results returned from this job are not consistent and should not be used.')}
${jobProperties['search'] | h}% elif jobProperties['isPaused']:
${_('This search is currently paused and must be unpaused before continuing.')}
% elif not jobProperties['isDone']:${_('This search is still running and is approximately %s complete.') % i18n.format_percent(jobProperties['doneProgress']) | h}
% elif jobProperties['isDone']: % if jobProperties['resultCount'] == 0: % if jobProperties['eventCount'] == 0:${_('This search has completed, but did not match any events. The terms specified in the highlighted portion of the search:')}
${jobProperties['eventSearch'] | h} ${'| ' + jobProperties['reportSearch'] if jobProperties['reportSearch'] else '' | h}
${_('over the time range:')}
${earliestTime | h} – ${latestTime | h}
${_('did not return any data. Possible solutions are to:')}
<% s = _('This search has completed and found %(eventCount)s matching %(entityName)s. \ However, the transforming commands in the highlighted portion of the following search:') % { 'eventCount': i18n.format_number(jobProperties['eventCount']), 'entityName': i18n.ungettext('event', 'events', jobProperties['eventCount']) } %> ${s}
${jobProperties['eventSearch'] or '' | h} | ${jobProperties['reportSearch'] | h}
${_('over the time range:')}
${earliestTime | h} – ${latestTime | h}
${_('generated no results. Possible solutions are to:')}
${_('This search has completed, but did not return any results.')}
% endif % if savedSearchObject:${_('This search is an instance of the saved search: %s.') % jobProperties['label']}
% endif ${renderJobMessages()}${_('Learn more about troubleshooting empty search results at Splunk Documentation.') % generateSelfHelpLink('inspector.noresults')}
% else:<% s = _('This search has completed and has returned %(resultCount)s %(resultEntity)s by \ scanning %(scanCount)s %(eventEntity)s in %(runDuration)s seconds.') % { 'resultCount': i18n.format_number(jobProperties['resultCount']), 'resultEntity': i18n.ungettext('result', 'results', jobProperties['resultCount']), 'scanCount': i18n.format_number(jobProperties['scanCount']), 'eventEntity': i18n.ungettext('event', 'events', jobProperties['eventCount']), 'runDuration': i18n.format_number(jobProperties['runDuration']) } %> ${s}
% if savedSearchObject:${_('It is an instance of the saved search: %s.') % jobProperties['label']}
% endif ${renderJobMessages()} % endif % endif(SID: ${jobProperties['sid'] | h})
<%def name="footer()">${_('Duration (seconds)')} | Component | ${_('Invocations')} | ${_('Input count')} | ${_('Output count')} | |
---|---|---|---|---|---|
![]() ![]() |
${i18n.format_number(row['duration']) | h} | ![]() |
${i18n.format_number(row['invocationCount']) if row['invocationCount'] else '-' | h} | ${i18n.format_number(row['inputCount']) if row['inputCount'] else '-' | h} | ${i18n.format_number(row['outputCount']) if row['outputCount'] else '-' | h} |
${key | h} | ${savedSearchObject[key] | h} |
${key | h} | ${jobProperties[key] | h} |
Additional info |
% if jobProperties['statusBuckets'] > 0:
${_('timeline')}
${_('field summary')}
% endif
${_('search.log')}
% if 'peerNameList' in jobProperties and len(jobProperties['peerNameList']) > 0:
${_('search.log')}(
% for peername in jobProperties['peerNameList']:
${peername}
% endfor
)
% endif
|