Wydrukuj tę dokumentację Pokaż jako slajdy

Konfiguracja smokeping

SmokePing to narzędzie do monitorowania wybranych serwerów (za pomocą PINGa, DNSa, cURL-a) oraz tworzenie wykresów wraz z powstałymi opóźnieniami.

plik konfiguracyjny

Poniżej łatka dla pliku konfiguracyjnego:

--- config.sample       2017-01-26 20:00:30.000000000 +0100
+++ config      2017-01-26 22:23:45.166376000 +0100
@@ -1,17 +1,17 @@
 *** General ***

-owner    = Peter Random
-contact  = some@address.nowhere
-mailhost = my.mail.host
-sendmail = /usr/sbin/sendmail
+owner    = BSD Serwis
+contact  = smokeping@bsdserwis.com
+mailhost = mx2.bsdserwis.com
+sendmail = /usr/local/sbin/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 = /usr/local/smokeping/htdocs/img
-imgurl   = img
+imgurl   = smokeping/img
 datadir  = /usr/local/var/smokeping
 piddir  = /usr/local/var/smokeping
-cgiurl   = http://some.url/smokeping.cgi
+cgiurl   = http://j34.modlin.wtp3.org/smokeping.cgi
 smokemail = /usr/local/etc/smokeping/smokemail
 tmail = /usr/local/etc/smokeping/tmail
 # specify this to get syslog logging
@@ -21,8 +21,8 @@ syslogfacility = local0
 # concurrentprobes = no

 *** Alerts ***
-to = alertee@address.somewhere
-from = smokealert@company.xy
+to = smokeping@bsdserwis.com
+from = smokeping@bsdserwis.com

 +someloss
 type = loss
@@ -103,44 +103,93 @@ unison_tolerance = 2

 *** Probes ***

-+ FPing
-
++FPing
 binary = /usr/local/sbin/fping
+blazemode = true
+pings = 20
+step = 300
+timeout = 1.5
+tos = 0x20

-*** Slaves ***
-secrets=/usr/local/etc/smokeping/smokeping_secrets
-+boomer
-display_name=boomer
-color=0000ff
+##++FPingNormal
+##offset = 0%
+##
+##++FPingLarge
+##packetsize = 5000
+##offset = 50%

-+slave2
-display_name=another
-color=00ff00
++ Curl
+binary = /usr/local/bin/curl
+forks = 2
+offset = 40%
+step = 60
+
+# The following variables can be overridden in each target section
+agent = User-Agent: Lynx/2.8.4rel.1 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/0.9.6c
+##extraargs = -6 --head --user user:password
+##extrare = / /
+follow_redirects = yes
+include_redirects = yes
+insecure_ssl = 1
+pings = 3
+ssl2 = 1
+timeout = 20
+urlformat = http://%host%/ # mandatory
+
++DNS
+binary = /usr/local/bin/dig # mandatory
+forks = 5
+offset = 10%
+step = 300
+timeout = 15
+lookup = www.google.pl
+pings = 5
+
+##*** Slaves ***
+##secrets=/usr/local/etc/smokeping/smokeping_secrets
+##+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. \
+remark = Welcome to the SmokePing website of BSD Serwis. \
          Here you will learn all about the latency of our network.

-+ Test
-menu= Targets
-#parents = owner:/Test/James location:/
++ JMDI
+menu = JMDI
+title = JMDI routers

-++ James
+++ JMDI_router
+title = JMDI router / ICMP
+alerts = someloss
+host = 80.238.114.121

-menu = James
-title =James
+++ JMDI_router_2
+title =JMDI router 2 / ICMP
 alerts = someloss
-slaves = boomer slave2
-host = james.address
+host = 80.238.112.2

-++ MultiHost
++ BSD_Serwis
+menu = BSD Serwis

-menu = Multihost
-title = James and James as seen from Boomer
-host = /Test/James /Test/James~boomer
+++ BSD_Serwis_HQ
+title = BSD Serwis HQ / HTTP
+probe = Curl
+urlformat = http://%host%/sp.txt
+expect = SmokePing
+host = rtm.bsdserwis.com
+
++ Google
+menu = Google
+title = Google resolver / DNS
+probe = DNS
+host = 8.8.8.8

Konfiguracja apache

<Directory /usr/local/smokeping/htdocs>
    Options FollowSymLinks
    Require all granted
</Directory>

    <IfModule mod_alias.c>
        # --- CGI-BIN ----------------------------------------------------------
        #
        Alias /cgi-bin/img  "/usr/local/smokeping/htdocs/img"
        Alias /cgi-bin/cropper  "/usr/local/smokeping/htdocs/cropper"
        Alias /cgi-bin/smokeping  "/usr/local/smokeping/htdocs"
        ScriptAlias /cgi-bin/smokeping.cgi "/usr/local/www/cgi-bin/smokeping.cgi"
    </IfModule>

Skopiowanie skryptu CGI do docelowego katalogu

cp -p /usr/local/bin/smokeping_cgi /usr/local/www/cgi-bin/smokeping.cgi

Źródła w sieci internet


{i}  (c) 2004 - 2026 BSD Serwis Krzysztof Stryjek. W przypadku błędów, poprawek proszę kontaktować się z administratorem wiki.

SmokePing (ostatnio edytowane 2017-01-26 21:33:48 przez wtps0n)