Setting up Smokeping: Difference between revisions

From Alpine Linux
(Initial population of page)
 
(added a big warning about the nature of the wiki page! must be reorganized and rewrited!)
(15 intermediate revisions by 4 users not shown)
Line 1: Line 1:
Notes for smokeping and smoketrace (need edge/testing repo to install smokeping):
{{Warning|This material have several security craps and breaks, and are here only due historical purposes, will be reorganized, please dont deploy production servers with this guide }}


after install, enable mod_cgi in lighttpd
Smokeping is a network latency monitor webapp. <br /><br />
Assign cgi to run with /usr/bin/perl in mod_cgi (by default it's only in cgi-bin virtual host)
Install smokeping and lighttpd from main repository.
Softlink /usr/share/webapps/smokeping -> /var/www/localhost/htdocs/smokeping
{{Cmd|apk add smokeping lighttpd}}
Softlink /var/lib/smokeping/.simg -> /var/www/localhost/htdocs/img
In lighttpd.conf uncomment line: include "mod_cgi.conf", save and exit <br /><br />
Assign cgi to run with /usr/bin/perl in /etc/lighttpd/mod_cgi.conf (by default it's only in cgi-bin virtual host): <br />
cgi.assign = (
".cgi" => "/usr/bin/perl"
)
And uncomment the use of mod.cgi in  /etc/lighttpd/lighttpd.conf.


Softlink /usr/share/webapps/smokeping -> /var/www/localhost/htdocs/smokeping<br />
{{Cmd|ln -s /usr/share/webapps/smokeping /var/www/localhost/htdocs/smokeping}}
Softlink /var/lib/smokeping/.simg -> /var/www/localhost/htdocs/img<br />
{{Cmd|ln -s /var/lib/smokeping/.simg /var/www/localhost/htdocs/img}}


/usr/share/perl5/vendor_perl/Qooxdoo/Services/Tr.pm
If using a version of Alpine older than 2.1_rc2, edit /usr/share/perl5/vendor_perl/Qooxdoo/Services/Tr.pm and on line 34: add "sudo", to beginning so that line looks like:<br />
line 34: add "sudo", to beginning, add path to traceroute /usr/bin/
system "sudo","traceroute","-I","-q","1",$host;
This is because in Alpine, regular user can't run a traceroute, but I don't think people would want this by default (some don't like sudo on system at all)
This is because in Alpine, regular user can't run a traceroute


/etc/sudoers
Add sudo package, then add the following to /etc/sudoers using visudo command:<br />
add lighttpd ALL=(ALL) NOPASSWD: /usr/bin/traceroute
lighttpd ALL=(ALL) NOPASSWD: /usr/bin/traceroute


Change permissions on /var/lib/smokeping/.simg to 777. <br />
{{Cmd|chmod 777 /var/lib/smokeping/.simg}}
Set fping to using setuid:<br />
{{Cmd|chmod u+s /usr/sbin/fping}}


If using lighttpd, change permissions on /var/lib/smokeping/.simg to 777.  
Add hosts to be monitored in /etc/smokeping/config and remove example hosts<br />
Set fping to using setuid: chmod u+s /usr/sbin/fping
The cache configured must be linked to /var/www/localhost/htdocs/smokeping/cache<br />
Add hosts to be monitored in /etc/smokeping/config
Set lighttpd to autostart and start the daemon.<br />
{{Cmd|rc-update add lighttpd && rc-service lighttpd start}}
Set smokeping to autostart and start the daemon.<br />
{{Cmd|rc-update add smokeping && rc-service smokeping start}}
<br />
For further information on configuration, see the smokeping homepage http://oss.oetiker.ch/smokeping/doc/index.en.html.
 
[[Category:Monitoring]]

Revision as of 02:51, 8 June 2020

Warning: This material have several security craps and breaks, and are here only due historical purposes, will be reorganized, please dont deploy production servers with this guide


Smokeping is a network latency monitor webapp.

Install smokeping and lighttpd from main repository.

apk add smokeping lighttpd

In lighttpd.conf uncomment line: include "mod_cgi.conf", save and exit

Assign cgi to run with /usr/bin/perl in /etc/lighttpd/mod_cgi.conf (by default it's only in cgi-bin virtual host):

cgi.assign = (
".cgi" => "/usr/bin/perl"
)

And uncomment the use of mod.cgi in /etc/lighttpd/lighttpd.conf.

Softlink /usr/share/webapps/smokeping -> /var/www/localhost/htdocs/smokeping

ln -s /usr/share/webapps/smokeping /var/www/localhost/htdocs/smokeping

Softlink /var/lib/smokeping/.simg -> /var/www/localhost/htdocs/img

ln -s /var/lib/smokeping/.simg /var/www/localhost/htdocs/img

If using a version of Alpine older than 2.1_rc2, edit /usr/share/perl5/vendor_perl/Qooxdoo/Services/Tr.pm and on line 34: add "sudo", to beginning so that line looks like:

system "sudo","traceroute","-I","-q","1",$host;

This is because in Alpine, regular user can't run a traceroute

Add sudo package, then add the following to /etc/sudoers using visudo command:

lighttpd ALL=(ALL) NOPASSWD: /usr/bin/traceroute

Change permissions on /var/lib/smokeping/.simg to 777.

chmod 777 /var/lib/smokeping/.simg

Set fping to using setuid:

chmod u+s /usr/sbin/fping

Add hosts to be monitored in /etc/smokeping/config and remove example hosts
The cache configured must be linked to /var/www/localhost/htdocs/smokeping/cache
Set lighttpd to autostart and start the daemon.

rc-update add lighttpd && rc-service lighttpd start

Set smokeping to autostart and start the daemon.

rc-update add smokeping && rc-service smokeping start


For further information on configuration, see the smokeping homepage http://oss.oetiker.ch/smokeping/doc/index.en.html.