🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #90431

Re: Generating newsgroup stats

#90431
From: Jesse Rehmer
Date: Fri, 16 Jun 2023 18:22
66 lines
3786 bytes
On Jun 16, 2023 at 10:48:51 AM CDT, "John" <john@building-m.net> wrote:

> I'm running an INN server and I'd like to generate stats on 'where the
> posts go' -- which groups are getting the most posts in a given day.
> 
> Is this information already collected somewhere and I'm just unaware of
> it? Otherwise, it seems that the logs going to /var/log/news/news would
> be sufficient if they included the Newsgroups: header instead of just
> the Message-ID, but I don't see an option to include that in the logs on
> reading the inn.conf man page. This would actually be ideal because I
> could then feed the logs into my log analytics tool and get really
> detailed.
> 
> Suggestions?
> 
> John

I haven't looked at it in much detail but intend to try to implement at some
point, but in the INN source's contrib folder there is an analyze-traffic
script:

########################################################################
#
# analyze-traffic
#
# Written by Jeffrey M. Vinocur <jeff@litech.org>
# This work is hereby placed in the public domain by its author.
#
# Script for keeping track of which newsgroups are receiving the most
# traffic (by article count or byte usage), and which peer is most
# responsible for the traffic in each high-traffic group.
#
########################################################################
#
# Usage:
#
# 1.  Add an entry in $pathetc/newsfeeds like the one below, and issue
#     `ctlinnd reload newsfeeds traffic` (you can change the path to
#     whatever you like).
#
#             analyze!\
#                 :*\
#                 :Tf,WgsbmnN:/usr/local/news/log/traffic
#
#     You may find it useful to restrict the articles being logged,
#     either by modifing the wildmat pattern, or by using the /exclude
#     notation to indicate articles that have passed through some
#     servers should not be included.
#
#     Also, if $USE_ALL_GROUPS (see below) is false, you can leave out
#     the N flag, which may eliminate some parsing errors.
#
# 2.  Wait for some data.
#
# 3.  Run analyze-traffic on the logged data (you can pass the
#     filename as an argument or feed the data on standard input).
#     You probably want to pipe it into a file, `less`, or `tail` as the
#     output is a line for every group that has received an article
#     according the input data.
#
#     There are some options hardcoded into the script below, under
#     "Constants" -- check for customization, if you like.
#
# 4.  Be sure to comment out the newsfeeds entry when done, or set
#     up some sort of log rotation, or INN will eventually fill up your
#     disk...
Technical Details
Message-ID: <u6i99a$rnj$1@nnrp.usenet.blueworldhosting.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail
References: <86ilbnqufw.fsf@building-m.net>

Show Full Headers
Complete Article Headers
Message-ID: <u6i99a$rnj$1@nnrp.usenet.blueworldhosting.com>
Subject: Re: Generating newsgroup stats
Date: Fri, 16 Jun 2023 18:22:34 +0000
From: Jesse Rehmer <jesse.rehmer@blueworldhosting.com>
References: <86ilbnqufw.fsf@building-m.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail
Newsgroups: news.software.nntp
Organization: BlueWorld Hosting Usenet (https://usenet.blueworldhosting.com)
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=fixed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 16 Jun 2023 18:22:34 -0000 (UTC)
Injection-Info: nnrp.usenet.blueworldhosting.com; logging-data="28403"; mail-complaints-to="usenet@blueworldhosting.com"
User-Agent: Usenapp for MacOS
Cancel-Lock: sha1:rE2apeXtWIwm/WA3ZBcWi7QTML0= sha256:Dh5Y3SwysX1JENbyfXrxrxLFnWdFUEUDLdxLuhSlJCU= sha1:PyD14bY9LFA9llJQR8g5eejsVTk= sha256:AU0p03G2OY1vh+9MPtVlFs9djCRBNVEz8rwHtyWrwS0=
X-Usenapp: v1.27.1/d - Full License