Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] Smokeping does not work
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
boospy
Apprentice
Apprentice


Joined: 07 Feb 2010
Posts: 299
Location: Austria

PostPosted: Tue Aug 05, 2014 9:44 am    Post subject: [solved] Smokeping does not work Reply with quote

Hello, hello,

i've installed smokeping with portage. But smokepingservice crashes after start. There nothing in the log. I can call the webinterface from smokeping, and it works fine. But no graphs, because service is crashed. Has anyone allready setuped smokeping?
I 've also downgraded "fping" to version 3.0. but same problem.

Thanks and Regards
boospy


Last edited by boospy on Mon Aug 11, 2014 10:11 pm; edited 1 time in total
Back to top
View user's profile Send private message
massimo
Veteran
Veteran


Joined: 22 Jun 2003
Posts: 1226

PostPosted: Wed Aug 06, 2014 6:06 am    Post subject: Reply with quote

Do you see any error or log messages which might help? I have it running on a few systems without any issues.
_________________
Hello 911? How are you?
Back to top
View user's profile Send private message
boospy
Apprentice
Apprentice


Joined: 07 Feb 2010
Posts: 299
Location: Austria

PostPosted: Wed Aug 06, 2014 8:59 pm    Post subject: Reply with quote

Ok, i've spend many hours to find the problem. But... i don't know, can't find something.
Code:
/etc/init.d/smokeping start
 * Starting smokeping ...
Note: logging to syslog as local0/info.
Daemonizing /usr/bin/smokeping ...     [ ok ]

I can't find "local0/info". There is nothing in /var/log. I checked messages, apachelogs...
What can i do to find the problem? You say you have running smokeping without problems, this is my first setup for smokeping. Maybe i have done something wrong? Here is my apacheconfig and my config from smokeping:
Code:
cat /etc/apache2/modules.d/79_smokeping.conf
###
### Setup the smokeping image cache and perl cgi script
###
<IfModule mod_alias.c>
   Alias "/.simg/" "/var/lib/smokeping/.simg/"
   <IfModule mod_perl.c>
      <Directory "/var/lib/smokeping/.simg/">
         Options -Indexes MultiViews +ExecCGI
         AllowOverride None
         Order deny,allow
         #Deny from all
         Allow from all
      </Directory>
   </IfModule>
</IfModule>


Code:
cat /etc/smokeping/config
*** General ***

owner    = Owner
contact  = office@local
mailhost = localhost
sendmail = /usr/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 = /var/lib/smokeping/.simg
imgurl   = ../.simg
datadir  = /var/lib/smokeping
piddir  = /run/smokeping
cgiurl   = http://some.place.xyz/perl/smokeping.pl
smokemail = /etc/smokeping/smokemail
tmail = /etc/smokeping/tmail
# 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 = monitoring@local
from = smokeping@local

+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 = /etc/smokeping/basepage.html

+ charts

menu = Charts
title = Die interessantesten Ziele

++ stddev
sorter = StdDev(entries=>4)
title = Top Standardabweichung
menu = Std Deviation
format = Standard Deviation %f

++ max
sorter = Max(entries=>5)
title = Top Max Roundtrip-Zeit
menu = by Max
format = Max Roundtrip Time %f seconds

++ loss
sorter = Loss(entries=>5)
title = Top verlorene Pakete
menu = Loss
format = Packets Lost %f

++ median
sorter = Median(entries=>5)
title = Top Median Roundtrip-Zeit
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 15 Hours"   15h
"Last 30 Hours"   30h
"Last 10 Days"    10d
"Last 30 Days"    30d
"Last 400 Days"   400d
#+ hierarchies
#++ owner
#title = Host Owner
#++ location
#title = Location

# (The actual example starts here.)

*** Probes ***

# Here we have just one probe, fping, pinging four hosts.
#
# The fping probe is using the default parameters, some of them supplied
# from the Database section ("step" and "pings"), and some of them by
# the probe module.

+FPing
binary = /usr/sbin/fping

*** Slaves ***
secrets= /etc/smokeping/smokeping_secrets
+boomer
display_name=boomer
color=0000ff

+slave2
display_name=another
color=00ff00

*** Targets ***

# The hosts are located in two sites of two hosts each, and the
# configuration has been divided to site sections ('+') and host subsections
# ('++') accordingly.

probe = FPing

menu = Top
title = Network Latency Grapher
remark = Welcome to this SmokePing website.

+ mysite1
menu = Site 1
title = Hosts in Site 1

++ nas
host = nas.local
++ server
host = server.local

+ mysite2
menu = Site 2
title = Hosts in Site 2

++ speak
host = speak.local
++ vminx
host = vmin.local
Back to top
View user's profile Send private message
massimo
Veteran
Veteran


Joined: 22 Jun 2003
Posts: 1226

PostPosted: Thu Aug 07, 2014 5:38 am    Post subject: Reply with quote

If the daemon is not running at all you can run it once like this and check the output:

Code:
# smokeping --config=/etc/smokeping/config --debug

_________________
Hello 911? How are you?
Back to top
View user's profile Send private message
boospy
Apprentice
Apprentice


Joined: 07 Feb 2010
Posts: 299
Location: Austria

PostPosted: Thu Aug 07, 2014 9:17 am    Post subject: Reply with quote

Thanks, when i start with debug, everything looks ok. When i to this without debug (manual start) it work fine. Graphs where drawed. So i think the problem is only the initscript.
Code:
#!/sbin/runscript
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

extra_commands="${opts} dump reload restore"

depend() {
   need net
   use dns
}

checkconfig() {
   if [ ! -f "/etc/smokeping/config" ] ; then
      eerror "You need /etc/smokeping/config to run smokeping!"
      return 1
   fi
}

start() {
   checkconfig || return 1

   if [ ! -d /run/smokeping/ ]; then
      mkdir /run/smokeping/
   fi
   chown smokeping:smokeping /run/smokeping/

   ebegin "Starting smokeping"
   LC_ALL=C \
   start-stop-daemon --start --name smokeping \
      --pidfile /run/smokeping/smokeping.pid \
      --exec /usr/bin/smokeping \
      --user smokeping:smokeping
   eend $?
}

stop() {
   ebegin "Stopping smokeping"
   start-stop-daemon --stop \
      --pidfile /run/smokeping/smokeping.pid
   eend $?
}

reload() {
   ebegin "Reloading smokeping"
   /usr/bin/smokeping --reload 1>/dev/null 2>&1
   eend $?
}

dump() {
   ebegin "Dumping smokeping rrd files to XML for backup or upgrade use"
   if service_started "${myservice}" ; then
      eerror "You need to stop smokeping before dumping files!"
      return 1
   fi
   for f in `find /var/lib/smokeping -name '*.rrd' -print` ; do
      f_xml=`dirname $f`/`basename $f .rrd`.xml
      rrdtool dump "$f" > "${f_xml}"
      chown root:0 "${f_xml}"
   done
   eend $?
}

restore() {
   ebegin "Restoring smokeping rrd files from XML dump files"
   if service_started "${myservice}" ; then
      eerror "You need to stop smokeping before restoring files!"
      return 1
   fi
   for f in `find /var/lib/smokeping -name '*.xml' -print` ; do
      f_rrd=`dirname $f`/`basename $f .xml`.rrd
      mv -f "${f_rrd}" "${f_rrd}.bak"
      chown root:0 "${f_rrd}.bak"
      rrdtool restore "$f" "${f_rrd}"
      chown smokeping:smokeping "${f_rrd}"
   done
   eend $?
}

Can you do a diff with yours?
Back to top
View user's profile Send private message
massimo
Veteran
Veteran


Joined: 22 Jun 2003
Posts: 1226

PostPosted: Thu Aug 07, 2014 10:20 am    Post subject: Reply with quote

There is no difference.
_________________
Hello 911? How are you?
Back to top
View user's profile Send private message
boospy
Apprentice
Apprentice


Joined: 07 Feb 2010
Posts: 299
Location: Austria

PostPosted: Mon Aug 11, 2014 10:10 pm    Post subject: Reply with quote

OK, i don't know. Maybe there because i use IPV6 too. I wrote the startcommand in /etc/local.d/local.start.

Thanks :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum