From a40ae75d8c76fe578f54cd5afd879de4ae0b744f Mon Sep 17 00:00:00 2001 From: Tim Wilde Date: Sun, 30 Oct 2011 00:54:08 +0000 Subject: Automatically configure etc/config.dist paths --- configure.ac | 11 ++-- etc/config.dist | 146 ----------------------------------------------------- etc/config.dist.in | 146 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 150 insertions(+), 153 deletions(-) delete mode 100644 etc/config.dist create mode 100644 etc/config.dist.in diff --git a/configure.ac b/configure.ac index 2ff9ff3..d1e2efc 100644 --- a/configure.ac +++ b/configure.ac @@ -39,6 +39,7 @@ AC_PATH_PROG(RM, rm, no) AC_PATH_PROG(RMDIR, rmdir, no) AC_PATH_PROG(MKDIR, mkdir, no) AC_PATH_PROG(FIND, find, no) +AC_PATH_PROG(SENDMAIL, sendmail, /path/to/sendmail, [$PATH$PATH_SEPARATOR/usr/sbin$PATH_SEPARATOR/usr/lib]) AC_PATH_PROGS(NROFF, [gnroff nroff]) AC_ARG_VAR(GMAKE, [Path to local GNU Make binary]) @@ -80,13 +81,9 @@ AC_SUBST(PERL5LIB) mod_ok=1 if test "$enable_pkgonly" != yes; then - prfx=$prefix - if test x$prfx = xNONE; then - prfx=$ac_default_prefix - fi for module in RRDs FCGI CGI CGI::Fast Config::Grammar Digest::HMAC_MD5 LWP; do AC_MSG_CHECKING([checking for perl module '$module']) - if ${PERL} -I$prfx/thirdparty/lib/perl5 -e 'use '$module 2>/dev/null ; then + if ${PERL} -I$prefix/thirdparty/lib/perl5 -e 'use '$module 2>/dev/null ; then AC_MSG_RESULT([Ok]) else AC_MSG_RESULT([Failed]) @@ -107,7 +104,7 @@ if test "$enable_pkgonly" != yes; then Now you can install local copies of the missing modules by running - ./setup/build-perl-modules.sh ${prfx}/thirdparty + ./setup/build-perl-modules.sh ${prefix}/thirdparty The RRDs perl module is part of RRDtool. Either use the rrdtool package provided by your OS or install rrdtool from source. @@ -121,7 +118,7 @@ NOTES fi -AC_CONFIG_FILES([Makefile bin/Makefile doc/Makefile htdocs/Makefile etc/Makefile lib/Makefile]) +AC_CONFIG_FILES([Makefile bin/Makefile doc/Makefile htdocs/Makefile etc/Makefile lib/Makefile etc/config.dist]) AC_SUBST(VERSION) diff --git a/etc/config.dist b/etc/config.dist deleted file mode 100644 index f641cac..0000000 --- a/etc/config.dist +++ /dev/null @@ -1,146 +0,0 @@ -*** General *** - -owner = Peter Random -contact = some@address.nowhere -mailhost = my.mail.host -sendmail = /usr/lib/sendmail -# NOTE: do not put the Image Cache below cgi-bin -# since all files under cgi-bin will be executed ... this is not -# good for images. -imgcache = /home/oetiker/public_html/smokeping-ms/cache -imgurl = cache -datadir = /tmp/smokeping-ms/data -piddir = /tmp/smokeping-ms/var -cgiurl = http://some.url/smokeping.cgi -smokemail = /home/oetiker/checkouts/smokeping/trunk/software/etc/smokemail.dist -tmail = /home/oetiker/checkouts/smokeping/trunk/software/etc/tmail.dist -# specify this to get syslog logging -syslogfacility = local0 -# each probe is now run in its own process -# disable this to revert to the old behaviour -# concurrentprobes = no - -*** Alerts *** -to = alertee@address.somewhere -from = smokealert@company.xy - -+someloss -type = loss -# in percent -pattern = >0%,*12*,>0%,*12*,>0% -comment = loss 3 times in a row - -*** Database *** - -step = 300 -pings = 20 - -# consfn mrhb steps total - -AVERAGE 0.5 1 1008 -AVERAGE 0.5 12 4320 - MIN 0.5 12 4320 - MAX 0.5 12 4320 -AVERAGE 0.5 144 720 - MAX 0.5 144 720 - MIN 0.5 144 720 - -*** Presentation *** - -template = /home/oetiker/checkouts/smokeping/trunk/software/etc/basepage.html.dist - -+ charts - -menu = Charts -title = The most interesting destinations - -++ stddev -sorter = StdDev(entries=>4) -title = Top Standard Deviation -menu = Std Deviation -format = Standard Deviation %f - -++ max -sorter = Max(entries=>5) -title = Top Max Roundtrip Time -menu = by Max -format = Max Roundtrip Time %f seconds - -++ loss -sorter = Loss(entries=>5) -title = Top Packet Loss -menu = Loss -format = Packets Lost %f - -++ median -sorter = Median(entries=>5) -title = Top Median Roundtrip Time -menu = by Median -format = Median RTT %f seconds - -+ overview - -width = 600 -height = 50 -range = 10h - -+ detail - -width = 600 -height = 200 -unison_tolerance = 2 - -"Last 3 Hours" 3h -"Last 30 Hours" 30h -"Last 10 Days" 10d -"Last 400 Days" 400d - -#+ hierarchies -#++ owner -#title = Host Owner -#++ location -#title = Location - -*** Probes *** - -+ FPing - -binary = /usr/sbin/fping - -*** Slaves *** -secrets=/home/oetiker/checkouts/smokeping/trunk/software/etc/smokeping_secrets.dist -+boomer -display_name=boomer -color=0000ff - -+slave2 -display_name=another -color=00ff00 - -*** Targets *** - -probe = FPing - -menu = Top -title = Network Latency Grapher -remark = Welcome to the SmokePing website of xxx Company. \ - Here you will learn all about the latency of our network. - -+ Test -menu= Targets -#parents = owner:/Test/James location:/ - -++ James - -menu = James -title =James -alerts = someloss -slaves = boomer slave2 -host = james.address - -++ MultiHost - -menu = Multihost -title = James and James as seen from Boomer -host = /Test/James /Test/James~boomer - diff --git a/etc/config.dist.in b/etc/config.dist.in new file mode 100644 index 0000000..ddae83e --- /dev/null +++ b/etc/config.dist.in @@ -0,0 +1,146 @@ +*** General *** + +owner = Peter Random +contact = some@address.nowhere +mailhost = my.mail.host +sendmail = @SENDMAIL@ +# NOTE: do not put the Image Cache below cgi-bin +# since all files under cgi-bin will be executed ... this is not +# good for images. +imgcache = @prefix@/cache +imgurl = cache +datadir = @prefix@/data +piddir = @prefix@/var +cgiurl = http://some.url/smokeping.cgi +smokemail = @prefix@/etc/smokemail.dist +tmail = @prefix@/etc/tmail.dist +# specify this to get syslog logging +syslogfacility = local0 +# each probe is now run in its own process +# disable this to revert to the old behaviour +# concurrentprobes = no + +*** Alerts *** +to = alertee@address.somewhere +from = smokealert@company.xy + ++someloss +type = loss +# in percent +pattern = >0%,*12*,>0%,*12*,>0% +comment = loss 3 times in a row + +*** Database *** + +step = 300 +pings = 20 + +# consfn mrhb steps total + +AVERAGE 0.5 1 1008 +AVERAGE 0.5 12 4320 + MIN 0.5 12 4320 + MAX 0.5 12 4320 +AVERAGE 0.5 144 720 + MAX 0.5 144 720 + MIN 0.5 144 720 + +*** Presentation *** + +template = @prefix@/etc/basepage.html.dist + ++ charts + +menu = Charts +title = The most interesting destinations + +++ stddev +sorter = StdDev(entries=>4) +title = Top Standard Deviation +menu = Std Deviation +format = Standard Deviation %f + +++ max +sorter = Max(entries=>5) +title = Top Max Roundtrip Time +menu = by Max +format = Max Roundtrip Time %f seconds + +++ loss +sorter = Loss(entries=>5) +title = Top Packet Loss +menu = Loss +format = Packets Lost %f + +++ median +sorter = Median(entries=>5) +title = Top Median Roundtrip Time +menu = by Median +format = Median RTT %f seconds + ++ overview + +width = 600 +height = 50 +range = 10h + ++ detail + +width = 600 +height = 200 +unison_tolerance = 2 + +"Last 3 Hours" 3h +"Last 30 Hours" 30h +"Last 10 Days" 10d +"Last 400 Days" 400d + +#+ hierarchies +#++ owner +#title = Host Owner +#++ location +#title = Location + +*** Probes *** + ++ FPing + +binary = /usr/sbin/fping + +*** Slaves *** +secrets=@prefix@/etc/smokeping_secrets.dist ++boomer +display_name=boomer +color=0000ff + ++slave2 +display_name=another +color=00ff00 + +*** Targets *** + +probe = FPing + +menu = Top +title = Network Latency Grapher +remark = Welcome to the SmokePing website of xxx Company. \ + Here you will learn all about the latency of our network. + ++ Test +menu= Targets +#parents = owner:/Test/James location:/ + +++ James + +menu = James +title =James +alerts = someloss +slaves = boomer slave2 +host = james.address + +++ MultiHost + +menu = Multihost +title = James and James as seen from Boomer +host = /Test/James /Test/James~boomer + -- cgit v1.2.3-24-g4f1b From 89f91c4e71fa85bc992cabe001da01d762770fdd Mon Sep 17 00:00:00 2001 From: Tim Wilde Date: Sun, 30 Oct 2011 01:16:35 +0000 Subject: Update gitignore for auto generation of config.dist --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index c41e3aa..49d6fe5 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ doc/*.[1-9] doc/smokeping_config.pod doc/smokeping_examples.pod doc/smokeping_install.txt +etc/config.dist -- cgit v1.2.3-24-g4f1b