Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error running smokeping #77

Closed
goaquin opened this issue Mar 27, 2017 · 3 comments
Closed

Error running smokeping #77

goaquin opened this issue Mar 27, 2017 · 3 comments

Comments

@goaquin
Copy link

goaquin commented Mar 27, 2017

Hello,

I'm having this error when I run this command:
sh -c '/opt/smokeping/bin/smokeping --config=/opt/smokeping/etc/config --logfile=/opt/smokeping/smoke.log --debug'
ERROR:

### Compiling alert detector pattern 'someloss'
### >0%,*12*,>0%,*12*,>0%
sub {
    my $d = shift;
    my $y = $d->{loss};
    for(1){
        my $imax2 = min(@$y - 3, 12);
        my $imax1 = min(@$y - 3, 12);
        my $minlength = 3;
        my $maxlength = 27;
        next if scalar @$y < $minlength ;
        my $i1;
        for($i1=0; $i1 < min($maxlength,$imax1); $i1++){
            my $i2;
            for($i2=0; $i2 < min($maxlength-$i1,$imax2); $i2++){
                next unless defined $y->[-3-$i1-$i2]
                                and $y->[-3-$i1-$i2] =~ /^\d/
                                and $y->[-3-$i1-$i2] > 0
                                     ;                last;
            }
            return 0 if $i2 >= min($maxlength-$i1-$i2,$imax2);
            next unless defined $y->[-2-$i1]
                            and $y->[-2-$i1] =~ /^\d/
                            and $y->[-2-$i1] > 0
                                 ;            last;
        }
        return 0 if $i1 >= min($maxlength-$i1,$imax1);
        next unless defined $y->[-1]
                        and $y->[-1] =~ /^\d/
                        and $y->[-1] > 0
                             ;        return 1;
    }
    return 0;
}



Calling RRDs::create(/opt/smokeping/data/services/LDAP/AD3.rrd --start 1490649610 --step 300 DS:uptime:GAUGE:600:0:U DS:loss:GAUGE:600:0:5 DS:median:GAUGE:600:0:180 DS:ping1:GAUGE:600:0:180 DS:ping2:GAUGE:600:0:180 DS:ping3:GAUGE:600:0:180 DS:ping4:GAUGE:600:0:180 DS:ping5:GAUGE:600:0:180 RRA:AVERAGE:0.5:1:1008 RRA:AVERAGE:0.5:12:4320 RRA:MIN:0.5:12:4320 RRA:MAX:0.5:12:4320 RRA:AVERAGE:0.5:144:720 RRA:MAX:0.5:144:720 RRA:MIN:0.5:144:720)
Calling RRDs::create(/opt/smokeping/data/services/LDAP/AD2.rrd --start 1490649610 --step 300 DS:uptime:GAUGE:600:0:U DS:loss:GAUGE:600:0:5 DS:median:GAUGE:600:0:180 DS:ping1:GAUGE:600:0:180 DS:ping2:GAUGE:600:0:180 DS:ping3:GAUGE:600:0:180 DS:ping4:GAUGE:600:0:180 DS:ping5:GAUGE:600:0:180 RRA:AVERAGE:0.5:1:1008 RRA:AVERAGE:0.5:12:4320 RRA:MIN:0.5:12:4320 RRA:MAX:0.5:12:4320 RRA:AVERAGE:0.5:144:720 RRA:MAX:0.5:144:720 RRA:MIN:0.5:144:720)
Calling RRDs::create(/opt/smokeping/data/services/AnotherDNS/dns2.rrd --start 1490649610 --step 300 DS:uptime:GAUGE:600:0:U DS:loss:GAUGE:600:0:5 DS:median:GAUGE:600:0:180 DS:ping1:GAUGE:600:0:180 DS:ping2:GAUGE:600:0:180 DS:ping3:GAUGE:600:0:180 DS:ping4:GAUGE:600:0:180 DS:ping5:GAUGE:600:0:180 RRA:AVERAGE:0.5:1:1008 RRA:AVERAGE:0.5:12:4320 RRA:MIN:0.5:12:4320 RRA:MAX:0.5:12:4320 RRA:AVERAGE:0.5:144:720 RRA:MAX:0.5:144:720 RRA:MIN:0.5:144:720)
Calling RRDs::create(/opt/smokeping/data/services/EchoPingLDAP/AD.rrd --start 1490649610 --step 300 DS:uptime:GAUGE:600:0:U DS:loss:GAUGE:600:0:5 DS:median:GAUGE:600:0:180 DS:ping1:GAUGE:600:0:180 DS:ping2:GAUGE:600:0:180 DS:ping3:GAUGE:600:0:180 DS:ping4:GAUGE:600:0:180 DS:ping5:GAUGE:600:0:180 RRA:AVERAGE:0.5:1:1008 RRA:AVERAGE:0.5:12:4320 RRA:MIN:0.5:12:4320 RRA:MAX:0.5:12:4320 RRA:AVERAGE:0.5:144:720 RRA:MAX:0.5:144:720 RRA:MIN:0.5:144:720)
Calling RRDs::create(/opt/smokeping/data/services/DNS/dns2.rrd --start 1490649610 --step 300 DS:uptime:GAUGE:600:0:U DS:loss:GAUGE:600:0:5 DS:median:GAUGE:600:0:180 DS:ping1:GAUGE:600:0:180 DS:ping2:GAUGE:600:0:180 DS:ping3:GAUGE:600:0:180 DS:ping4:GAUGE:600:0:180 DS:ping5:GAUGE:600:0:180 RRA:AVERAGE:0.5:1:1008 RRA:AVERAGE:0.5:12:4320 RRA:MIN:0.5:12:4320 RRA:MAX:0.5:12:4320 RRA:AVERAGE:0.5:144:720 RRA:MAX:0.5:144:720 RRA:MIN:0.5:144:720)
Calling RRDs::create(/opt/smokeping/data/services/DNS/dns1.rrd --start 1490649610 --step 300 DS:uptime:GAUGE:600:0:U DS:loss:GAUGE:600:0:5 DS:median:GAUGE:600:0:180 DS:ping1:GAUGE:600:0:180 DS:ping2:GAUGE:600:0:180 DS:ping3:GAUGE:600:0:180 DS:ping4:GAUGE:600:0:180 DS:ping5:GAUGE:600:0:180 RRA:AVERAGE:0.5:1:1008 RRA:AVERAGE:0.5:12:4320 RRA:MIN:0.5:12:4320 RRA:MAX:0.5:12:4320 RRA:AVERAGE:0.5:144:720 RRA:MAX:0.5:144:720 RRA:MIN:0.5:144:720)
Calling RRDs::create(/opt/smokeping/data/Server/Server1.rrd --start 1490649610 --step 300 DS:uptime:GAUGE:600:0:U DS:loss:GAUGE:600:0:20 DS:median:GAUGE:600:0:180 DS:ping1:GAUGE:600:0:180 DS:ping2:GAUGE:600:0:180 DS:ping3:GAUGE:600:0:180 DS:ping4:GAUGE:600:0:180 DS:ping5:GAUGE:600:0:180 DS:ping6:GAUGE:600:0:180 DS:ping7:GAUGE:600:0:180 DS:ping8:GAUGE:600:0:180 DS:ping9:GAUGE:600:0:180 DS:ping10:GAUGE:600:0:180 DS:ping11:GAUGE:600:0:180 DS:ping12:GAUGE:600:0:180 DS:ping13:GAUGE:600:0:180 DS:ping14:GAUGE:600:0:180 DS:ping15:GAUGE:600:0:180 DS:ping16:GAUGE:600:0:180 DS:ping17:GAUGE:600:0:180 DS:ping18:GAUGE:600:0:180 DS:ping19:GAUGE:600:0:180 DS:ping20:GAUGE:600:0:180 RRA:AVERAGE:0.5:1:1008 RRA:AVERAGE:0.5:12:4320 RRA:MIN:0.5:12:4320 RRA:MAX:0.5:12:4320 RRA:AVERAGE:0.5:144:720 RRA:MAX:0.5:144:720 RRA:MIN:0.5:144:720)
Calling RRDs::create(/opt/smokeping/data/Server/Server2.rrd --start 1490649610 --step 300 DS:uptime:GAUGE:600:0:U DS:loss:GAUGE:600:0:20 DS:median:GAUGE:600:0:180 DS:ping1:GAUGE:600:0:180 DS:ping2:GAUGE:600:0:180 DS:ping3:GAUGE:600:0:180 DS:ping4:GAUGE:600:0:180 DS:ping5:GAUGE:600:0:180 DS:ping6:GAUGE:600:0:180 DS:ping7:GAUGE:600:0:180 DS:ping8:GAUGE:600:0:180 DS:ping9:GAUGE:600:0:180 DS:ping10:GAUGE:600:0:180 DS:ping11:GAUGE:600:0:180 DS:ping12:GAUGE:600:0:180 DS:ping13:GAUGE:600:0:180 DS:ping14:GAUGE:600:0:180 DS:ping15:GAUGE:600:0:180 DS:ping16:GAUGE:600:0:180 DS:ping17:GAUGE:600:0:180 DS:ping18:GAUGE:600:0:180 DS:ping19:GAUGE:600:0:180 DS:ping20:GAUGE:600:0:180 RRA:AVERAGE:0.5:1:1008 RRA:AVERAGE:0.5:12:4320 RRA:MIN:0.5:12:4320 RRA:MAX:0.5:12:4320 RRA:AVERAGE:0.5:144:720 RRA:MAX:0.5:144:720 RRA:MIN:0.5:144:720)
Calling RRDs::create(/opt/smokeping/data/Server/google.rrd --start 1490649610 --step 300 DS:uptime:GAUGE:600:0:U DS:loss:GAUGE:600:0:20 DS:median:GAUGE:600:0:180 DS:ping1:GAUGE:600:0:180 DS:ping2:GAUGE:600:0:180 DS:ping3:GAUGE:600:0:180 DS:ping4:GAUGE:600:0:180 DS:ping5:GAUGE:600:0:180 DS:ping6:GAUGE:600:0:180 DS:ping7:GAUGE:600:0:180 DS:ping8:GAUGE:600:0:180 DS:ping9:GAUGE:600:0:180 DS:ping10:GAUGE:600:0:180 DS:ping11:GAUGE:600:0:180 DS:ping12:GAUGE:600:0:180 DS:ping13:GAUGE:600:0:180 DS:ping14:GAUGE:600:0:180 DS:ping15:GAUGE:600:0:180 DS:ping16:GAUGE:600:0:180 DS:ping17:GAUGE:600:0:180 DS:ping18:GAUGE:600:0:180 DS:ping19:GAUGE:600:0:180 DS:ping20:GAUGE:600:0:180 RRA:AVERAGE:0.5:1:1008 RRA:AVERAGE:0.5:12:4320 RRA:MIN:0.5:12:4320 RRA:MAX:0.5:12:4320 RRA:AVERAGE:0.5:144:720 RRA:MAX:0.5:144:720 RRA:MIN:0.5:144:720)
### parsing dig output...OK
sh: 1: Syntax error: "(" unexpected

I didn't undestood anything of this.
My OS is Ubuntu:16.04 and my smokeping version is 2.6.11.

Regards,
Joaquín Silva

@oetiker
Copy link
Owner

oetiker commented Mar 28, 2017

can you show me your config file

@goaquin
Copy link
Author

goaquin commented Mar 28, 2017

this is my config file:

*** General ***

owner    = Company S.A.
contact  = info@domain.com
mailhost = IP
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 = /opt/smokeping/cache
imgurl   = cache
datadir  = /opt/smokeping/data
piddir  = /opt/smokeping/var
cgiurl   = http://some.url/smokeping.cgi
smokemail = /opt/smokeping/etc/smokemail.dist
tmail = /opt/smokeping/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 = /opt/smokeping/etc/basepage.html.dist

+ charts

menu = Charts
title = Los destinos mas interesantes

++ 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/bin/fping

+ DNS

binary = /usr/bin/dig # mandatory
forks = 5
offset = 50%
step = 300
timeout = 15
# The following variables can be overridden in each target section
lookup = www.foobar.com
pings = 5
server = 8.8.8.8

+ AnotherDNS

forks = 5
offset = 50%
step = 300
# The following variables can be overridden in each target section
ipversion = 4
lookup = www.foobar.com
mininterval = 0.5
pings = 5
port = 53
protocol = udp
recordtype = A
require_answers = 0
require_noerror = 0
timeout = 5

+ EchoPingLDAP

#binary = /usr/bin/echoping
forks = 5
offset = 50%
step = 300
# The following variables can be overridden in each target section
#extraopts = -some-letter-the-author-did-not-think-of
ipversion = 4
ldap_base = cn=users,dc=pentasec,dc=local
ldap_request = (objectclass=*)
ldap_scope = one
pings = 5
plugin = /usr/lib64/php/modules/ldap.so
#pluginargs = -p plugin_specific_arg
priority = 6
timeout = 1
tos = 0xa0
waittime = 1


+ LDAP

forks = 5
offset = 50%
#passwordfile = /some/place/secret
step = 300
# The following variables can be overridden in each target section
attrs = uid
base = dc=foo,dc=local
binddn = CN=foo,CN=foobar,DC=bar,DC=local
filter = uid=pgpuser # mandatory
mininterval = 1
password = Password
pings = 5
port = 389
scope = one
start_tls = 0
timeout = 10
version = 3

*** Slaves ***
secrets=/opt/smokeping/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 = Bienvenido al servicio de Analisis de latencia de Company. \

+ Server
menu= Targets

++ google

menu = google.com
title = google.com
alerts = someloss
host = www.google.com

++ SMG1

menu = smg1
title = smg1
alerts = someloss
host = IP

++ SMG2

menu = smg2_ccu
title = smg2_ccu
alerts = someloss
host = 10.11.1.6

+ services
menu = Servicio de latencia
title = Sericio de latencia (DNS, HTTP)

++ DNS
probe = DNS
menu = Latencia DNS
title = Servicio de latencia (DNS)

+++ dns1
probe = DNS # if the default probe is something else
host = 8.8.8.8

+++ dns2
probe = DNS
host = IPDNS1

++ AnotherDNS
probe = AnotherDNS
menu = Otro DNS
title = Revision con otro DNS

+++ dns2
host = IPDNS"

++ EchoPingLDAP
probe = EchoPingLDAP
menu = Latencia Ldap
title = Servicio Latencia Ldap

+++ AD-COMPANY
menu = ldap-server / LDAP
title = LDAP Server (ldap-server) / LDAP
probe = EchoPingLDAP
ldap_request = (objectclass=*)
host = IPAD

++ LDAP
probe = LDAP
menu = Latencia Ldap 2
title = Servicio Latencia Ldap 2

+++ AD-COMPANY2
menu = ldap-server / LDAP 2
title = LDAP Server (ldap-server) / LDAP 2
probe = LDAP
host = IPAD2
attrs = uid
base = DC=foo,DC=local
 binddn = CN=foo,CN=Users,DC=bar,DC=local
 filter = uid=foo# mandatory
 mininterval = 1
 password = password
 pings = 5
 port = 389
 scope = one
 start_tls = 0
 timeout = 10
 version = 3

+++ COMPANY 3
menu = COMPANY 3
title = Controlador 1 COMPANY 3
probe = LDAP
host = 192.168.200.15
attrs = uid
base = DC=COMPANY 3,DC=COMPANY 3,DC=cl
 binddn = CN=foo,OU=bar TI,OU=Ctas. Especiales,DC=booo,DC=foobar,DC=asd
 filter = uid=foo# mandatory
 mininterval = 1
 password = password
 pings = 5
 port = 389
 scope = one
 start_tls = 0
 timeout = 10
 version = 3

@goaquin
Copy link
Author

goaquin commented Mar 28, 2017

It was an error from the compiler.
I run and it worked.
perl /opt/smokeping/bin/smokeping --config=/opt/smokeping/etc/config --logfile=/opt/smokeping/smoke.log --debug

@oetiker oetiker closed this as completed Apr 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants