Re: [smokeping-users] A beginner's problems - I can't run smokeping

2018-04-10 Thread Fredrik Björk

Hi again!

For reference hosts, you can use this (the first line gives you a 
separate section for the refs):


+ References

++ Ref_1_1_1_1
menu = 1.1.1.1
title = 1.1.1.1
host = 1.1.1.1

++ Ref_8_8_8_8
menu = 8.8.8.8
title = 8.8.8.8
host = 8.8.8.8

++ Ref_8_8_4_4
menu = 8.8.4.4
title = 8.8.4.4
host = 8.8.4.4

/Fredrik

___
smokeping-users mailing list
smokeping-users@lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/smokeping-users


Re: [smokeping-users] A beginner's problems - I can't run smokeping

2018-04-10 Thread Fredrik Björk

Hi!

For starters, welcome to the wonderful world of Linux and Smokeping! 
Lesson 1: You normally don't start services with a command line command 
like that. In Debian/Ubuntu (siblings in terms of Linux distributions), 
you normally start a service with i.e. /etc/init.d/smokeping start. You 
can check a service with i.e. /etc/init.d/smokeping status to see if 
it's running or not. There are otherw ways of doing this (part of the 
buty with Linux), but this is the basic and most universal way and the 
one I use. Others may pitch in with their favourite method ;)


Another handy command is "ps ax | grep smokeping". This will show you 
any processes that are named smokeping (in this case).


Since you installed Smokeping, it shoud start with the system, so try a 
reboot if it isn't already started. It should start as a part of the 
installation.


Checking your ISP is the next task. Edit /etc/smokeping/config.d/Targets 
and add the hosts you want to check. I usually take a traceroute to the 
ISP's own web site and monitor all (or the first) in the traceroute 
list. This way you can see if the ISP has a routing issue inside their 
network (at least in some cases), and not only if your access is dropped.


Some examples:

++ PingBahnhofSe
menu = ping.bahnhof.se
title = ping.bahnhof.se
host = ping.bahnhof.se

++ PingLuSe
menu = ping.lu.se
title = ping.lu.se
host = ping.lu.se

++ PingSunetSe
menu = ping.sunet.se
title = ping.sunet.se
host = ping.sunet.se

If your traceroute looks like this:

~$  traceroute www.eniig.dk
traceroute to www.eniig.dk (92.246.13.174), 30 hops max, 60 byte packets
 1  10.67.11.1 (10.67.11.1)  0.380 ms  0.352 ms  0.338 ms
 2  213.80.87.72 (213.80.87.72)  3.670 ms  3.665 ms  3.654 ms
 3  213.80.86.253 (213.80.86.253)  3.900 ms  4.389 ms  4.365 ms
 4  dix.ip.nianet.net (192.38.7.58)  7.940 ms  5.856 ms  5.838 ms
 5  93.176.93.9 (93.176.93.9)  8.282 ms  8.241 ms  8.230 ms
 6  87.116.38.122 (87.116.38.122)  8.190 ms  8.152 ms  8.159 ms

... you might want to include hops 1-4 or so to the list of targets. 
Also include my examples or other known targets on the Internet for 
reference (1.1.1.1 (Cloudflare DNS), 8.8.8.8, 8.8.4.4 (Google DNS) might 
be good ones).


Oh, by the way, Emacs is a far more superior editor than Vi, just in 
case no one told you this yet. For beginners, pico or nano are good, and 
even mcedit, included in the mc package, is a good option with less 
functions than Emacs of course. mc is short for Midnight Commander, a 
clone of Norton Commander if you're old enough to have run NC in DOS ;)


/Fredrik

___
smokeping-users mailing list
smokeping-users@lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/smokeping-users


Re: [smokeping-users] A beginner's problems - I can't run smokeping

2018-04-09 Thread goZoom SysAdmin
You configure your monitored hosts in the Targets file.  In my install 
that is here :


sudo vi /etc/smokeping/config.d/Targets

You can find the Targets file by using the find command or by installing 
the locate utility - I like locate.


sudo apt install locate

and then running

sudo updatedb

sudo locate Targets

(if you don't 'sudo locate' you will not see some directories because of 
permissions)


and you can view the plotted data in at this url assuming you don't 
change the cgi path in the 'General' file: 
(yourwebserverip)/cgi-bin/smokeping.cgi?target=(your system config name)


You can change the url path  in  /etc/smokeping/config.d/General

You need to make sure that appropriate permissions are set for the paths 
that are specified in /etc/smokeping/config.d/pathnames


You might also need to fiddle with your webserver's config file to 
ensure it can execute the scripts.


And keep plugging away at it..  I found Smokeping challenging to 
configure when I first installed it and I am a Linux guy. that was 
10  or 12 years ago I think, but it is a /very /handy tool once you get 
to understand how it works and what it can do. It now monitors a 
half-dozen services on 200+ targets for us.


Regards,

Ian


On 09/04/2018 2:29 PM, Henrik Rosenø wrote:

OK. Thank you!

I discovered that Ctrl-C gets me back to the prompt.
And "ps -ef | grep -c smokeping" gives output "2" just like in your case.
But how can I see or access the results of the monitoring?

Best regards,
Henrik R.


On 04/09/2018 04:02 PM, goZoom SysAdmin wrote:


You probably have multiple copies of smokeping running.

Count the instances

ian@draco:~$ ps -ef | grep -c smokeping
2


2 is normal as shown below

ian@draco:~$ ps -ef | grep smokeping

smokepi+ 17602 1  0 Apr05 ?    00:01:06 /usr/sbin/smokeping 
[FPing]
ian  29551 29487  0 09:57 pts/0    00:00:00 grep --color=auto 
smokeping

ian@draco:~$

if you have multiple instances it's probably easiest just to reboot

ian@draco:~$  sudo reboot now

And You probably need to find a beginners guide to Linux.

Ian


On 09/04/2018 8:43 AM, Henrik Rosenø wrote:

Hi goZoom


Thank you for your very fast answer.

So far so good. Now my problem is getting 20 copies of a status 
message. Below I have inserted the first and the last copy.

The cursor is blinking next to "lines 1-18/18 (END)".
What do I do now?


henrik@Henrik-L570:~/smokeping-2.7.1$ sudo service smokeping start
[sudo] password for henrik:
henrik@Henrik-L570:~/smokeping-2.7.1$ sudo service smokeping status
● smokeping.service - LSB: Start or stop the smokeping latency 
logging system daemon
   Loaded: loaded (/etc/init.d/smokeping; generated; vendor preset: 
enabled)
   Active: active (running) since Mon 2018-04-09 11:32:08 CEST; 3h 
0min ago

 Docs: man:systemd-sysv-generator(8)
    Tasks: 1 (limit: 4915)
   CGroup: /system.slice/smokeping.service
   └─9923 /usr/sbin/smokeping [FPing]

Apr 09 11:32:07 Henrik-L570 systemd[1]: Starting LSB: Start or stop 
the smokeping latency logging syste
Apr 09 11:32:07 Henrik-L570 smokeping[9911]:  * Starting latency 
logger daemon smokeping

Apr 09 11:32:08 Henrik-L570 smokeping[9918]: Starting syslog logging
Apr 09 11:32:08 Henrik-L570 smokeping[9919]: Note: logging to 
syslog as local0/info.
Apr 09 11:32:08 Henrik-L570 smokeping[9919]: Daemonizing 
/usr/sbin/smokeping ...
Apr 09 11:32:08 Henrik-L570 smokeping[9923]: Smokeping version 
2.006011 successfully launched.
Apr 09 11:32:08 Henrik-L570 smokeping[9923]: Not entering 
multiprocess mode for just a single probe.
Apr 09 11:32:08 Henrik-L570 smokeping[9923]: FPing: probing 1 
targets with step 300 s and offset 27 s.

Apr 09 11:32:08 Henrik-L570 smokeping[9911]:    ...done.
Apr 09 11:32:08 Henrik-L570 systemd[1]: Started LSB: Start or stop 
the smokeping latency logging system

lines 1-18/18 (END)







● smokeping.service - LSB: Start or stop the smokeping latency 
logging system daemon
   Loaded: loaded (/etc/init.d/smokeping; generated; vendor preset: 
enabled)
   Active: active (running) since Mon 2018-04-09 11:32:08 CEST; 3h 
0min ago

 Docs: man:systemd-sysv-generator(8)
    Tasks: 1 (limit: 4915)
   CGroup: /system.slice/smokeping.service
   └─9923 /usr/sbin/smokeping [FPing]

Apr 09 11:32:07 Henrik-L570 systemd[1]: Starting LSB: Start or stop 
the smokeping latency logging system daemon...
Apr 09 11:32:07 Henrik-L570 smokeping[9911]:  * Starting latency 
logger daemon smokeping

Apr 09 11:32:08 Henrik-L570 smokeping[9918]: Starting syslog logging
Apr 09 11:32:08 Henrik-L570 smokeping[9919]: Note: logging to 
syslog as local0/info.
Apr 09 11:32:08 Henrik-L570 smokeping[9919]: Daemonizing 
/usr/sbin/smokeping ...
Apr 09 11:32:08 Henrik-L570 smokeping[9923]: Smokeping version 
2.006011 successfully launched.
Apr 09 11:32:08 Henrik-L570 smokeping[9923]: Not entering 
multiprocess mode for just a single probe.
Apr 09 11:32:08 Henrik-L570 smokeping[9923]: FPing: probing 1 
targets with step 

Re: [smokeping-users] A beginner's problems - I can't run smokeping

2018-04-09 Thread goZoom SysAdmin
This is not a smokeping problem.  You are trying to run smokeping as 
Your user on Linux and You do not have write access to the directory.  
Run smokeping as a service, not as a standalone program.


sudo service smokeping start

sudo service smokeping status

Ian


On 09/04/2018 8:13 AM, Henrik Rosenø wrote:

creating /var/run/smokeping/smokeping.pid: Permission denied


___
smokeping-users mailing list
smokeping-users@lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/smokeping-users


[smokeping-users] A beginner's problems - I can't run smokeping

2018-04-09 Thread Henrik Rosenø
Hi Smokeping-users


I am new to Linux. I use Ubuntu 17.10.
First I downloaded and extracted the smokeping-2.7.1.tar.gz archive and
extracted it and tried to find something to run directly without luck.
Then I opened Terminal and, in short, I did this:

> henrik@Henrik-L570:~/smokeping-2.7.1$ sudo apt install smokeping
> henrik@Henrik-L570:~/smokeping-2.7.1$ smokeping
> Note: logging to syslog as local0/info.
> Daemonizing /usr/sbin/smokeping ...
> creating /var/run/smokeping/smokeping.pid: Permission denied
> henrik@Henrik-L570:~/smokeping-2.7.1$ smokeping --check
> Configuration file '/etc/smokeping/config' syntax OK.
> henrik@Henrik-L570:~/smokeping-2.7.1$ smokeping
> Note: logging to syslog as local0/info.
> Daemonizing /usr/sbin/smokeping ...
> creating /var/run/smokeping/smokeping.pid: Permission denied

As you can see I got a "Permission denied".
I want to monitor my ISP because at arbitrary times both Ubuntu and
Windows can't seem to connect to the Internet.
So what do I do now?

Here is a full copy of the Terminal session:

> henrik@Henrik-L570:~$ ls
> Desktopexamples.desktop  Pictures snap
> Documents  Exodus-linux-x64  Public   Templates
> Downloads  Music smokeping-2.7.1  Videos
> henrik@Henrik-L570:~$ cd smokping-2.7.1
> bash: cd: smokping-2.7.1: No such file or directory
> henrik@Henrik-L570:~$ cd smokeping-2.7.1
> henrik@Henrik-L570:~/smokeping-2.7.1$ smokeping
> The program 'smokeping' is currently not installed. You can install it by 
> typing:
> sudo apt install smokeping
> henrik@Henrik-L570:~/smokeping-2.7.1$ sudo apt install smokeping
> [sudo] password for henrik: 
> Reading package lists... Done
> Building dependency tree   
> Reading state information... Done
> The following additional packages will be installed:
>   apache2 apache2-bin apache2-data apache2-utils echoping fping libapr1
>   libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap libconfig-grammar-perl
>   libdbi1 libjs-cropper libjs-prototype libjs-scriptaculous librrd8
>   librrds-perl libsnmp-session-perl postfix
> Suggested packages:
>   apache2-doc apache2-suexec-pristine | apache2-suexec-custom procmail
>   postfix-mysql postfix-pgsql postfix-ldap postfix-pcre postfix-lmdb
>   postfix-sqlite sasl2-bin dovecot-common resolvconf postfix-cdb postfix-doc
>   curl libauthen-radius-perl libnet-ldap-perl libnet-telnet-perl
> The following NEW packages will be installed:
>   apache2 apache2-bin apache2-data apache2-utils echoping fping libapr1
>   libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap libconfig-grammar-perl
>   libdbi1 libjs-cropper libjs-prototype libjs-scriptaculous librrd8
>   librrds-perl libsnmp-session-perl postfix smokeping
> 0 upgraded, 20 newly installed, 0 to remove and 0 not upgraded.
> Need to get 3,720 kB of archives.
> After this operation, 13.8 MB of additional disk space will be used.
> Do you want to continue? [Y/n] y
> Get:1 http://dk.archive.ubuntu.com/ubuntu artful/main amd64 libapr1 amd64 
> 1.6.2-1 [90.9 kB]
> Get:2 http://dk.archive.ubuntu.com/ubuntu artful/main amd64 libaprutil1 amd64 
> 1.6.0-2 [84.2 kB]
> Get:3 http://dk.archive.ubuntu.com/ubuntu artful/main amd64 
> libaprutil1-dbd-sqlite3 amd64 1.6.0-2 [10.5 kB]
> Get:4 http://dk.archive.ubuntu.com/ubuntu artful/main amd64 libaprutil1-ldap 
> amd64 1.6.0-2 [8,660 B]
> Get:5 http://dk.archive.ubuntu.com/ubuntu artful/main amd64 apache2-bin amd64 
> 2.4.27-2ubuntu3 [968 kB]
> Get:6 http://dk.archive.ubuntu.com/ubuntu artful/main amd64 apache2-utils 
> amd64 2.4.27-2ubuntu3 [82.5 kB]
> Get:7 http://dk.archive.ubuntu.com/ubuntu artful/main amd64 apache2-data all 
> 2.4.27-2ubuntu3 [161 kB]
> Get:8 http://dk.archive.ubuntu.com/ubuntu artful/main amd64 apache2 amd64 
> 2.4.27-2ubuntu3 [95.8 kB]
> Get:9 http://dk.archive.ubuntu.com/ubuntu artful/universe amd64 echoping 
> amd64 6.0.2-10 [63.1 kB]
> Get:10 http://dk.archive.ubuntu.com/ubuntu artful/universe amd64 fping amd64 
> 4.0-2 [29.1 kB]
> Get:11 http://dk.archive.ubuntu.com/ubuntu artful/universe amd64 
> libconfig-grammar-perl all 1.12-1 [21.6 kB]
> Get:12 http://dk.archive.ubuntu.com/ubuntu artful/main amd64 libdbi1 amd64 
> 0.9.0-4 [27.8 kB]
> Get:13 http://dk.archive.ubuntu.com/ubuntu artful/universe amd64 
> libjs-prototype all 1.7.1-3 [44.2 kB]
> Get:14 http://dk.archive.ubuntu.com/ubuntu artful/universe amd64 
> libjs-scriptaculous all 1.9.0-2 [107 kB]
> Get:15 http://dk.archive.ubuntu.com/ubuntu artful/universe amd64 
> libjs-cropper all 1.2.2-1 [139 kB]
> Get:16 http://dk.archive.ubuntu.com/ubuntu artful/main amd64 librrd8 amd64 
> 1.6.0-1ubuntu2 [153 kB]
> Get:17 http://dk.archive.ubuntu.com/ubuntu artful/main amd64 postfix amd64 
> 3.2.3-1 [1,159 kB]
> Get:18 http://dk.archive.ubuntu.com/ubuntu artful/main amd64 librrds-perl 
> amd64 1.6.0-1ubuntu2 [22.9 kB]
> Get:19 http://dk.archive.ubuntu.com/ubuntu artful/universe amd64 
> libsnmp-session-perl all 1.13-2 [64.7 kB]
> Get:20 http://dk.archive.ubuntu.com/ubuntu artful/universe amd64