<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE lire:report-spec PUBLIC
  "-//LogReport.ORG//DTD Lire Report Specification Markup Language V1.0//EN"
  "http://www.logreport.org/LRSML/1.0/lrsml.dtd">
<lire:report-spec xmlns:lire="http://www.logreport.org/LRSML/"
 id="top-messages-by-process" superservice="syslog">

 <lire:title>Top Messages by Process Syslog Report </lire:title>

 <lire:description>
  <para>This report specification will generate a report showing the
   the messages that were logged the most number of times by each
   process. The number of messages to display and the number of
   processes to include in the report are customizable.
  </para>
 </lire:description>

 <lire:param-spec>
  <lire:param name="processes_to_show" type="int" default="30">
   <lire:description>
    <para>The number of processes to include in the report.</para>
   </lire:description>
  </lire:param>

  <lire:param name="messages_to_show" type="int" default="10">
   <lire:description>
    <para>The number of messages to include for each process in the
     report.</para>
   </lire:description>
  </lire:param>
 </lire:param-spec>

 <lire:display-spec>
  <lire:title>Top $messages_to_show Messages by Process, Top
   $processes_to_show Process</lire:title>
 </lire:display-spec>

 <lire:report-calc-spec>
  <lire:group sort="-msg_count_process" limit="$processes_to_show">
   <lire:field name="process"/>
   <lire:count name="msg_count_process"/>

   <lire:group sort="-msg_count" limit="$messages_to_show">
    <lire:field name="message"/>
    <lire:count name="msg_count"/>
   </lire:group>

  </lire:group>
 </lire:report-calc-spec>

</lire:report-spec>
