##########################################################
# Configuration file for innreport (3.*).
#
# Sample file for INN.
# Tested with INN 2.3, 2.1, 1.7.2 and 1.5.1.
#
# (c) 1997, 1998, 1999 by Fabien Tassin <fta@sofaraway.org>
# version 3.0.2
##########################################################

# Default parameters
section default {
	libpath         "/usr/lib/news/lib";
	logpath		"/var/log/news";
	unknown		true;        # want unknown entries.
	max_unknown     50;          # max unknown entries to display.
	casesensitive   true;
	module		"innreport_inn";  # ${libpath}/${module}.pm
	unwanted_log	"unwanted.log";   # ${logpath}/${unwanted_log}
	text            true;
	html            false;
	graph           true;        # need 'html'
	archive		true;  # use false to keep only the latest HTML report.
	index		"index.html"; # name of the HTML index file.
      # html_dir     "/var/www/News/stats"; # default to pathhttp in inn.conf
	img_dir         "pics";      # images will go to ${html_dir}/${img_dir}
	cycle		none;        # use a number or 'none'.
        separator       ".";         # use a valid filename character.
	title		"Daily Usenet report";
      # title	     "Daily Usenet report for <A HREF=\"/stat/\">news.y.z</A>";
      # footer		"Local contact: <A HREF=\"mailto:x@y.z\">x@y.z</A>";
      # html_body	"BGCOLOR=\"#FFFFFF\" TEXT=\"#000000\"";
      # html_header_file "header.html";  # ${html_dir}/${html_header_file}
      # html_footer_file "footer.html";  # ${html_dir}/${html_footer_file}
        graph_width	550;         # graph width (in pixels)
        transparent	true;        # graph background transparent ?
        graph_fg        "#000000";   # graph foreground color.
        graph_bg        "#FFFFFF";   # graph background color.
};

###########################################################################
# Index page
section index {
	column {
		title	"Dates";
		value	"date";
	};
	column {
		title	"Incoming feeds";
		name	"Offered|Accepted|Volume";
		value	"total(%innd_offered) | total(%innd_accepted) |
		         bytes(total(%inn_flow_size))";
	};
	column {
		title	"Outgoing feeds";
		name	"Offered|Accepted|Volume";
		value	"total(%innfeed_offered) + total(%nntplink_offered) +
			 total(%innxmit_offered) | total(%innfeed_accepted) +
			 total(%nntplink_accepted) + total(%innxmit_accepted) |
			 bytes(total(%innfeed_accepted_size) +
			 total(%innfeed_rejected_size) +
			 total(%innxmit_bytes) +
			 total(%innxmit_accepted_size) +
			 total(%innxmit_rejected_size))";
	};
	graph {
	        title         "Incoming feeds";
		value	      val1;
		color	      "#FFFFCE";
		unit	      "art";
		data {
		          name    "Offered";
			  color   "#50A0D0";
			  value   "val2";       # Incoming feeds: Offered
		};
		data {
		          name    "Accepted";
			  color   "#0000FF";
			  value   "val3";       # Incoming feeds: Accepted
		};
	};
	graph {
	        title         "Outgoing feeds";
		value	      val1;
		color	      "#FFFFCE";
		unit	      "art";
		data {
		          name    "Offered";
			  color   "#50A0D0";
			  value   "val5";       # Outgoing feeds: Offered
		};
		data {
		          name    "Accepted";
			  color   "#0000FF";
			  value   "val6";       # Outgoing feeds: Accepted
		};
	};
	graph {
		title		"Bandwidth";
		value		val1;
		color		"#FFFFCE";
		unit		"Kb";
		data {
			name	"Incoming";
			color	"#50A0D0";
			value	"byte(val4)";	# Incoming feeds: Volume
		};
		data {
			name	"Outgoing";
			color	"#0000FF";
			value	"byte(val7)";	# Outgoing feeds: Volume
		};
	};
};

###########################################################################
# Report

section prog_type {
        # skip    true;                          # used to skip a section.
        title   "Log entries by program:";
	data    "%prog_type";
	sort    "$prog_type{$b} <=> $prog_type{$a}";
	# text	false;             # to skip this section in the text report
	# html	false;             # to skip this section in the HTML report
        column {
                name          "Program name";
                format        "%-46.46s";
		value         "$key";
		format_total  "TOTAL: %-39.39s";
		total         "$num";
        };
        column {
                name          "Lines";
                format_name   "%7s";
                format        "%7d";
	        # text	      false;  # to skip this column in the text report
		value         "$prog_type{$key}";
		total         "total(%prog_type)";
        };
        column {
                name          "%Lines";
                format_name   "%7s";
                format        "%6.1f%%";
	        # html	      false;  # to skip this column in the HTML report
		value         "$prog_type{$key} / total(%prog_type) * 100";
		total         "100";
        };
        column {
                name          "Size";
                format        "%9s";
		value         "bytes($prog_size{$key})";
		total         "bytes(total(%prog_size))";
        };
        column {
                name          "%Size";
                format_name   "%6s";
                format        "%5.1f%%";
		value         "$prog_size{$key} / total(%prog_size) * 100";
		total         "100";
        };
};

# INN 2.*
section innd_his {
	title	"History cache:";
	data	"%innd_his";
	sort    "$innd_his{$b} <=> $innd_his{$a}";
	column {
		name	      "Reason";
	        format        "%-57.57s";
		value         "$key";
		format_total  "TOTAL: %-50.50s";
		total         "$num";
	};
	column {
		name          "Count";
		format_name   "%10s";
                format        "%10d";
		value         "$innd_his{$key}";
		total         "total(%innd_his)";
        };
	column {
		name          "%Count";
		format_name   "%10s";
                format        "%9.1f%%";
		value         "100 * $innd_his{$key} / total(%innd_his)";
		total         "100";
        };
};

# INN 1.*
section innd_cache {
	title	"History cache:";
	data	"%innd_cache";
	sort    "$innd_cache{$b} <=> $innd_cache{$a}";
	column {
		name	      "Reason";
	        format        "%-57.57s";
		value         "$key";
		format_total  "TOTAL: %-50.50s";
		total         "$num";
	};
	column {
		name          "Count";
		format_name   "%10s";
                format        "%10d";
		value         "$innd_cache{$key}";
		total         "total(%innd_cache)";
        };
	column {
		name          "%Count";
		format_name   "%10s";
                format        "%9.1f%%";
		value         "100 * $innd_cache{$key} / total(%innd_cache)";
		total         "100";
        };
};

section innd_timer {
        title   "INND timer:";
	data    "%innd_time_time";
        column {
                name          "Code region";
                format        "%-15.15s";
		value         "$key";
		format_total  "TOTAL: %-8.8s";
		total         "time_ms($innd_time_times)";
        };
        column {
                name          "Time";
                format        "%13s";
		value         "time_ms($innd_time_time{$key})";
		total         "time_ms(total(%innd_time_time))";
        };
        column {
                name          "Pct";
                format_name   "%6s";
                format        "%5.1f%%";
		value         "100 * $innd_time_time{$key} / $innd_time_times";
		total         "100 * total(%innd_time_time) /
	                       $innd_time_times";
        };
        column {
                name          "Invoked";
                format        "%10s";
		value         "$innd_time_num{$key}";
                format_total  "%9s-";
		total         "";
        };
        column {
                name          "Min(ms)";
                format_name   "%9s";
                format        "%9.3f";
		value         "$innd_time_min{$key}";
                format_total  "%8s-";
		total         "";
        };
        column {
                name          "Avg(ms)";
                format_name   "%10s";
                format        "%10.3f";
		value         "$innd_time_time{$key} /
		            ($innd_time_num{$key} ? $innd_time_num{$key} : 1)";
                format_total  "%9s-";
		total         "";
        };
        column {
                name          "Max(ms)";
                format_name   "%10s";
                format        "%10.3f";
		value         "$innd_time_max{$key}";
                format_total  "%9s-";
		total         "";
        };
};

section innfeed_timer {
        title   "INNfeed timer:";
	data    "%innfeed_time_time";
        column {
                name          "Code region";
                format        "%-15.15s";
		value         "$key";
		format_total  "TOTAL: %-8.8s";
		total         "time_ms($innfeed_time_times)";
        };
        column {
                name          "Time";
                format        "%13s";
		value         "time_ms($innfeed_time_time{$key})";
		total         "time_ms(total(%innfeed_time_time))";
        };
        column {
                name          "Pct";
                format_name   "%6s";
                format        "%5.1f%%";
		value         "100 * $innfeed_time_time{$key} / $innfeed_time_times";
		total         "100 * total(%innfeed_time_time) /
	                       $innfeed_time_times";
        };
        column {
                name          "Invoked";
                format        "%10s";
		value         "$innfeed_time_num{$key}";
                format_total  "%9s-";
		total         "";
        };
        column {
                name          "Min(ms)";
                format_name   "%9s";
                format        "%9.3f";
		value         "$innfeed_time_min{$key}";
                format_total  "%8s-";
		total         "";
        };
        column {
                name          "Avg(ms)";
                format_name   "%10s";
                format        "%10.3f";
		value         "$innfeed_time_time{$key} /
		            ($innfeed_time_num{$key} ? $innfeed_time_num{$key} : 1)";
                format_total  "%9s-";
		total         "";
        };
        column {
                name          "Max(ms)";
                format_name   "%10s";
                format        "%10.3f";
		value         "$innfeed_time_max{$key}";
                format_total  "%9s-";
		total         "";
        };
};

section nnrpd_timer {
        title   "nnrpd timer:";
	data    "%nnrpd_time_time";
        column {
                name          "Code region";
                format        "%-15.15s";
		value         "$key";
		format_total  "TOTAL: %-8.8s";
		total         "time_ms($nnrpd_time_times)";
        };
        column {
                name          "Time";
                format        "%13s";
		value         "time_ms($nnrpd_time_time{$key})";
		total         "time_ms(total(%nnrpd_time_time))";
        };
        column {
                name          "Pct";
                format_name   "%6s";
                format        "%5.1f%%";
		value         "100 * $nnrpd_time_time{$key} / $nnrpd_time_times";
		total         "100 * total(%nnrpd_time_time) /
	                       $nnrpd_time_times";
        };
        column {
                name          "Invoked";
                format        "%10s";
		value         "$nnrpd_time_num{$key}";
                format_total  "%9s-";
		total         "";
        };
        column {
                name          "Min(ms)";
                format_name   "%9s";
                format        "%9.3f";
		value         "$nnrpd_time_min{$key}";
                format_total  "%8s-";
		total         "";
        };
        column {
                name          "Avg(ms)";
                format_name   "%10s";
                format        "%10.3f";
		value         "$nnrpd_time_time{$key} /
		            ($nnrpd_time_num{$key} ? $nnrpd_time_num{$key} : 1)";
                format_total  "%9s-";
		total         "";
        };
        column {
                name          "Max(ms)";
                format_name   "%10s";
                format        "%10.3f";
		value         "$nnrpd_time_max{$key}";
                format_total  "%9s-";
		total         "";
        };
};

section innd_control {
        title   "Control commands to INND:";
	data    "%innd_control";
        column {
                name          "Command";
                format        "%-71.71s";
		value         "$key";
		format_total  "TOTAL: %-64.64s";
		total         "$num";
        };
        column {
                name          "Number";
                format_name   "%7s";
		value         "$innd_control{$key}";
		format        "%7d";
		total         "total(%innd_control)";
        };
};

section innd_newgroup {
        title   "Newsgroups created:";
	data    "%innd_newgroup";
        column {
                name          "Group";
                format        "%-71.71s";
		value         "$key";
		format_total  "TOTAL%-66.66s";
		total         "";
        };
        column {
                name          "Mode";
		value         "$innd_newgroup{$key}";
		format        "%7s";
		total         "$num";
        };
};

section innd_changegroup {
	title	"Newsgroups changed:";
	data	"%innd_changegroup";
	column {
		name          "Group";
		format        "%-68.68s";
		value         "$key";
		format_total  "TOTAL%-63.63s";
		total         "";
	};
	column {
		name          "New mode";
		format        "%10s";
		value         "$innd_changegroup{$key}";
		total         "$num";
	};
};

section innd_rmgroup {
	title	"Newsgroups removed:";
	data	"%innd_rmgroup";
	column {
		name          "Group";
		format        "%-78.78s";
		value         "$key";
		format_total  "TOTAL: %-71.71s";
		total         "$num";
	};
};

section controlchan {
	title   "Control Channel:";
	data    "%controlchan_who";
	column {
		name          "Sender";
		format        "%-25.25s";
		value         "$key";
		format_total  "TOTAL%-20.20s";
		total         "";
	};
	column {
		name          "newgroup";
		value         "$controlchan_new{$key}";
		format        "%8s";
		total         "total(%controlchan_new)";
	};
	column {
		name          "rmgroup";
		value         "$controlchan_rm{$key}";
		format        "%8s";
		total         "total(%controlchan_rm)";
	};
	column {
		name          "Other";
		value         "$controlchan_other{$key}";
		format        "%8s";
		total         "total(%controlchan_other)";
	};
	column {
		name          "Bad PGP";
		value         "$controlchan_skippgp{$key}";
		format        "%8s";
		total         "total(%controlchan_skippgp)";
	};
	column {
		name          "DoIt";
		value         "$controlchan_doit{$key}";
		format        "%8s";
		total         "total(%controlchan_doit)";
	};
	column {
		name          "OK";
		value         "$controlchan_ok{$key}";
		format        "%8s";
		total         "total(%controlchan_ok)";
	};
};

section innd_connect {
        title   "Incoming Feeds (INN):";
	data    "%innd_seconds";
	sort    "$innd_accepted{$b} <=> $innd_accepted{$a}";
	numbering true;
        column {
                name          "Server";
		format_name   "%-21.21s";
		format        "%-24.24s";
		value         "$key";
		format_total  "TOTAL: %-17.17s";
		total         "$num";
        };
        column {
                name          "Connects";
		format_name   "%5s";
		format        "%5d";
		value         "$innd_connect{$key}";
		total         "total(%innd_connect)";
        };
        column {
                name          "Offered";
		format_name   "%8s";
		format        "%8d";
		value         "$innd_offered{$key}";
		total         "total(%innd_offered)";
        };
        column {
                name          "Taken";
		format_name   "%7s";
		format        "%7d";
		value         "$innd_accepted{$key}";
		total         "total(%innd_accepted)";
        };
        column {
                name          "Refused";
		format_name   "%7s";
		format        "%7d";
		value         "$innd_refused{$key}";
		total         "total(%innd_refused)";
        };
        column {
                name          "Reject";
		format_name   "%7s";
		format        "%7d";
		value         "$innd_rejected{$key}";
		total         "total(%innd_rejected)";
        };
        column {
                name          "%Accpt";
		format_name   "%6s";
		format        "%4d%%";
		value         "$innd_offered{$key} == 0 ? 0 :
                             $innd_accepted{$key} / $innd_offered{$key} * 100";
		total         "total(%innd_offered) == 0 ? 0 :
                           total(%innd_accepted) / total(%innd_offered) * 100";
        };
        column {
                name          "Elapsed";
		format_name   "%8s";
		format        "%9s";
		value         "time($innd_seconds{$key})";
		total         "time(total(%innd_seconds))";
        };
	graph {
	        title         "Articles received by server";
		type          histo3d;
		sort	      "%innd_accepted";
		data {
		          name    "Articles accepted";
			  color   "#0000FF";
			  value   "%innd_accepted";
                };
		data {
		          name    "Articles refused";
			  color   "#FFAF00";
			  value   "%innd_refused";
                };
		data {
		          name    "Articles rejected";
			  color   "#FF0000";
			  value   "%innd_rejected";
                };
	};
};

section innd_incoming_vol {
        title   "Incoming Volume (INN):";
	data    "%innd_seconds";
	sort    "$innd_stored_size{$b} <=> $innd_stored_size{$a}";
	numbering true;
        column {
                name          "Server";
		format        "%-24.24s";
		value         "$key";
		format_total  "TOTAL: %-17.17s";
		total         "$num";
        };
        column {
                name          "AcceptVol";
		format        "%9s";
		value         "bytes($innd_stored_size{$key})";
		total         "bytes(total(%innd_stored_size))";
        };
        column {
                name          "DupVol";
		format        "%9s";
		value         "bytes($innd_duplicated_size{$key})";
		total         "bytes(total(%innd_duplicated_size))";
        };
	column {
		name	      "TotalVol";
		format	      "%9s";
		value	      "bytes($innd_stored_size{$key} +
	                               $innd_duplicated_size{$key})";
		total	      "bytes(total(%innd_stored_size) +
                                       total(%innd_duplicated_size))";
	};
        column {
                name          "%Acc";
		format_name   "%4s";
		format        "%3d%%";
		value         "$innd_offered_size{$key} == 0 ? 0 :
		     $innd_stored_size{$key} / $innd_offered_size{$key} * 100";
		total         "total(%innd_offered_size) == 0 ? 0 :
		   total(%innd_stored_size) / total(%innd_offered_size) * 100";
        };
	column {
		name		"Vol/Art";
		format		"%9s";
		value		"bytes(($innd_stored_size{$key} +
                                        $innd_duplicated_size{$key}) /
                                       ($innd_accepted{$key} +
                                        $innd_rejected{$key}))";
		total		"bytes((total(%innd_stored_size) +
                                        total(%innd_duplicated_size)) /
                                     (total(%innd_accepted) +
	                              total(%innd_rejected)))";
	};
        column {
                name          "Elapsed";
		format        "%9s";
		value         "time($innd_seconds{$key})";
		total         "time(total(%innd_seconds))";
        };
	graph {
	        title         "Incoming Volume received by server";
		type          histo3d;
		sort	      "%innd_stored_size";
		data {
		          name    "Accepted Volume";
			  color   "#0000FF";
			  value   "%innd_stored_size";
                };
		data {
		          name    "Duplicated Volume";
			  color   "#FFAF00";
			  value   "%innd_duplicated_size";
                };
	};
};

section inn_flow {
        title   "Incoming articles:";
	data    "%inn_flow";
	sort    "&DateCompare";
        column {
                name          "Date";
                format        "%-27.27s";
		value         "$key";
		format_total  "TOTAL: %-20.20s";
		total         "time(total(%inn_flow_time))";
        };
        column {
                name          "Articles";
		format_name   "%8s";
		value         "$inn_flow{$key}";
		format        "%8d";
		total         "total(%inn_flow)";
        };
        column {
                name          "%Arts";
		format_name   "%8s";
		value         "$inn_flow{$key} / $inn_flow_total * 100";
		format        "%7.1f%%";
		total         "100";
        };
        column {
                name          "Art/sec";
		format_name   "%7s";
		value         "$inn_flow{$key} / $inn_flow_time{$key}";
		format        "%7.2f";
		total         "total(%inn_flow) / total(%inn_flow_time)";
        };
        column {
                name          "Size";
		value         "bytes($inn_flow_size{$key})";
		format        "%9s";
		total         "bytes(total(%inn_flow_size))";
        };
        column {
                name          "%Size";
		format_name   "%7s";
		value         "$inn_flow_size{$key} /
                                          total(%inn_flow_size) * 100";
		format        "%6.1f%%";
		total         "100";
        };
        column {
                name          "KB/sec";
		format_name   "%7s";
		value         "$inn_flow_size{$key} /
		                       $inn_flow_time{$key} / 1024";
		format        "%7.2f";
		total         "total(%inn_flow_size) /
                                       total(%inn_flow_time) / 1024";
        };
	graph {
	        title         "Incoming articles";
		type          histo;
		data {
		          name    "Hours";
			  value   "%inn_flow_labels";
                };
		data {
		          name    "Art/sec";
			  factor  3600;
			  value   "%inn_flow";
                };
        };
	graph {
	        title         "Incoming articles (size)";
		type          histo;
		data {
		          name    "Hours";
			  value   "%inn_flow_labels";
                };
		data {
		          name    "Kb/sec";
			  factor  3686400;   # 3600 * 1024
			  value   "%inn_flow_size";
                };
        };
};

section cnfsstat {
        title   "CNFS buffer status:";
        data    "%cnfsstat";
        column {
                name          "Buffer";
                format        "%-13.13s";
                value         "$key";
                format_total  "TOTAL: %-6.6s";
                total         "$num";
        };
        column {
                name          "Class";
                format        "%-13.13s";
                value         "$cnfsstat{$key}";
                format_total  "-%12s";
                total         "";
        };
        column {
                name          "Size";
                format        "%9s";
                value         "bytes($cnfsstat_size{$key})";
                total         "bytes(total(%cnfsstat_size))";
        };
        column {
                name          "Used";
                format        "%9s";
                value         "bytes($cnfsstat_used{$key})";
                total         "bytes(total(%cnfsstat_used))";
        };
        column {
                name          "%Used";
                format_name   "%7s";
                value         "$cnfsstat_used{$key} /
                                       $cnfsstat_size{$key} * 100";
                format        "%6.1f%%";
                total         "total(%cnfsstat_used) /
                                       total(%cnfsstat_size) * 100";
        };
        column {
                name          "Cycles";
                format_name   "%6s";
                format        "%6d";
                value         "$cnfsstat_cycles{$key}";
                total         "total(%cnfsstat_cycles)";
        };
        column {
                name          "KB/sec";
                format_name   "%7s";
                value         "$cnfsstat_rate{$key} /
                                       $cnfsstat_samples{$key} / 1024";
                format        "%7.2f";
                total         "total(%cnfsstat_rate) /
                                       total(%cnfsstat_samples) / 1024";
        };
        column {
                name          "Days";
                format_name   "%8s";
                value         "$cnfsstat_size{$key} /
                                 ($cnfsstat_rate{$key} /
                                    $cnfsstat_samples{$key}) / 86400";
                format        "%8.2f";
                format_total  "%7s-";
                total         "";
        };
};

section inn_unwanted {
        title   "Sites sending bad articles:";
	data    "%inn_badart";
	sort    "$inn_badart{$b} <=> $inn_badart{$a}";
	numbering true;
        column {
                name          "Server";
                format        "%-23.23s";
		value         "$key";
		format_total  "TOTAL: %-16.16s";
		total         "$num";
        };
        column {
                name          "Total";
                format_name   "%6s";
                format        "%6d";
		value         "$inn_badart{$key}";
		total         "total(%inn_badart)";
        };
        column {
                name          "Group";
                format_name   "%6s";
                format        "%6d";
		value         "$inn_uw_ng_s{$key}";
		total         "total(%inn_uw_ng_s)";
        };
        column {
                name          "Dist";
                format_name   "%5s";
                format        "%5d";
		value         "$inn_uw_dist_s{$key}";
		total         "total(%inn_uw_dist_s)";
        };
        column {
                name          "Duplic";
                format_name   "%6s";
                format        "%6d";
		value         "$inn_duplicate{$key}";
		total         "total(%inn_duplicate)";
        };
        column {
                name          "Unapp";
                format_name   "%5s";
                format        "%5d";
		value         "$inn_unapproved{$key}";
		total         "total(%inn_unapproved)";
        };
        column {
                name          "TooOld";
                format_name   "%6s";
                format        "%6d";
		value         "$inn_tooold{$key}";
		total         "total(%inn_tooold)";
        };
        column {
                name          "Site";
                format_name   "%4s";
                format        "%4d";
		value         "$inn_uw_site{$key}";
		total         "total(%inn_uw_site)";
        };
        column {
                name          "Line";
                format_name   "%4s";
                format        "%4d";
		value         "$inn_linecount{$key}";
		total         "total(%inn_linecount)";
        };
        column {
                name          "Other";
                format_name   "%5s";
                format        "%5d";
		value         "$innd_others{$key}";
		total         "total(%innd_others)";
        };
};

section inn_unwanted_group {
        title   "Unwanted newsgroups:";
	top     20; # default 'top' value or use 'top_text' and 'top_html'
                    # to specify different values for text and HTML reports.
	data    "%inn_uw_ng";
	sort    "$inn_uw_ng{$b} <=> $inn_uw_ng{$a}";
        column {
                name          "Newsgroup";
                format        "%-71.71s";
		value         "$key";
		format_total  "TOTAL: %-64.64s";
		total         "$num";
        };
        column {
                name          "Count";
                format_name   "%7s";
                format        "%7d";
		value         "$inn_uw_ng{$key}";
		total         "total(%inn_uw_ng)";
        };
};

section inn_unwanted_dist {
        title   "Unwanted distributions:";
	top     20;
	data    "%inn_uw_dist";
	sort    "$inn_uw_dist{$b} <=> $inn_uw_dist{$a}";
        column {
                name          "Distribution";
                format        "%-71.71s";
		value         "$key";
		format_total  "TOTAL: %-64.64s";
		total         "$num";
        };
        column {
                name          "Count";
                format_name   "%7s";
                format        "%7d";
		value         "$inn_uw_dist{$key}";
		total         "total(%inn_uw_dist)";
        };
};

section inn_unwanted_unapp {
        title   "Supposedly-moderated groups with unmoderated postings:";
	top     20;
	data    "%inn_unapproved_g";
	sort    "$inn_unapproved_g{$b} <=> $inn_unapproved_g{$a}";
        column {
                name          "Groups";
                format        "%-71.71s";
		value         "$key";
		format_total  "TOTAL: %-64.64s";
		total         "$num";
        };
        column {
                name          "Count";
                format_name   "%7s";
                format        "%7d";
		value         "$inn_unapproved_g{$key}";
		total         "total(%inn_unapproved_g)";
        };
};

section inn_unwanted_path {
        title   "Unwanted sites in Path:";
	top     20;
	data    "%inn_site_path";
	sort    "$inn_site_path{$b} <=> $inn_site_path{$a}";
        column {
                name          "Site";
                format        "%-71.71s";
		value         "$key";
		format_total  "TOTAL: %-64.64s";
		total         "$num";
        };
        column {
                name          "Count";
                format_name   "%7s";
                format        "%7d";
		value         "$inn_site_path{$key}";
		total         "total(%inn_site_path)";
        };
};

section innd_perl {
        title   "INND perl filter:";
	top     20;
	data    "%innd_filter_perl";
	sort    "$innd_filter_perl{$b} <=> $innd_filter_perl{$a}";
        column {
                name          "Reason";
                format        "%-71.71s";
		value         "$key";
		format_total  "TOTAL: %-64.64s";
		total         "$num";
        };
        column {
                name          "Count";
                format_name   "%7s";
                format        "%7d";
		value         "$innd_filter_perl{$key}";
		total         "total(%innd_filter_perl)";
        };
};

section nocem {
        title   "NoCeM on Spool:";
	data    "%nocem_goodsigs";
	sort    "$nocem_ids{$b} <=> $nocem_ids{$a}";
	column {
		name		"Id";
               	format		"%-47.47s";
                value         	"$key";
		format_total  	"TOTAL: %-40.40s";
                total         	"$num";
	};
	column {
		name		"Good";
		format		"%7s";
		value		"$nocem_goodsigs{$key}";
                total         	"total(%nocem_goodsigs)";
	};
	column {
		name		"Bad";
		format		"%7s";
                value		"$nocem_badsigs{$key}";
		total		"total(%nocem_badsigs)";
	};
	column {
		name		"Unique";
		format		"%7s";
		value		"$nocem_newids{$key}";
		total		"total(%nocem_newids)";
	};
	column {
		name		"Total";
		format		"%7s";
		value		"$nocem_totalids{$key}";
		total		"total(%nocem_totalids)";
	};
};

section innd_no_permission {
	title	"INND no permission servers:";
	data	"%innd_no_permission";
	sort	"$innd_no_permission{$b} <=> $innd_no_permission{$a}";
	column {
		name		"System";
		format		"%-71.71s";
		value		"$key";
		format_total	"TOTAL: %-64.64s";
		total		"$num";
	};
	column {
		name		"Conn";
		format_name	"%7s";
		format		"%7d";
		value		"$innd_no_permission{$key}";
		total		"total(%innd_no_permission)";
	};
};

section innd_max_conn {
        title   "Too many incoming connections (innd):";
	data    "%innd_max_conn";
	sort    "$innd_max_conn{$b} <=> $innd_max_conn{$a}";
        column {
                name          "Server";
                format        "%-70.70s";
		value         "$key";
		format_total  "TOTAL: %-63.63s";
		total         "$num";
        };
        column {
                name          "Conn";
		format_name   "%8s";
                format        "%8d";
		value         "$innd_max_conn{$key}";
		total         "total(%innd_max_conn)";
        };
};

section innd_too_many_connects_per_minute {
	title	"INND too many connects per minute:";
	data	"%innd_too_many_connects_per_minute";
	sort	"$innd_too_many_connects_per_minute{$b} <=>
                 $innd_too_many_connects_per_minute{$a}";
	column {
		name		"System";
		format		"%-71.71s";
		value		"$key";
		format_total	"TOTAL: %-64.64s";
		total		"$num";
	};
	column {
		name		"Conn";
		format_name	"%7s";
		format		"%7d";
		value		"$innd_too_many_connects_per_minute{$key}";
		total		"total(%innd_too_many_connects_per_minute)";
	};
};

section innd_misc {
        title   "INND misc events:";
	data    "%innd_misc";
	sort    "$innd_misc{$b} <=> $innd_misc{$a}";
        column {
                name          "Events";
                format        "%-71.71s";
		value         "$key";
		format_total  "TOTAL: %-64.64s";
		total         "$num";
        };
        column {
                name          "Count";
                format_name   "%7s";
                format        "%7d";
		value         "$innd_misc{$key}";
		total         "total(%innd_misc)";
        };
};

section innd_misc_stat {
        title   "Miscellaneous innd statistics:";
	data    "%innd_misc_stat";
	sort    "$innd_misc_stat{$b} <=> $innd_misc_stat{$a}";
	double  true;
	top	10;
	#numbering true;
        column {
	        primary       true;
                name          "Event";
		format        "%-69.69s";
		value         "$key1";
		format_total  "TOTAL: %-62.62s";
		total         "$num";
        };
        column {
                name          "Server";
		format        "  %-67.67s";
		value         "$key2";
		total         "$num";
		format_total  "TOTAL: %-60.60s";
        };
        column {
                name          "Number";
		format_name   "%9s";
		format        "%9d";
		value         "$innd_misc_stat{$key1}{$key2}";
		total         "total(%innd_misc_stat)";
        };
};

section innfeed_connect {
	title	"Outgoing Feeds (innfeed) by Articles:";
	data	"%innfeed_offered";
	sort	"$innfeed_accepted{$b} <=> $innfeed_accepted{$a}";
	numbering true;
        column {
                name          "Server";
		format        "%-18.18s";
		value         "$key";
		format_total  "TOTAL: %-11.11s";
		total         "$num";
        };
        column {
                name          "Offered";
		format_name   "%7s";
		format        "%7d";
		value         "$innfeed_offered{$key}";
		total         "total(%innfeed_offered)";
        };
        column {
                name          "Taken";
		format_name   "%7s";
		format        "%7d";
		value         "$innfeed_accepted{$key}";
		total         "total(%innfeed_accepted)";
        };
        column {
                name          "Refused";
		format_name   "%7s";
		format        "%7d";
		value         "$innfeed_refused{$key}";
		total         "total(%innfeed_refused)";
        };
        column {
                name          "Reject";
		format_name   "%6s";
		format        "%6d";
		value         "$innfeed_rejected{$key}";
		total         "total(%innfeed_rejected)";
        };
        column {
                name          "Miss";
		format_name   "%6s";
		format        "%6d";
		value         "$innfeed_missing{$key}";
		total         "total(%innfeed_missing)";
        };
        column {
                name          "Spool";
		format_name   "%7s";
		format        "%7d";
		value         "$innfeed_spooled{$key}";
		total         "total(%innfeed_spooled)";
        };
        column {
                name          "%Took";
		format_name   "%5s";
		format        "%3d%%";
		value         "$innfeed_offered{$key} == 0 ? 0 :
		       $innfeed_accepted{$key} / $innfeed_offered{$key} * 100";
		total         "total(%innfeed_offered) == 0 ? 0 :
		     total(%innfeed_accepted) / total(%innfeed_offered) * 100";
        };
        column {
                name          "Elapsed";
		format_name   "%8s";
		format        "%9s";
		value         "time($innfeed_seconds{$key})";
		total         "time(total(%innfeed_seconds))";
        };
	graph {
	        title         "Outgoing feeds (innfeed) by Articles";
		type          histo3d;
		sort	      "%innfeed_accepted";
		data {
		          name    "Accepted";
			  color   "#0000FF";
			  value   "%innfeed_accepted";
                };
		data {
		          name    "Refused";
			  color   "#FFAF00";
			  value   "%innfeed_refused";
                };
		data {
		          name    "Rejected";
			  color   "#FF0000";
			  value   "%innfeed_rejected";
                };
		data {
		          name    "Missing";
			  color   "#00FF00";
			  value   "%innfeed_missing";
                };
		data {
		          name    "Spooled";
			  color   "#AF00FF";
			  value   "%innfeed_spooled,";
                };
	};
};

section innfeed_volume {
	title	"Outgoing Feeds (innfeed) by Volume:";
	data	"%innfeed_offered";
	sort	"$innfeed_accepted_size{$b} <=> $innfeed_accepted_size{$a}";
	numbering true;
	column {
		name		"Server";
		format		"%-17.17s";
		value		"$key";
		format_total	"TOTAL: %-10.10s";
		total		"$num";
	};
	column {
		name		"AcceptVol";
		format		"%9s";
		value		"bytes($innfeed_accepted_size{$key})";
		total		"bytes(total(%innfeed_accepted_size))";
	};
	column {
		name		"RejectVol";
		format		"%9s";
		value		"bytes($innfeed_rejected_size{$key})";
		total		"bytes(total(%innfeed_rejected_size))";
	};
	column {
		name		"TotalVol";
		format		"%9s";
		value		"bytes($innfeed_accepted_size{$key} +
	                               $innfeed_rejected_size{$key})";
		total		"bytes(total(%innfeed_accepted_size) +
                                       total(%innfeed_rejected_size))";
	};
	column {
		name		"Volume/sec";
		format_name	"%11s";
		format		"%9s/s";
		value		"bytes(($innfeed_accepted_size{$key} +
                                        $innfeed_rejected_size{$key}) /
                                    $innfeed_seconds{$key})";
		total		"bytes((total(%innfeed_accepted_size) +
                                        total(%innfeed_rejected_size)) /
                                    total(%innfeed_seconds))";
	};
	column {
		name		"Vol/Art";
		format		"%9s";
		value		"bytes(($innfeed_accepted_size{$key} +
                                        $innfeed_rejected_size{$key}) /
                                       ($innfeed_accepted{$key} +
                                        $innfeed_rejected{$key}))";
		total		"bytes((total(%innfeed_accepted_size) +
                                        total(%innfeed_rejected_size)) /
                                     (total(%innfeed_accepted) +
	                              total(%innfeed_rejected)))";
	};
	column {
		name		"Elapsed";
		format		"%9s";
		value		"time($innfeed_seconds{$key})";
		total		"time(total(%innfeed_seconds))";
	};
	graph {
		title		"Outgoing feeds (innfeed) by Volume";
		type		histo3d;
		sort		"%innfeed_accepted_size";
		data {
			name	"Accepted";
			color	"#0000FF";
			value	"%innfeed_accepted_size";
		};
		data {
			name	"Rejected";
			color	"#FFAF00";
			value	"%innfeed_rejected_size";
		};
		data {
			name	"Total";
			color	"#00FF00";
			value	"%innfeed_accepted_size +
                                 %innfeed_rejected_size";
		};
	};
};

section innfeed_shrunk {
        title   "Backlog files shrunk by innfeed:";
	data    "%innfeed_shrunk";
	sort    "$innfeed_shrunk{$b} <=> $innfeed_shrunk{$a}";
        column {
                name          "Server";
                format        "%-70.70s";
		value         "$key";
		format_total  "TOTAL: %-63.63s";
		total         "$num";
        };
        column {
                name          "Size";
                format        "%8s";
		value         "bytes($innfeed_shrunk{$key})";
		total         "bytes(total(%innfeed_shrunk))";
        };
};

section nntplink_connect {
        title   "Outgoing Feeds (nntplink):";
	data    "%nntplink_site";
	sort    "$nntplink_accepted{$b} <=> $nntplink_accepted{$a}";
	numbering true;
        column {
                name          "Server";
		format        "%-25.25s";
		value         "$key";
		format_total  "TOTAL: %-18.18s";
		total         "$num";
        };
        column {
                name          "Offered";
		format_name   "%8s";
		format        "%8d";
		value         "$nntplink_offered{$key}";
		total         "total(%nntplink_offered)";
        };
        column {
                name          "Taken";
		format_name   "%8s";
		format        "%8d";
		value         "$nntplink_accepted{$key}";
		total         "total(%nntplink_accepted)";
        };
        column {
                name          "Rejected";
		format_name   "%8s";
		format        "%8d";
		value         "$nntplink_rejected{$key}";
		total         "total(%nntplink_rejected)";
        };
        column {
                name          "Failed";
		format_name   "%8s";
		format        "%8d";
		value         "$nntplink_failed{$key}";
		total         "total(%nntplink_failed)";
        };
        column {
                name          "%Accpt";
		format_name   "%6s";
		format        "%5d%%";
		value         "$nntplink_offered{$key} == 0 ? 0 :
		     $nntplink_accepted{$key} / $nntplink_offered{$key} * 100";
		total         "total(%nntplink_offered) == 0 ? 0 :
		   total(%nntplink_accepted) / total(%nntplink_offered) * 100";
        };
        column {
                name          "Elapsed";
		format        "%10s";
		value         "time($nntplink_times{$key})";
		total         "time(total(%nntplink_times))";
        };
	graph {
	        title         "Outgoing Feeds (nntplink)";
		type          histo3d;
		sort	      "%nntplink_accepted";
		data {
		          name    "Articles accepted";
			  color   "#0000FF";
			  value   "%nntplink_accepted";
                };
		data {
		          name    "Articles rejected";
			  color   "#FFAF00";
			  value   "%nntplink_rejected";
                };
		data {
		          name    "Articles failed";
			  color   "#FF0000";
			  value   "%nntplink_failed";
                };
	};
};

section nntplink_connect2 {
        title   "Outgoing Feeds (nntplink) - other information:";
	data    "%nntplink_site";
	sort    "$nntplink_accepted{$b} <=> $nntplink_accepted{$a}";
	numbering true;
        column {
                name          "Server";
		format        "%-20.20s";
		value         "$key";
		format_total  "TOTAL: %-13.13s";
		total         "$num";
        };
        column {
                name          "Conn";
		format_name   "%4s";
		format        "%4d";
		value         "$nntplink_site{$key}";
		total         "total(%nntplink_site)";
        };
        column {
                name          "Ok";
		format_name   "%4s";
		format        "%4d";
		value         "$nntplink_site{$key} - ($nntplink_eof{$key} +
		               $nntplink_sockerr{$key} +
			       $nntplink_selecterr{$key} +
			       $nntplink_hiload{$key} + $nntplink_bpipe{$key} +
			       $nntplink_nospace{$key} + $nntplink_auth{$key} +
			       $nntplink_expire{$key} + $nntplink_fail{$key})";
		total         "total(%nntplink_site) - (total(%nntplink_eof) +
		               total(%nntplink_sockerr) +
			       total(%nntplink_selecterr) +
			       total(%nntplink_hiload) +
			       total(%nntplink_bpipe) +
			       total(%nntplink_nospace) +
			       total(%nntplink_auth) +
			       total(%nntplink_expire) +
			       total(%nntplink_fail))";
        };
        column {
                name          "EOF";
		format_name   "%3s";
		format        "%3d";
		value         "$nntplink_eof{$key}";
		total         "total(%nntplink_eof)";
        };
        column {
                name          "Sock";
		format_name   "%4s";
		format        "%4d";
		value         "$nntplink_sockerr{$key}";
		total         "total(%nntplink_sockerr)";
        };
        column {
                name          "Slct";
		format_name   "%4s";
		format        "%4d";
		value         "$nntplink_selecterr{$key}";
		total         "total(%nntplink_selecterr)";
        };
        column {
                name          "Load";
		format_name   "%4s";
		format        "%4d";
		value         "$nntplink_hiload{$key}";
		total         "total(%nntplink_hiload)";
        };
        column {
                name          "Bpip";
		format_name   "%4s";
		format        "%4d";
		value         "$nntplink_bpipe{$key}";
		total         "total(%nntplink_bpipe)";
        };
        column {
                name          "Spce";
		format_name   "%4s";
		format        "%4d";
		value         "$nntplink_nospace{$key}";
		total         "total(%nntplink_nospace)";
        };
        column {
                name          "Exp";
		format_name   "%4s";
		format        "%4d";
		value         "$nntplink_expire{$key}";
		total         "total(%nntplink_expire)";
        };
        column {
                name          "Auth";
		format_name   "%4s";
		format        "%4d";
		value         "$nntplink_auth{$key}";
		total         "total(%nntplink_auth)";
        };
        column {
                name          "Othr";
		format_name   "%4s";
		format        "%4d";
		value         "$nntplink_fail{$key}";
		total         "total(%nntplink_fail)";
        };
        column {
                name          "Pct";
		format_name   "%4s";
		format        "%3d%%";
		value         "$nntplink_site{$key} ?
		               100 * ($nntplink_site{$key} -
			       ($nntplink_eof{$key} + $nntplink_sockerr{$key} +
			       $nntplink_selecterr{$key} +
			       $nntplink_hiload{$key} + $nntplink_bpipe{$key} +
			       $nntplink_nospace{$key} + $nntplink_auth{$key} +
			       $nntplink_expire{$key} +
			    $nntplink_fail{$key})) / $nntplink_site{$key} : 0";
		total         "total(%nntplink_site) ?
		               100 * (total(%nntplink_site) -
			       (total(%nntplink_eof) +
			       total(%nntplink_sockerr) +
			       total(%nntplink_selecterr) +
			       total(%nntplink_hiload) +
			       total(%nntplink_bpipe) +
			       total(%nntplink_nospace) +
			       total(%nntplink_auth) +
			       total(%nntplink_expire) +
			  total(%nntplink_fail))) / total(%nntplink_site) : 0";
        };
};

section innxmit_connect {
	title	"Outgoing Feeds (innxmit) by Articles:";
	data    "%innxmit_times";
	sort    "$innxmit_accepted{$b} <=> $innxmit_accepted{$a}";
	numbering true;
        column {
                name          "Server";
		format        "%-27.27s";
		value         "$key";
		format_total  "TOTAL: %-20.20s";
		total         "$num";
        };
        column {
                name          "Offered";
		format_name   "%7s";
		format        "%7d";
		value         "$innxmit_offered{$key}";
		total         "total(%innxmit_offered)";
        };
        column {
                name          "Taken";
		format_name   "%7s";
		format        "%7d";
		value         "$innxmit_accepted{$key}";
		total         "total(%innxmit_accepted)";
        };
        column {
                name          "Refused";
		format_name   "%7s";
		format        "%7d";
		value         "$innxmit_refused{$key}";
		total         "total(%innxmit_refused)";
        };
        column {
                name          "Reject";
		format_name   "%7s";
		format        "%7d";
		value         "$innxmit_rejected{$key}";
		total         "total(%innxmit_rejected)";
        };
	column {
		name	      "Miss";
		format_name   "%5s";
		format	      "%5d";
		value	      "$innxmit_missing{$key}";
		total	      "total(%innxmit_rejected)";
	};
        column {
                name          "%Acc";
		format_name   "%4s";
		format        "%3d%%";
		value         "$innxmit_offered{$key} == 0 ? 0 :
		       $innxmit_accepted{$key} / $innxmit_offered{$key} * 100";
		total         "total(%innxmit_offered) == 0 ? 0 :
		     total(%innxmit_accepted) / total(%innxmit_offered) * 100";
        };
        column {
                name          "Elapsed";
		format        "%8s";
		value         "time($innxmit_times{$key})";
		total         "time(total(%innxmit_times))";
        };
	graph {
	        title         "Outgoing Feeds (innxmit)";
		type          histo3d;
		sort	      "%innxmit_accepted";
		data {
		          name    "Art. accepted";
			  color   "#0000FF";
			  value   "%innxmit_accepted";
                };
		data {
		          name    "Art. refused";
			  color   "#FFAF00";
			  value   "%innxmit_refused";
                };
		data {
		          name    "Art. rejected";
			  color   "#FF0000";
			  value   "%innxmit_rejected";
                };
		data {
		          name    "Art. missing";
			  color   "#00FF00";
			  value   "%innxmit_missing";
                };
	};
};

section innxmit_volume {
	title	"Outgoing Feeds (innxmit) by Volume:";
	data	"%innxmit_accepted_size";
	sort	"$innxmit_accepted_size{$b} <=> $innxmit_accepted_size{$a}";
	numbering true;
	column {
		name		"Server";
		format		"%-24.24s";
		value		"$key";
		format_total	"TOTAL: %-17.17s";
		total		"$num";
	};
	column {
		name		"AcceptVol";
		format		"%9s";
		value		"bytes($innxmit_accepted_size{$key})";
		total		"bytes(total(%innxmit_accepted_size))";
	};
	column {
		name		"RejectVol";
		format		"%9s";
		value		"bytes($innxmit_rejected_size{$key})";
		total		"bytes(total(%innxmit_rejected_size))";
	};
	column {
		name		"TotalVol";
		format		"%9s";
		value		"bytes($innxmit_accepted_size{$key} +
	                               $innxmit_rejected_size{$key} +
                                       $innxmit_bytes{$key})";
		total		"bytes(total(%innxmit_accepted_size) +
                                       total(%innxmit_rejected_size) +
                                       total(%innxmit_bytes))";
	};
	column {
		name		"KB/s";
		format_name	"%5s";
		format		"%5.1f";
		value		"($innxmit_accepted_size{$key} +
                                  $innxmit_rejected_size{$key} +
                                  $innxmit_bytes{$key}) /
                                    $innxmit_times{$key} / 1024";
		total		"(total(%innxmit_accepted_size) +
                                  total(%innxmit_rejected_size) +
                                  total(%innxmit_bytes)) /
                                    total(%innxmit_times) / 1024";
	};
	column {
		name		"Vol/Art";
		format		"%9s";
		value		"bytes(($innxmit_accepted_size{$key} +
                                        $innxmit_rejected_size{$key} +
                                        $innxmit_bytes{$key}) /
                                         ($innxmit_accepted{$key} +
                                          $innxmit_rejected{$key}))";
		total		"bytes((total(%innxmit_accepted_size) +
                                        total(%innxmit_rejected_size) +
        	                        total(%innxmit_bytes)) /
                                         (total(%innxmit_accepted) +
	                                  total(%innxmit_rejected)))";
	};
	column {
		name		"Elapsed";
		format		"%8s";
		value		"time($innxmit_times{$key})";
		total		"time(total(%innxmit_times))";
	};
	graph {
		title		"Outgoing Feeds (innxmit)";
		type		histo3d;
		sort		"%innxmit_accepted";
		data {
			name	"Articles accepted";
			color	"#0000FF";
			value	"%innxmit_accepted_size";
		};
		data {
			name	"Articles rejected";
			color	"#FFAF00";
			value	"%innxmit_rejected_size";
		};
		data {
			name	"Total";
			color	"#FF0000";
			value	"%innxmit_missing";
		};
	};
};


section innxmit_connect2 {
        title   "Outgoing Feeds (innxmit) - other information:";
	data    "%innxmit_site";
	sort    "$innxmit_accepted{$b} <=> $innxmit_accepted{$a}";
	numbering true;
        column {
                name          "Server";
		format        "%-25.25s";
		value         "$key";
		format_total  "TOTAL: %-18.18s";
		total         "$num";
        };
        column {
                name          "Conn";
		format_name   "%5s";
		format        "%5d";
		value         "$innxmit_site{$key}";
		total         "total(%innxmit_site)";
        };
        column {
                name          "Ok";
		format_name   "%5s";
		format        "%5d";
		value         "$innxmit_site{$key} -
		               ($innxmit_afail_host{$key} +
			       $innxmit_hiload{$key} + $innxmit_nospace{$key} +
			       $innxmit_cfail_host{$key} +
			     $innxmit_expire{$key} + $innxmit_crefused{$key})";
		total         "total(%innxmit_site) -
		               (total(%innxmit_afail_host) +
			       total(%innxmit_hiload) +
			       total(%innxmit_nospace) +
			       total(%innxmit_cfail_host) +
			       total(%innxmit_expire) +
			       total(%innxmit_crefused))";
        };
        column {
                name          "Auth";
		format_name   "%4s";
		format        "%4d";
		value         "$innxmit_afail_host{$key}";
		total         "total(%innxmit_afail_host)";
        };
        column {
                name          "Load";
		format_name   "%4s";
		format        "%4d";
		value         "$innxmit_hiload{$key}";
		total         "total(%innxmit_hiload)";
        };
        column {
                name          "Space";
		format_name   "%5s";
		format        "%5d";
		value         "$innxmit_nospace{$key}";
		total         "total(%innxmit_nospace)";
        };
        column {
                name          "Expire";
		format_name   "%6s";
		format        "%6d";
		value         "$innxmit_expire{$key}";
		total         "total(%innxmit_expire)";
        };
        column {
                name          "Connct";
		format_name   "%6s";
		format        "%6d";
		value         "$innxmit_cfail_host{$key}";
		total         "total(%innxmit_cfail_host)";
        };
        column {
                name          "Other";
		format_name   "%6s";
		format        "%6d";
		value         "$innxmit_crefused{$key}";
		total         "total(%innxmit_crefused)";
        };
        column {
                name          "Pct";
		format_name   "%4s";
		format        "%3d%%";
		value         "$innxmit_site{$key} ? 100 *
		               ($innxmit_site{$key} -
			       ($innxmit_afail_host{$key} +
			       $innxmit_hiload{$key} + $innxmit_nospace{$key} +
			       $innxmit_cfail_host{$key} +
			       $innxmit_expire{$key} +
			  $innxmit_crefused{$key})) / $innxmit_site{$key} : 0";
		total         "total(%innxmit_site) ?
		               100 * (total(%innxmit_site) -
			       (total(%innxmit_afail_host) +
			       total(%innxmit_hiload) +
			       total(%innxmit_nospace) +
			       total(%innxmit_cfail_host) +
			       total(%innxmit_expire) +
			total(%innxmit_crefused))) / total(%innxmit_site) : 0";
        };
};

section innxmit_unwanted {
        title   "Sites fed by innxmit rejecting bad articles:";
	data    "%innxmit_badart";
	sort    "$innxmit_badart{$b} <=> $innxmit_badart{$a}";
        column {
	numbering true;
                name          "Server";
                format        "%-23.23s";
		value         "$key";
		format_total  "TOTAL: %-16.16s";
		total         "$num";
        };
        column {
                name          "Total";
                format_name   "%6s";
                format        "%6d";
		value         "$innxmit_badart{$key}";
		total         "total(%innxmit_badart)";
        };
        column {
                name          "Group";
                format_name   "%6s";
                format        "%6d";
		value         "$innxmit_uw_ng_s{$key}";
		total         "total(%innxmit_uw_ng_s)";
        };
        column {
                name          "Dist";
                format_name   "%5s";
                format        "%5d";
		value         "$innxmit_uw_dist_s{$key}";
		total         "total(%innxmit_uw_dist_s)";
        };
        column {
                name          "Duplic";
                format_name   "%6s";
                format        "%6d";
		value         "$innxmit_duplicate{$key}";
		total         "total(%innxmit_duplicate)";
        };
        column {
                name          "Unapp";
                format_name   "%5s";
                format        "%5d";
		value         "$innxmit_unapproved{$key}";
		total         "total(%innxmit_unapproved)";
        };
        column {
                name          "TooOld";
                format_name   "%6s";
                format        "%6d";
		value         "$innxmit_tooold{$key}";
		total         "total(%innxmit_tooold)";
        };
        column {
                name          "Site";
                format_name   "%4s";
                format        "%4d";
		value         "$innxmit_uw_site{$key}";
		total         "total(%innxmit_uw_site)";
        };
        column {
                name          "Line";
                format_name   "%4s";
                format        "%4d";
		value         "$innxmit_linecount{$key}";
		total         "total(%innxmit_linecount)";
        };
        column {
                name          "Other";
                format_name   "%5s";
                format        "%5d";
		value         "$innxmit_others{$key}";
		total         "total(%innxmit_others)";
        };
};

section crosspost {
        title   "Crosspost stats:";
	data    "%crosspost";
        column {
                name          "Events";
                format        "%-63.63s";
		value         "$key";
		format_total  "TOTAL: %-56.56s";
		total         "$num";
        };
        column {
                name          "Number";
		value         "$crosspost{$key}";
		format        "%7s";
		total         "total(%crosspost)";
        };
        column {
                name          "Num/min";
		value         "$crosspost_times{$key}";
		format        "%7s";
		total         "total(%crosspost_times)";
        };
};

section batcher_elapsed {
        title   "UUCP batches created:";
	data    "%batcher_elapsed";
        column {
                name          "Server";
                format        "%-41.41s";
		value         "$key";
		format_total  "TOTAL: %-34.34s";
		total         "$num";
        };
        column {
                name          "Offered";
                format_name   "%7s";
                format        "%7d";
		value         "$batcher_offered{$key}";
		total         "total(%batcher_offered)";
        };
        column {
                name          "Articles";
                format_name   "%8s";
                format        "%8d";
		value         "$batcher_articles{$key}";
		total         "total(%batcher_articles)";
        };
        column {
                name          "Size";
                format        "%10s";
		value         "bytes($batcher_bytes{$key})";
		total         "bytes(total(%batcher_bytes))";
        };
        column {
                name          "Elapsed";
                format        "%9s";
		value         "time($batcher_elapsed{$key})";
		total         "time(total(%batcher_elapsed))";
        };
};

section rnews_host {
        title   "Rnews articles offered from:";
	data    "%rnews_host";
	sort    "$rnews_host{$b} <=> $rnews_host{$a}";
        column {
                name          "System";
                format        "%-71.71s";
		value         "$key";
		format_total  "TOTAL: %-64.64s";
		total         "$num";
        };
        column {
                name          "Offered";
                format_name   "%7s";
                format        "%7d";
		value         "$rnews_host{$key}";
		total         "total(%rnews_host)";
        };
};

section rnews_rejected {
        title   "Rnews connections rejected:";
	data    "%rnews_rejected";
	sort    "$rnews_rejected{$b} <=> $rnews_rejected{$a}";
        column {
                name          "Reason";
                format        "%-71.71s";
		value         "$key";
		format_total  "TOTAL: %-64.64s";
		total         "$num";
        };
        column {
                name          "Conn";
                format_name   "%7s";
                format        "%7d";
		value         "$rnews_rejected{$key}";
		total         "total(%rnews_rejected)";
        };
};

section rnews_misc {
        title   "Miscellaneous rnews statistics:";
	data    "%rnews_misc";
	sort    "$rnews_misc{$b} <=> $rnews_misc{$a}";
	double  true;
        column {
	        primary       true;
                name          "Event";
		format        "%-69.69s";
		value         "$key1";
		format_total  "TOTAL: %-62.62s";
		total         "";
        };
        column {
                name          "Element";
		format        "  %-67.67s";
		value         "$key2";
		total         "";
        };
        column {
                name          "Number";
		format_name   "%9s";
		format        "%9d";
		value         "$rnews_misc{$key1}{$key2}";
		total         "total(%rnews_misc)";
        };
};

section nnrpd_groups {
        title   "NNRP readership statistics:";
	data    "%nnrpd_connect";
	sort    "$nnrpd_articles{$b} <=> $nnrpd_articles{$a}";
	numbering true;
        column {
                name          "System";
                format        "%-30.30s";
		value         "$key";
		format_total  "TOTAL: %-23.23s";
		total         "$num";
        };
        column {
                name          "Conn";
                format_name   "%4s";
                format        "%4d";
		value         "$nnrpd_connect{$key}";
		total         "total(%nnrpd_connect)";
        };
        column {
                name          "Arts";
                format_name   "%6s";
                format        "%6d";
		value         "$nnrpd_articles{$key}";
		total         "total(%nnrpd_articles)";
        };
	column {
		name	      "Size";
		format	      "%9s";
		value	      "bytes($nnrpd_bytes{$key})";
		total	      "bytes(total(%nnrpd_bytes))";
        };
        column {
                name          "Groups";
                format_name   "%6s";
                format        "%6d";
		value         "$nnrpd_groups{$key}";
		total         "total(%nnrpd_groups)";
        };
        column {
                name          "Post";
                format_name   "%4s";
                format        "%4d";
		value         "$nnrpd_post_ok{$key}";
		total         "total(%nnrpd_post_ok)";
        };
        column {
                name          "Rej";
                format_name   "%4s";
                format        "%4d";
		value         "$nnrpd_post_rej{$key} +
                               $nnrpd_post_error{$key}";
		total         "total(%nnrpd_post_rej) +
		               total(%nnrpd_post_error)";
        };
        column {
                name          "Elapsed";
                format        "%9s";
		value         "time($nnrpd_times{$key})";
		total         "time(total(%nnrpd_times))";
        };
};

section nnrpd_dom_groups {
        title   "NNRP readership statistics (by domain):";
        data    "%nnrpd_dom_connect";
        sort    "$nnrpd_dom_articles{$b} <=> $nnrpd_dom_articles{$a}";
        numbering true;
        column {
                name          "System";
                format        "%-30.30s";
                value         "$key";
                format_total  "TOTAL: %-23.23s";
                total         "$num";
        };
        column {
                name          "Conn";
                format_name   "%4s";
                format        "%4d";
                value         "$nnrpd_dom_connect{$key}";
                total         "total(%nnrpd_dom_connect)";
        };
        column {
                name          "Arts";
                format_name   "%6s";
                format        "%6d";
                value         "$nnrpd_dom_articles{$key}";
                total         "total(%nnrpd_dom_articles)";
        };
        column {
                name          "Size";
                format        "%9s";
                value         "bytes($nnrpd_dom_bytes{$key})";
                total         "bytes(total(%nnrpd_dom_bytes))";
        };
        column {
                name          "Groups";
                format_name   "%6s";
                format        "%6d";
                value         "$nnrpd_dom_groups{$key}";
                total         "total(%nnrpd_dom_groups)";
        };
        column {
                name          "Post";
                format_name   "%4s";
                format        "%4d";
                value         "$nnrpd_dom_post_ok{$key}";
                total         "total(%nnrpd_dom_post_ok)";
        };
        column {
                name          "Rej";
                format_name   "%4s";
                format        "%4d";
                value         "$nnrpd_dom_post_rej{$key} +
	                       $nnrpd_dom_post_error{$key}";
                total         "total(%nnrpd_dom_post_rej) +
                               total(%nnrpd_dom_post_error)";
        };
        column {
                name          "Elapsed";
                format        "%9s";
                value         "time($nnrpd_dom_times{$key})";
                total         "time(total(%nnrpd_dom_times))";
        };
};

section nnrpd_auth {
        title   "NNRP auth users:";
	data    "%nnrpd_auth";
	top     20;
	sort    "$nnrpd_auth{$b} <=> $nnrpd_auth{$a}";
        column {
                name          "User";
                format        "%-71.71s";
		value         "$key";
		format_total  "TOTAL: %-64.64s";
		total         "$num";
        };
        column {
                name          "Conn";
                format_name   "%7s";
                format        "%7d";
		value         "$nnrpd_auth{$key}";
		total         "total(%nnrpd_auth)";
        };
};

section nnrpd_resource {
        title   "NNRP total resource statistics:";
        data    "%nnrpd_resource_elapsed";
	top     20;
	sort    "$nnrpd_resource_elapsed{$b} <=> $nnrpd_resource_elapsed{$a}";
        column {
                name          "System";
                format        "%-40.40s";
		format_total  "TOTAL: %-33.33s";
		value         "$key";
                total         "$num";
        };
        column {
                name          "User(ms)";
                format_name   "%9s";
                format        "%9.3f";
		value         "$nnrpd_resource_user{$key}";
                total         "total(%nnrpd_resource_user)";
        };
        column {
                name          "System(ms)";
                format_name   "%9s";
                format        "%9.3f";
		value         "$nnrpd_resource_system{$key}";
                total         "total(%nnrpd_resource_system)";
        };
        column {
                name          "Idle(ms)";
                format_name   "%9s";
                format        "%9.3f";
		value         "$nnrpd_resource_idle{$key}";
                total         "total(%nnrpd_resource_idle)";
        };
        column {
                name          "Elapsed";
		format_name   "%8s";
		format        "%9s";
		value         "time($nnrpd_resource_elapsed{$key})";
                total         "time(total(%nnrpd_resource_elapsed))";
        };
};

section nnrpd_curious {
        title   "Curious NNRP server explorers:";
	data    "%nnrpd_curious";
	top     20;
	sort    "$nnrpd_curious{$b} <=> $nnrpd_curious{$a}";
        column {
                name          "System";
                format        "%-71.71s";
		value         "$key";
		format_total  "TOTAL: %-64.64s";
		total         "$num";
        };
        column {
                name          "Conn";
                format_name   "%7s";
                format        "%7d";
		value         "$nnrpd_curious{$key}";
		total         "total(%nnrpd_curious)";
        };
};

section nnrpd_no_permission {
        title   "NNRP no permission clients:";
	data    "%nnrpd_no_permission";
	sort    "$nnrpd_no_permission{$b} <=> $nnrpd_no_permission{$a}";
        column {
                name          "System";
                format        "%-71.71s";
		value         "$key";
		format_total  "TOTAL: %-64.64s";
		total         "$num";
        };
        column {
                name          "Conn";
                format_name   "%7s";
                format        "%7d";
		value         "$nnrpd_no_permission{$key}";
		total         "total(%nnrpd_no_permission)";
        };
};

section nnrpd_gethostbyaddr {
        title   "NNRP gethostbyaddr failures:";
	data    "%nnrpd_gethostbyaddr";
	top     20;
	sort    "$nnrpd_gethostbyaddr{$b} <=> $nnrpd_gethostbyaddr{$a}";
        column {
                name          "System";
                format        "%-71.71s";
		value         "$key";
		format_total  "TOTAL: %-64.64s";
		total         "$num";
        };
        column {
                name          "Conn";
                format_name   "%7s";
                format        "%7d";
		value         "$nnrpd_gethostbyaddr{$key}";
		total         "total(%nnrpd_gethostbyaddr)";
        };
};

section nnrpd_unrecognized {
        title   "NNRP unrecognized commands (by host):";
	data    "%nnrpd_unrecognized";
	sort    "$nnrpd_unrecognized{$b} <=> $nnrpd_unrecognized{$a}";
        column {
                name          "System";
                format        "%-71.71s";
		value         "$key";
		format_total  "TOTAL: %-64.64s";
		total         "$num";
        };
        column {
                name          "Conn";
                format_name   "%7s";
                format        "%7d";
		value         "$nnrpd_unrecognized{$key}";
		total         "total(%nnrpd_unrecognized)";
        };
};

section nnrpd_unrecognized2 {
        title   "NNRP unrecognized commands (by command):";
	data    "%nnrpd_unrecogn_cmd";
	sort    "$nnrpd_unrecogn_cmd{$b} <=> $nnrpd_unrecogn_cmd{$a}";
        column {
                name          "Command";
                format        "%-71.71s";
		value         "$key";
		format_total  "TOTAL: %-64.64s";
		total         "$num";
        };
        column {
                name          "Count";
                format_name   "%7s";
                format        "%7d";
		value         "$nnrpd_unrecogn_cmd{$key}";
		total         "total(%nnrpd_unrecogn_cmd)";
        };
};

section nnrpd_timeout {
        title   "NNRP client timeouts:";
	data    "%nnrpd_timeout";
	top     20;
	sort    "$nnrpd_timeout{$b} <=> $nnrpd_timeout{$a}";
        column {
                name          "System";
                format        "%-67.67s";
		value         "$key";
		format_total  "TOTAL: %-60.60s";
		total         "$num";
        };
        column {
                name          "Conn";
                format_name   "%5s";
                format        "%5d";
		value         "$nnrpd_timeout{$key}";
		total         "total(%nnrpd_timeout)";
        };
        column {
                name          "Peer";
                format_name   "%5s";
                format        "%5d";
		value         "$nnrpd_reset_peer{$key}";
		total         "total(%nnrpd_reset_peer)";
        };
};

section nnrpd_hierarchy {
        title   "Newsgroup request counts (by category):";
	data    "%nnrpd_hierarchy";
	sort    "$nnrpd_hierarchy{$b} <=> $nnrpd_hierarchy{$a}";
	numbering true;
        column {
                name          "Category";
                format        "%-64.64s";
		value         "$key";
		format_total  "TOTAL: %-57.57s";
		total         "$num";
        };
        column {
                name          "Count";
                format_name   "%7s";
                format        "%7d";
		value         "$nnrpd_hierarchy{$key}";
		total         "total(%nnrpd_hierarchy)";
        };
        column {
                name          "Pct";
                format_name   "%6s";
                format        "%5.1f%%";
		value         "$nnrpd_hierarchy{$key} /
		               total(%nnrpd_hierarchy) * 100";
		total         "100";
        };
	# graph : type piechart
};

section nnrpd_group {
        title   "Newsgroup request counts (by newsgroup):";
	data    "%nnrpd_group";
	sort    "$nnrpd_group{$b} <=> $nnrpd_group{$a}";
	top     100;
	numbering true;
        column {
                name          "Newsgroup";
                format        "%-71.71s";
		value         "$key";
		format_total  "TOTAL: %-64.64s";
		total         "$num";
        };
        column {
                name          "Count";
                format_name   "%7s";
                format        "%7d";
		value         "$nnrpd_group{$key}";
		total         "total(%nnrpd_group)";
        };
};

section ihave_site {
	title	"IHAVE messages offered from:";
	data	"%controlchan_ihave_site";
	sort	"$controlchan_ihave_site{$b} <=> $controlchan_ihave_site{$a}";
	column {
		name		"System";
		format		"%-71.71s";
		value		"$key";
		format_total	"TOTAL: %-64.64s";
		total		"$num";
	};
	column {
		name		"Offered";
		format_name	"%7s";
		format		"%7d";
		value		"$controlchan_ihave_site{$key}";
		total		"total(%controlchan_ihave_site)";
	};
};

section sendme_site {
	title	"SENDME messages offered from:";
	data	"%controlchan_sendme_site";
	sort	"$controlchan_sendme_site{$b} <=>
	         $controlchan_sendme_site{$a}";
	column {
		name		"System";
		format		"%-71.71s";
		value		"$key";
		format_total	"TOTAL: %-64.64s";
		total		"$num";
	};
	column {
		name		"Offered";
		format_name	"%7s";
		format		"%7d";
		value		"$controlchan_sendme_site{$key}";
		total		"total(%controlchan_sendme_site)";
	};
};
