# [solved] Smokeping does not work

## boospy

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

boospyLast edited by boospy on Mon Aug 11, 2014 10:11 pm; edited 1 time in total

----------

## massimo

Do you see any error or log messages which might help? I have it running on a few systems without any issues.

----------

## boospy

Ok, i've spend many hours to find the problem. But... i don't know, can't find something. 

```
/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:

```
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>

```

```
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
```

----------

## massimo

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

```
# smokeping --config=/etc/smokeping/config --debug
```

----------

## boospy

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. 

```
#!/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?

----------

## massimo

There is no difference.

----------

## boospy

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

Thanks  :Smile: 

----------

