🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
9 messages
9 total messages Started by Ricardo Stella Mon, 20 Apr 1998 00:00
INN stats to MRTG
#27730
Author: Ricardo Stella
Date: Mon, 20 Apr 1998 00:00
16 lines
1011 bytes
Has anyone done something similar ?

I would like to integrate stats to MRTG.

Thanks in advance.

inn 1.7.2+insync, Solaris 2.6, innreport

-- 
------------------------------------------------------------------
 Ricardo Stella - O.I.T.                 stella@library.rider.edu
 Lib. 234C (609)896-5000 x7436  _suAve_  Rider University
  *** Remove 'no-spam' from e-mail address before replying.  ***

Re: INN stats to MRTG
#27761
Author: bosco
Date: Tue, 21 Apr 1998 00:00
28 lines
1538 bytes
Yes, I am doing so. I am using INFLOW to collect the article information, then
use a script to extract the hourly value, and graph it via MRTG.

--
In article <353B9E8F.2842E0E9@poseidon.rider.edu>,
  Ricardo Stella <stella@NO-SPAM.library.rider.edu> wrote:
>
> Has anyone done something similar ?
>
> I would like to integrate stats to MRTG.
>
> Thanks in advance.
>
> inn 1.7.2+insync, Solaris 2.6, innreport
>
> --
> ------------------------------------------------------------------
>  Ricardo Stella - O.I.T.                 stella@library.rider.edu
>  Lib. 234C (609)896-5000 x7436  _suAve_  Rider University
>   *** Remove 'no-spam' from e-mail address before replying.  ***
>


-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/   Now offering spam-free web-based newsreading

Re: INN stats to MRTG
#27773
Author: Dave Barr
Date: Tue, 21 Apr 1998 00:00
14 lines
1050 bytes
In article <6hiq9f$bmn$1@nnrp1.dejanews.com>,  <bosco@ipoline.com> wrote:
>Yes, I am doing so. I am using INFLOW to collect the article information, then
>use a script to extract the hourly value, and graph it via MRTG.

Could you post what you're using to do this?  I'm sure there are
other MRTG users who would like to do this.

--Dave
-- 
http://www.cis.ohio-state.edu/~barr/
barr@cis.ohio-state.edu

Re: INN stats to MRTG
#27797
Author: Volker Schmidt
Date: Wed, 22 Apr 1998 00:00
17 lines
1259 bytes
In article <6hiq9f$bmn$1@nnrp1.dejanews.com>,
bosco@ipoline.com wrote:
: Yes, I am doing so. I am using INFLOW to collect the article information, then
: use a script to extract the hourly value, and graph it via MRTG.

Maybe you should also mention that INFLOW is available from 
<URL:ftp://ftp.switch.ch/info_service/netnews/wg/tools/inflow.tar.gz>

--volker
-- 
PGP key: <mailto:pgp-public-keys@keys.de.pgp.net> Subject: GET 0x8F679A35

"Unix --- Du denkst, es laeuft und es laeuft besser, als Du gedacht hast."
Stefan Stapelberg <stefan@rent-a-guru.de> in de.comp.os.unix

Re: INN stats to MRTG
#27808
Author: Jeff Liebermann
Date: Thu, 23 Apr 1998 00:00
92 lines
4215 bytes
On 21 Apr 1998 23:47:16 +0200, Stig Sandbeck Mathisen
<ssm@rlyeh.net> wrote:

>Ricardo Stella <stella@NO-SPAM.library.rider.edu> writes:
>> Has anyone done something similar ?
>> I would like to integrate stats to MRTG.
>> Thanks in advance.
>> inn 1.7.2+insync, Solaris 2.6, innreport
>
>MRTG just needs some numbers every five minutes, it should be easy (?)
>to make this in perl from a channel fed program (if you know perl, at
>least, I'm not that good yet), or from a program continuously tailing
>the logs.
>
>Then get MRTG to fetch that data every five minutes.
>(At least, in theory. :-)

It's easily done with a shell script and a bit of trashing.  I
built up a generalized shell script solution.  This monitors the
disk useage and inode useage for my news filesystem.  The shell
script can actually extract any INTEGER number and feed it to
MRTG in the manner shown.

The shell script that belches two numbers.  %used and %iused

-----------------------  Cut here ------------------------------
#!/bin/sh
# by Jeff Liebermann  04/15/98
#
# Get various diskspace numbers for MRTG.
#
# This is the format belched by df -v -i
# Mount Dir Filesystem  blocks used free %used iused ifree %iused
# /      /dev/root 1050000 972132  77868  93%  59872 71384   46%
# /stand /dev/boot   30000  16414  13586  55%     14  3746    1%
# /u     /dev/u     600000 252560 347440  43%   4259 70741    6%
# /usr/spool /dev/news 184492 5830 178662   4%      8 23056    1%
#
# Really disgusting way to get rid of extra leading spaces
# by feeding it to a shell variable.  Ugly at best.
#
# usage: whatever machine Filesystem
# i.e.   whatever comix /dev/root
#
retch=`rcmd $1 "df -v -i $2" | tail -1 | tr -d %` #News Filesys
set $retch	# break apart into fields using IFS seperators
echo $6		# Percentage diskspace used
echo $9		# Percentage inodes used
#


The section of mrtg.cfg that runs the rdf.sh script.  The
sub-directory "top" is a symlink to
/usr/local/etc/httpd/top-of-tree or wherever one locates the root
directory of their web server.  Note that the name of the
filesystem is specified as $2 and the name of the remote server
(comix) as $1.
-----------------------  Cut here ------------------------------
# News Disk Useage on comix
Target[rdf.4]: `/top/mrtg/bin/rdf.sh comix /dev/news`
Title[rdf.4]: Comix Disk Useage /dev/news
PageTop[rdf.4]: <H1>Comix Disk Useage /dev/news</H1>
Options[rdf.4]: growright, gauge, nopercent
MaxBytes[rdf.4]:100
# WithPeak[rdf.4]: dwmy
Unscaled[rdf.4]: dwmy
YLegend[rdf.4]: % Used
ShortLegend[rdf.4]: %
Legend1[rdf.4]: Avg Percent Diskspace Used
Legend2[rdf.4]: Avg Percent Inodes Used
# Legend3[rdf.4]:
# Legend4[rdf.4]:
LegendI[rdf.4]: Diskspace
LegendO[rdf.4]: Inodes
#---------------------------------------------------------------


If you don't want to use rcmd to get data from a remote server,
the script can be run locally without the rcmd.  Details on
request.  I've used the same general form of shell scripting to
extract numbers from sar, df, data loggers, and just about
anything that will belch numbers.

[ ]email  [x]news

Jeff Liebermann  150 Felker St. #D  Santa Cruz CA 95060
(408)699-0483 pager (408)426-1240 fax (408)336-2558 home
http://www.cruzio.com/~jeffl   WB6SSY
jeffl@comix.santa-cruz.ca.us   jeffl@cruzio.com

Re: INN stats to MRTG
#27820
Author: Fabien Tassin
Date: Thu, 23 Apr 1998 00:00
28 lines
1828 bytes
On 21 Apr 1998 16:00:28 -0400, Dave Barr <barr@stumble.cis.ohio-state.edu> wrote:
> >Yes, I am doing so. I am using INFLOW to collect the article information, then
> >use a script to extract the hourly value, and graph it via MRTG.
> 
> Could you post what you're using to do this?  I'm sure there are
> other MRTG users who would like to do this.

I'm using MRTG with INN for several months.. well, in fact, I *was* using it.
I've planned to start it again (this time, in a more portable way, if
it is possible to do so with MRTG).

I've just started a Web page about this:

  http://nexus.oleane.net:1080/news/mrtg/

(it is not complete yet because I need time to dig into my archives (from my
previous job..) (if time permit). There's already an example but no source
yet)

Anyway, it is important to know that MRTG is very greedy with ressources
when it is used for non SNMP data. News servers are often heavily charged
so you must think twice about it.. unless you run MRTG on another machine..
 
-- 
Fabien Tassin -+- fta@oleane.net

Re: INN stats to MRTG
#27841
Author: brian moore
Date: Fri, 24 Apr 1998 00:00
34 lines
2307 bytes
On 23 Apr 1998 20:46:38 GMT, 
 Fabien Tassin <fta@oleane.net> wrote:
> On 21 Apr 1998 16:00:28 -0400, Dave Barr <barr@stumble.cis.ohio-state.edu> wrote:
> > >Yes, I am doing so. I am using INFLOW to collect the article information, then
> > >use a script to extract the hourly value, and graph it via MRTG.
> > 
> > Could you post what you're using to do this?  I'm sure there are
> > other MRTG users who would like to do this.
> 
> I'm using MRTG with INN for several months.. well, in fact, I *was* using it.
> I've planned to start it again (this time, in a more portable way, if
> it is possible to do so with MRTG).

I'm planning on hacking something similar, but using data that should be
easy to gather: have Cleanfeed log 'articles checked' and 'articles
accepted'.  Not as precise as the 'real' stats (since it will be
counting articles rejected for not being posted to a valid group, etc,
as being accepted, but close enough).

> Anyway, it is important to know that MRTG is very greedy with ressources
> when it is used for non SNMP data. News servers are often heavily charged
> so you must think twice about it.. unless you run MRTG on another machine..

Well, the real killer in mrtg is if the data gathering is difficult.
It should be trivial to hack the above stats into a file that mrtg
can snarf easily.  (And, yeah, with all the other junk I graph, mrtg
does run on a less busy machine. :))

-- 
Brian Moore                             Kill A Spammer For Jesus
Sysadmin, C/Perl Hacker, Usenet Vandal 

Re: INN stats to MRTG
#27866
Author: Jeff Liebermann
Date: Mon, 27 Apr 1998 00:00
74 lines
3792 bytes
On 26 Apr 1998 22:54:50 +0200, Stig Sandbeck Mathisen
<ssm@rlyeh.net> wrote:

>jeffl@comix.santa-cruz.ca.us (Jeff Liebermann) writes:
>
>> retch=`rcmd $1 "df -v -i $2" | tail -1 | tr -d %` #News Filesys
>> set $retch	# break apart into fields using IFS seperators
>> echo $6		# Percentage diskspace used
>> echo $9		# Percentage inodes used
>> #
>
>You could, of course, use awk instead of the variable thingie.  It's a
>bit cleaner.
>
>--> df -v -i . | tail -1 | td -d % | awk '{print $6"\n"$9}'

I tried that and ran into a minor problem.  The MRTG Perl scripts
do not like leading spaces in front of each number.  I had some
trouble getting rid of these spaces and simply gave up.  However,
I like your idea of adding the "\n".  Change my last two lines
to:
	echo "$6"\n"$9
and it's a bit cleaner.  Note that what I was trying to do was
supply a general purpose shell script method of extracting
numbers from common utilities and feeding them to MRTG.  

>As for getting data to MRTG, I use small daemons (with TCP wrappers)
>instead of rcmd.

Talking to a port instead of running rcmd is the right way to do
it.  However, I run all my data collection inside the firewall
and therefore have no need for packet filters and massive
security.  I only export the final graphs and HTML documents to
the outside world.  In this case, rcmd is acceptable.

Most sites have only one INN news server so leaving telnet
running as a daemon is not a problem.  However, I use MRTG to
collect all manner if statistics and traffic information from
every box that claims to have SNMP support.  Using a daemon per
interface would really clutter my process table.  Instead, I use
SNMP (snmpget or getone commands), rcmd to a shell script, or in
desperation, ftp or rcp the logfile and process it locally.  The
data collection options are many and no one method works for
everything.

(A very nice example of reading INN logs via IP ports deleted.
Thanks much).

I recently posted instructions to the MRTG mailing list on how to
do a general purpose read from a port as well as other examples
of MRTG data extraction.  For the benifit of those that want to
learn by destroying:

Plotting sar paging data.
   http://www.ee.ethz.ch/~slist/mrtg/msg04538.html
   http://www.ee.ethz.ch/~slist/mrtg/msg04553.html

How to setup tcp/ip to read anything from a socket.
   http://www.ee.ethz.ch/~slist/mrtg/msg04512.html

Try not to use a port number that is used by something else on
the system.  I accidently used the control port for my Milan
print server (2002) and was wondering why data collection was a
bit erratic.


--
Jeff Liebermann  150 Felker St #D  Santa Cruz CA 95060
(408)699-0483 pgr (408)426-1240 fax (408)336-2558 home
http://www.cruzio.com/~jeffl   WB6SSY
jeffl@comix.santa-cruz.ca.us   jeffl@cruzio.com

Re: INN stats to MRTG
#27899
Author: Matija Grabnar
Date: Wed, 29 Apr 1998 00:00
18 lines
1474 bytes
I am graphing INN performance through MRTG too, but in a different way:
I have a special feed opened to a small script that then counts articles
and their size as they come. This way, I can graph article flow (in kilobits
per second and articles per second) and average age of incoming articles.
I am also analyzing 'ps' output to determine the ammount of CPU and memory
consumed by various components (crosspost, fastrm, innfeed and innd itself),
as well as number of processes and ammount of memory consumed by nnrpds.

The information is then transfered via a small UDP packet to my MRTG graphing
machine.

-- 
"My name is Not Important. Not to friends. 
    But you can call me mr. Important"  - Not J. Important 
Matija.Grabnar@arnes.si

Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads