Thu, 02 Apr 2009 14:01:28 +0200
Import package vendor original specs for necessary manipulations.
mrtg/mrtg.cfg | file | annotate | diff | comparison | revisions | |
mrtg/mrtg.spec | file | annotate | diff | comparison | revisions | |
mrtg/rc.mrtg | file | annotate | diff | comparison | revisions |
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/mrtg/mrtg.cfg Thu Apr 02 14:01:28 2009 +0200 1.3 @@ -0,0 +1,123 @@ 1.4 +## 1.5 +## mrtg.cfg -- MRTG Configuration 1.6 +## 1.7 + 1.8 +WorkDir: @l_prefix@/web/mrtg 1.9 +Imagedir: @l_prefix@/share/mrtg/icons 1.10 +Logdir: @l_prefix@/var/mrtg 1.11 + 1.12 +Refresh: 300 1.13 +RunAsDaemon: no 1.14 +Interval: 15 1.15 + 1.16 +Target[lo]: 1:public@localhost 1.17 +MaxBytes[lo]: 1250000 1.18 +Title[lo]: localhost : lo 1.19 +PageTop[lo]: <H3>Traffic Analysis for lo</H3> 1.20 +Options[lo]: growright,nobanner,nolegend,noinfo 1.21 + 1.22 +Target[eth0]: 2:public@localhost 1.23 +MaxBytes[eth0]: 1250000 1.24 +Title[eth0]: localhost : eth0 1.25 +PageTop[eth0]: <H3>Traffic Analysis for eth0</H3> 1.26 +Options[eth0]: growright,nobanner,nolegend,noinfo 1.27 + 1.28 +#Target[cpu]: 1.3.6.1.4.1.4007.42.1.2.3.1&1.3.6.1.4.1.4007.42.1.2.3.2:public@localhost 1.29 +#Title[cpu]: Processor Load 1.30 +#PageTop[cpu]: <H3>Processor Load</H3> 1.31 +#MaxBytes[cpu]: 500 1.32 +#Unscaled[cpu]: ymwd 1.33 +#Options[cpu]: growright,nopercent,gauge,nobanner,nolegend,noinfo,integer 1.34 +#LegendI[cpu]: load (5 minute) 1.35 +#LegendO[cpu]: load (15 minute) 1.36 +#Ylegend[cpu]: % 1.37 +#ShortLegend[cpu]: % 1.38 + 1.39 +#Target[proc]: 1.3.6.1.4.1.4007.42.1.2.4.2&1.3.6.1.4.1.4007.42.1.2.4.2:public@localhost 1.40 +#Title[proc]: Number of processes 1.41 +#PageTop[proc]: <H3>Number of processes</H3> 1.42 +#MaxBytes[proc]: 400 1.43 +#Unscaled[proc]: dymw 1.44 +#Options[proc]: gauge,nopercent,growright,nobanner,nolegend,noinfo 1.45 +#YLegend[proc]: Processes 1.46 +#LegendI[proc]: Nr. of Processes 1.47 +#LegendO[proc]: 1.48 +#ShortLegend[proc]: 1.49 + 1.50 +#Target[mem]: 1.3.6.1.4.1.4007.42.1.2.2.1.3&1.3.6.1.4.1.4007.42.1.2.2.2.3:public@localhost 1.51 +#MaxBytes[mem]: 1000 1.52 +#kMG[mem]: k 1.53 +#Title[mem]: Memory Usage 1.54 +#PageTop[mem]: <H3>Memory usage</H3> 1.55 +#Options[mem]: growright,nopercent,gauge,nobanner,nolegend,noinfo 1.56 +#LegendI[mem]: Real Mem Free 1.57 +#LegendO[mem]: Swap Free 1.58 +#YLegend[mem]: kbyte 1.59 +#ShortLegend[mem]: byte 1.60 + 1.61 +#Target[root]: 1.3.6.1.4.1.4007.42.1.2.7.1.1.6.1&1.3.6.1.4.1.4007.42.1.2.7.1.1.4.1:public@localhost 1.62 +#Options[root]: nopercent,growright,nobanner,nolegend,noinfo,integer,gauge 1.63 +#Title[root]: Disk usage for / 1.64 +#MaxBytes[root]: 250 1.65 +#kMG[root]: M 1.66 +#PageTop[root]: <H3>Disk usage /</H3> 1.67 +#LegendI[root]: free 1.68 +#LegendO[root]: total 1.69 +#YLegend[root]: MByte 1.70 +#ShortLegend[root]: Byte 1.71 + 1.72 +#Target[var]: 1.3.6.1.4.1.4007.42.1.2.7.1.1.6.3&1.3.6.1.4.1.4007.42.1.2.7.1.1.4.3:public@localhost 1.73 +#Options[var]: nopercent,growright,nobanner,nolegend,noinfo,integer,gauge 1.74 +#MaxBytes[var]: 2000 1.75 +#kMG[var]: M 1.76 +#Title[var]: <H3>Disk usage for /var</H3> 1.77 +#PageTop[var]: Disk usage /var 1.78 +#LegendI[var]: free 1.79 +#LegendO[var]: total 1.80 +#YLegend[var]: MByte 1.81 +#ShortLegend[var]: Byte 1.82 + 1.83 +#Target[usr]: 1.3.6.1.4.1.4007.42.1.2.7.1.1.6.4&1.3.6.1.4.1.4007.42.1.2.7.1.1.4.4:public@localhost 1.84 +#Options[usr]: nopercent,growright,nobanner,nolegend,noinfo,integer,gauge 1.85 +#MaxBytes[usr]: 2000 1.86 +#kMG[usr]: M 1.87 +#Title[usr]: <H3>Disk usage for /usr</H3> 1.88 +#PageTop[usr]: Disk usage /usr 1.89 +#LegendI[usr]: free 1.90 +#LegendO[usr]: total 1.91 +#YLegend[usr]: MByte 1.92 +#ShortLegend[usr]: Byte 1.93 + 1.94 +#Target[d1]: 1.3.6.1.4.1.4007.42.1.2.7.1.1.6.5&1.3.6.1.4.1.4007.42.1.2.7.1.1.4.5:public@localhost 1.95 +#Options[d1]: nopercent,growright,nobanner,nolegend,noinfo,gauge 1.96 +#MaxBytes[d1]: 30000 1.97 +#kMG[d1]: M 1.98 +#Title[d1]: Disk usage for /d1 1.99 +#PageTop[d1]: <H3>Disk usage cw, www</H3> 1.100 +#LegendI[d1]: free 1.101 +#LegendO[d1]: total 1.102 +#YLegend[d1]: MByte 1.103 +#ShortLegend[d1]: Byte 1.104 + 1.105 +#Target[d2]: 1.3.6.1.4.1.4007.42.1.2.7.1.1.6.6&1.3.6.1.4.1.4007.42.1.2.7.1.1.4.6:public@localhost 1.106 +#Options[d2]: nopercent,growright,nobanner,nolegend,noinfo,gauge 1.107 +#MaxBytes[d2]: 40000 1.108 +#kMG[d2]: M 1.109 +#Title[d2]: Disk usage for /d2 1.110 +#PageTop[d2]: <H3>Disk usage mail, dmail, mail home</H3> 1.111 +#LegendI[d2]: free 1.112 +#LegendO[d2]: total 1.113 +#YLegend[d2]: MByte 1.114 +#ShortLegend[d2]: Byte 1.115 + 1.116 +#Target[boot]: 1.3.6.1.4.1.4007.42.1.2.7.1.1.6.2&1.3.6.1.4.1.4007.42.1.2.7.1.1.4.2:public@localhost 1.117 +#Options[boot]: nopercent,growright,nobanner,nolegend,noinfo,integer,gauge 1.118 +#MaxBytes[boot]: 40 1.119 +#kMG[boot]: M 1.120 +#Title[boot]: Disk usage for /boot 1.121 +#PageTop[boot]: <H3>Disk usage Kernel</H3> 1.122 +#LegendI[boot]: free 1.123 +#LegendO[boot]: total 1.124 +#YLegend[boot]: MByte 1.125 +#ShortLegend[boot]: Byte 1.126 +
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/mrtg/mrtg.spec Thu Apr 02 14:01:28 2009 +0200 2.3 @@ -0,0 +1,109 @@ 2.4 +## 2.5 +## mrtg.spec -- OpenPKG RPM Package Specification 2.6 +## Copyright (c) 2000-2008 OpenPKG Foundation e.V. <http://openpkg.net/> 2.7 +## 2.8 +## Permission to use, copy, modify, and distribute this software for 2.9 +## any purpose with or without fee is hereby granted, provided that 2.10 +## the above copyright notice and this permission notice appear in all 2.11 +## copies. 2.12 +## 2.13 +## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 2.14 +## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 2.15 +## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 2.16 +## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR 2.17 +## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 2.18 +## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 2.19 +## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 2.20 +## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 2.21 +## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 2.22 +## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 2.23 +## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2.24 +## SUCH DAMAGE. 2.25 +## 2.26 + 2.27 +# package information 2.28 +Name: mrtg 2.29 +Summary: Multi Router Traffic Grapher 2.30 +URL: http://oss.oetiker.ch/mrtg/ 2.31 +Vendor: Tobias Oetiker 2.32 +Packager: OpenPKG Foundation e.V. 2.33 +Distribution: OpenPKG Community 2.34 +Class: PLUS 2.35 +Group: Monitoring 2.36 +License: GPL 2.37 +Version: 2.16.2 2.38 +Release: 20080516 2.39 + 2.40 +# list of sources 2.41 +Source0: http://oss.oetiker.ch/mrtg/pub/mrtg-%{version}.tar.gz 2.42 +Source1: mrtg.cfg 2.43 +Source2: rc.mrtg 2.44 + 2.45 +# build information 2.46 +Prefix: %{l_prefix} 2.47 +BuildRoot: %{l_buildroot} 2.48 +BuildPreReq: OpenPKG, openpkg >= 20060823, perl, zlib, gd, png 2.49 +PreReq: OpenPKG, openpkg >= 20060823, perl, zlib, gd, png, snmp 2.50 +AutoReq: no 2.51 +AutoReqProv: no 2.52 + 2.53 +%description 2.54 + The Multi Router Traffic Grapher (MRTG) is a tool to monitor the traffic 2.55 + load on network-links. MRTG generates HTML pages containing graphical 2.56 + images which provide a LIVE visual representation of this traffic. 2.57 + 2.58 +%track 2.59 + prog mrtg = { 2.60 + version = %{version} 2.61 + url = http://oss.oetiker.ch/mrtg/pub/ 2.62 + regex = mrtg-(__VER__)\.tar\.gz 2.63 + } 2.64 + 2.65 +%prep 2.66 + %setup -q 2.67 + %{l_shtool} subst \ 2.68 + -e 's;mrtg2";mrtg";g' \ 2.69 + bin/* 2.70 + 2.71 +%build 2.72 + CC="%{l_cc}" \ 2.73 + CFLAGS="%{l_cflags -O}" \ 2.74 + CPPFLAGS="%{l_cppflags}" \ 2.75 + LDFLAGS="%{l_ldflags}" \ 2.76 + ./configure \ 2.77 + --prefix=%{l_prefix} \ 2.78 + --with-gd=%{l_prefix} \ 2.79 + --with-z=%{l_prefix} \ 2.80 + --with-png=%{l_prefix} 2.81 + %{l_make} %{l_mflags -O} 2.82 + 2.83 +%install 2.84 + rm -rf $RPM_BUILD_ROOT 2.85 + %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT 2.86 + %{l_shtool} mkdir -f -p -m 755 \ 2.87 + $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \ 2.88 + $RPM_BUILD_ROOT%{l_prefix}/etc/mrtg \ 2.89 + $RPM_BUILD_ROOT%{l_prefix}/var/mrtg \ 2.90 + $RPM_BUILD_ROOT%{l_prefix}/web/mrtg 2.91 + %{l_shtool} install -c -m 755 %{l_value -s -a} \ 2.92 + %{SOURCE rc.mrtg} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/ 2.93 + %{l_shtool} install -c -m 644 %{l_value -s -a} \ 2.94 + %{SOURCE mrtg.cfg} $RPM_BUILD_ROOT%{l_prefix}/etc/mrtg/ 2.95 + mv $RPM_BUILD_ROOT%{l_prefix}/lib/mrtg2 \ 2.96 + $RPM_BUILD_ROOT%{l_prefix}/lib/mrtg 2.97 + mv $RPM_BUILD_ROOT%{l_prefix}/share/mrtg2 \ 2.98 + $RPM_BUILD_ROOT%{l_prefix}/share/mrtg 2.99 + mv -f $RPM_BUILD_ROOT%{l_prefix}/share/doc/mrtg2 \ 2.100 + $RPM_BUILD_ROOT%{l_prefix}/share/mrtg/doc 2.101 + rmdir $RPM_BUILD_ROOT%{l_prefix}/share/doc 2.102 + strip $RPM_BUILD_ROOT%{l_prefix}/bin/rateup >/dev/null 2>&1 || true 2.103 + %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ 2.104 + %{l_files_std} \ 2.105 + '%config %{l_prefix}/etc/mrtg/mrtg.cfg' \ 2.106 + '%doc %{l_prefix}/share/mrtg/doc/*' 2.107 + 2.108 +%files -f files 2.109 + 2.110 +%clean 2.111 + rm -rf $RPM_BUILD_ROOT 2.112 +
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 3.2 +++ b/mrtg/rc.mrtg Thu Apr 02 14:01:28 2009 +0200 3.3 @@ -0,0 +1,17 @@ 3.4 +#!@l_prefix@/bin/openpkg rc 3.5 +## 3.6 +## rc.mrtg -- Run-Commands 3.7 +## 3.8 + 3.9 +%config 3.10 + mrtg_enable="$openpkg_rc_def" 3.11 + 3.12 +%quarterly -u @l_susr@ 3.13 + rcService mrtg enable yes || exit 0 3.14 + export LANG=C 3.15 + @l_prefix@/bin/mrtg \ 3.16 + --pid-file=@l_prefix@/var/mrtg/mrtg.pid \ 3.17 + --lock-file=@l_prefix@/var/mrtg/mrtg.lock \ 3.18 + --confcache-file=@l_prefix@/var/mrtg/mrtg.cache \ 3.19 + @l_prefix@/etc/mrtg/mrtg.cfg 3.20 +