diff --git a/SPECS/filter-provides-mrtg.sh b/SPECS/filter-provides-mrtg.sh new file mode 100755 index 0000000..509570b --- /dev/null +++ b/SPECS/filter-provides-mrtg.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +/usr/lib/rpm/find-provides "$@" | grep -v 'perl(\(SNMP_util\|SNMP_Session\|BER\|SNMPv1_Session\|SNMPv2c_Session\))' +exit 0 diff --git a/SPECS/filter-requires-mrtg.sh b/SPECS/filter-requires-mrtg.sh new file mode 100755 index 0000000..b4295eb --- /dev/null +++ b/SPECS/filter-requires-mrtg.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +/usr/lib/rpm/find-requires "$@" | grep -v 'perl(\(GD\|MRP::BaseClass\|Net::SNMP\))' diff --git a/SPECS/mrtg-2.17.7.tar.gz b/SPECS/mrtg-2.17.7.tar.gz new file mode 100644 index 0000000..468092a Binary files /dev/null and b/SPECS/mrtg-2.17.7.tar.gz differ diff --git a/SPECS/mrtg-2.17.7.tar.gz.md5 b/SPECS/mrtg-2.17.7.tar.gz.md5 new file mode 100644 index 0000000..7c6cb84 --- /dev/null +++ b/SPECS/mrtg-2.17.7.tar.gz.md5 @@ -0,0 +1 @@ +eada3870c0419e425299401486600d95 mrtg-2.17.7.tar.gz diff --git a/SPECS/mrtg-httpd.conf b/SPECS/mrtg-httpd.conf new file mode 100644 index 0000000..b2fd2ea --- /dev/null +++ b/SPECS/mrtg-httpd.conf @@ -0,0 +1,12 @@ +# +# This configuration file maps the mrtg output (generated daily) +# into the URL space. By default these results are only accessible +# from the local host. +# +Alias /mrtg /var/www/mrtg + + + Require local + # Require ip 10.1.2.3 + # Require host example.org + diff --git a/SPECS/mrtg.cfg b/SPECS/mrtg.cfg new file mode 100644 index 0000000..567f977 --- /dev/null +++ b/SPECS/mrtg.cfg @@ -0,0 +1,30 @@ +###################################################################### +# Multi Router Traffic Grapher -- Example Configuration File +###################################################################### +# This file is for use with mrtg-2.0 +# +# Note: +# +# * Keywords must start at the begin of a line. +# +# * Lines which follow a keyword line which do start +# with a blank are appended to the keyword line +# +# * Empty Lines are ignored +# +# * Lines starting with a # sign are comments. + +# Where should the logfiles, and webpages be created? + +# Minimal mrtg.cfg +#-------------------- + +HtmlDir: @CONTENTDIR@ +ImageDir: @CONTENTDIR@ +LogDir: @LIBDIR@ +ThreshDir: @LIBDIR@ +#Target[r1]: 2:public@myrouter.somplace.edu +#MaxBytes[r1]: 1250000 +#Title[r1]: Traffic Analysis +#PageTop[r1]:

Stats for our Ethernet

+ diff --git a/SPECS/mrtg.service b/SPECS/mrtg.service new file mode 100644 index 0000000..e480970 --- /dev/null +++ b/SPECS/mrtg.service @@ -0,0 +1,36 @@ +# To customize, copy this file to /etc/systemd/system and edit there +# +# This unit facilitates starting of MRTG. There are 2 options of +# how to run MRTG: +# - as a daemon (preferred); in this case please put +# RunAsDaemon: yes in mrtg.conf (or use --daemon switch) +# - periodically - please see and enable mrtg.timer +# Periodic settings need Type=oneshot set here +# +# Other recommended settings in mrtg.cfg for daemon mode: +# NoDetach: yes +# If you set this, change below Type=simple +# +# Please disable /etc/crond.d/mrtg job when using this unit! +# +# do not enable both mrtg-as-a-daemon and timer at the same time + +[Unit] +Description=Multi-router Traffic Grapher +After=syslog.target + +[Service] +Environment=LANG=C +ExecStart=/usr/bin/mrtg /etc/mrtg/mrtg.cfg --lock-file /var/lock/mrtg/mrtg_l --confcache-file /var/lib/mrtg/mrtg.ok +# Type= settings cheatsheet: +# - RunAsDaemon: yes; NoDetach: yes : +#Type=simple +# - RunAsDaemon: yes; NoDetach: no : +#Type=forking +# - RunAsDaemon: no; (periodic invocation) : +#Type=oneshot +Type=simple +StandardOutput=syslog + +[Install] +WantedBy=multi-user.target diff --git a/SPECS/mrtg.timer b/SPECS/mrtg.timer new file mode 100644 index 0000000..814627c --- /dev/null +++ b/SPECS/mrtg.timer @@ -0,0 +1,20 @@ +# To customize, copy this file to /etc/systemd/system and edit there +# +# You can use this unit to periodically run mrtg.service. +# Only enable if you do not want to run mrtg as a daemon. +# Starting mrtg.timer while mrtg.service is running as a daemon has no point. +# +# Please disable /etc/crond.d/mrtg job when using this unit! +# +# Default is to run mrtg.service every 5 minutes, starting +# 1 minute after system boot. + +[Unit] +Description=periodic invocation of MRTG + +[Timer] +OnBootSec=1m +OnUnitActiveSec=5m + +[Install] +WantedBy=multi-user.target diff --git a/SPECS/mrtg.tmpfiles b/SPECS/mrtg.tmpfiles new file mode 100644 index 0000000..80ad928 --- /dev/null +++ b/SPECS/mrtg.tmpfiles @@ -0,0 +1 @@ +d /var/lock/mrtg 0755 root root -