{"id":316,"date":"2017-06-21T14:53:16","date_gmt":"2017-06-21T14:53:16","guid":{"rendered":"https:\/\/www.web-workers.ch\/?p=316"},"modified":"2018-06-11T20:59:49","modified_gmt":"2018-06-11T20:59:49","slug":"how-to-install-smokeping-on-centos-7","status":"publish","type":"post","link":"https:\/\/www.web-workers.ch\/index.php\/2017\/06\/21\/how-to-install-smokeping-on-centos-7\/","title":{"rendered":"How to install SmokePing on CentOS 7"},"content":{"rendered":"<p>This tutorial explains how to install Tobias Oetiker&#8217;s Smokeping into \/opt\/smokeping on a CentOS 7 box.<\/p>\n<p>Features of Smokeping:<br \/>\n&#8211; Best of breed latency visualisation.<br \/>\n&#8211; Interactive graph explorer.<br \/>\n&#8211; Wide range of latency measurement plugins.<br \/>\n&#8211; Master\/Slave System for distributed measurement.<br \/>\n&#8211; Highly configurable alerting system.<br \/>\n&#8211; Live Latency Charts with the most &#8216;interesting&#8217; graphs.<br \/>\n&#8211; Free and open-source Software written in Perl written by Tobi Oetiker, the creator of MRTG and RRDtool<\/p>\n<h3>Install Development Tools<\/h3>\n<p>Load the development tools needed to compile smokeping.<\/p>\n<p><code># yum groupinstall \"Development tools\"<\/code><\/p>\n<p>Following applications are available with the CentOS Development tools yum group:<\/p>\n<p>bison<br \/>\nbyacc<br \/>\ncscope<br \/>\nctags<br \/>\ncvs<br \/>\ndiffstat<br \/>\ndoxygen<br \/>\nflex<br \/>\ngcc<br \/>\ngcc-c++<br \/>\ngcc-gfortran<br \/>\ngettext<br \/>\ngit<br \/>\nindent<br \/>\nintltool<br \/>\nlibtool<br \/>\npatch<br \/>\npatchutils<br \/>\nrcs<br \/>\nredhat-rpm-config<br \/>\nrpm-build<br \/>\nsubversion<br \/>\nswig<br \/>\nsystemtap<\/p>\n<p>There are also dependencies that will install with these tools.<\/p>\n<h3>Enable Epel repo<\/h3>\n<p>You can install EPEL by running yum install epel-release. The package is included in the CentOS extras repository, enabled by default.<\/p>\n<p><code># yum install epel-release<\/code><\/p>\n<h3>Install packages<\/h3>\n<p>Then install the following packages<\/p>\n<p>perl<br \/>\nhttpd<br \/>\nhttpd-devel<br \/>\nrrdtool-perl<br \/>\nmod_fcgid<br \/>\nrrdtool<br \/>\nperl-CGI-SpeedyCGI<br \/>\nfping<br \/>\nperl-Sys-Syslog<\/p>\n<p><code># yum install perl httpd httpd-devel mod_fcgid rrdtool perl-CGI-SpeedyCGI fping rrdtool-perl perl-Sys-Syslog<\/code><br \/>\nAdd a few of the pre packaged CPAN modules<\/p>\n<p><code># yum install perl-CPAN perl-local-lib perl-Time-HiRes<\/code><code><\/code><\/p>\n<h3>Install smokeping<\/h3>\n<p>Now download the latest smokeping package available at http:\/\/oss.oetiker.ch\/smokeping\/pub\/<br \/>\nThe current version at the time of the writing is 2.6.11<\/p>\n<p><code># cd \/root<br \/>\n# wget http:\/\/oss.oetiker.ch\/smokeping\/pub\/smokeping-2.6.11.tar.gz<\/code><br \/>\nthen extract it<\/p>\n<p><code># tar xfz smokeping-2.6.11.tar.gz<\/code><br \/>\nInstall perl modules needed by smokeping<\/p>\n<p><code># mkdir \/opt\/smokeping<br \/>\n# cd smokeping-2.6.11\/setup<br \/>\n# .\/build-perl-modules.sh<br \/>\n# cd ..<br \/>\n# cp -r thirdparty \/opt\/smokeping\/<br \/>\n# .\/configure --prefix=\/opt\/smokeping<br \/>\n# make install<\/code><\/p>\n<h3>Configure smokeping<\/h3>\n<p>Then you will need to configure smokeping. Find below our sample config in form of a screenshot or&nbsp;<a href=\"https:\/\/www.web-workers.ch\/wp-content\/uploads\/2017\/06\/config.txt\">download a sample config here<\/a>.<\/p>\n<p><code># vi&nbsp;\/opt\/smokeping\/etc\/config<br \/>\n<\/code><\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"\" src=\"https:\/\/i0.wp.com\/www.web-workers.ch\/wp-content\/uploads\/2017\/06\/2017-08-31-17_24_43-web-workers.ch-Please-moderate_-_How-to-install-SmokePing-on-CentOS-7_-Nachr.png?resize=533%2C259&#038;ssl=1\" alt=\"\" width=\"533\" height=\"259\" \/><br \/>\nHint: 10.0.1.251 is the IP of the smokeping host himself.<\/p>\n<p>Create your config from the default config delivered with smokeping and\/or use our sample config.<\/p>\n<p><code># cd \/opt\/smokeping\/etc<br \/>\n# cp config.dist config<br \/>\n# cp \/opt\/smokeping\/etc\/basepage.html.dist \/opt\/smokeping\/etc\/basepage.html<br \/>\n<\/code><\/p>\n<p>Create directories used by smokeping, copy some required files into the public web-directory and set rights for apache user if required.<\/p>\n<p><code># mkdir \/opt\/smokeping\/data<br \/>\n#&nbsp;mkdir \/opt\/smokeping\/var<br \/>\n# mkdir \/var\/www\/smokeping<br \/>\n# mkdir \/var\/www\/smokeping\/cache<br \/>\n# cp -R \/opt\/smokeping\/htdocs\/* \/var\/www\/smokeping<br \/>\n# mv \/var\/www\/smokeping\/smokeping.fcgi.dist \/var\/www\/smokeping\/smokeping.fcgi<br \/>\n# chown -R apache:apache \/var\/www\/smokeping<\/code><\/p>\n<p>Add a virtual apache directory by creating a file on \/etc\/httpd\/conf.d\/ with the name smokeping.conf. Add following content to it<\/p>\n<p><code>Alias \/smokeping \"\/var\/www\/smokeping\"<br \/>\n&lt;Directory \/var\/www\/smokeping&gt;<br \/>\nOptions Indexes FollowSymLinks MultiViews ExecCGI<br \/>\nAllowOverride All<br \/>\nOrder allow,deny<br \/>\nAllow from all<br \/>\nDirectoryIndex smokeping.fcgi<br \/>\n&lt;\/Directory&gt;<br \/>\n<\/code><br \/>\nRestart Apache<\/p>\n<p><code># service httpd restart<\/code><\/p>\n<h3>SELinux<\/h3>\n<p>This guide expects SELinux&nbsp;has to be&nbsp;disabled, read following article about disabling SELinux. In case you change your SELinux settings: Make sure you have rebooted your machine to apply the changes.<br \/>\n<a href=\"https:\/\/www.centos.org\/docs\/5\/html\/5.1\/Deployment_Guide\/sec-sel-enable-disable.html\" target=\"_blank\" rel=\"noopener\">https:\/\/www.centos.org\/docs\/5\/html\/5.1\/Deployment_Guide\/sec-sel-enable-disable.html<\/a><\/p>\n<p>Hint: There are untested notes about SELinux within the comments section below.<\/p>\n<h3>Run smokeping<\/h3>\n<p>To test the installation, execute following command.<\/p>\n<p><code># cd \/opt\/smokeping<br \/>\n# .\/bin\/smokeping --config=\/opt\/smokeping\/etc\/config --debug<\/code><\/p>\n<p>To daemonize smokeping, execute following command:<\/p>\n<p><code># cd \/opt\/smokeping<br \/>\n# .\/bin\/smokeping --config=\/opt\/smokeping\/etc\/config --logfile=smoke.log<\/code><\/p>\n<p>Browse to: http:\/\/&lt;your_ipaddress&gt;\/smokeping<\/p>\n<p>For additional resources have a visit at the authors website:<br \/>\n<a href=\"http:\/\/oss.oetiker.ch\/smokeping\/\" target=\"_blank\" rel=\"noopener\">&#8211; http:\/\/oss.oetiker.ch\/smokeping\/<\/a><\/p>\n<p>Special Hint:<br \/>\nIn case your graphics for the last 3 hours didnt get updated but all the other timeframes are updated normaly, you may experience an error from the compiler. In this case please try to execute smokeping like this:<br \/>\n<code># perl \/opt\/smokeping\/bin\/smokeping --config=\/opt\/smokeping\/etc\/config --logfile=smoke.log<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This tutorial explains how to install Tobias Oetiker&#8217;s Smokeping into \/opt\/smokeping on a CentOS 7 box. Features of Smokeping: &#8211; Best of breed latency visualisation. &#8211; Interactive graph explorer. &#8211; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":326,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[4,8],"tags":[63,61,35,34,67,46,43,49,75,89,76,52,66,80,44,82,65,102,103],"class_list":["post-316","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","category-networking","tag-ad","tag-address","tag-apache","tag-centos","tag-explorer","tag-file","tag-http","tag-https","tag-ie","tag-ipad","tag-link","tag-log","tag-mrtg","tag-rdp","tag-root","tag-rrd","tag-smokeping","tag-update","tag-yum"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/www.web-workers.ch\/wp-content\/uploads\/2017\/06\/reading_detail1.png?fit=697%2C321&ssl=1","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8sxjX-56","jetpack-related-posts":[],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/www.web-workers.ch\/index.php\/wp-json\/wp\/v2\/posts\/316","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.web-workers.ch\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.web-workers.ch\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.web-workers.ch\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.web-workers.ch\/index.php\/wp-json\/wp\/v2\/comments?post=316"}],"version-history":[{"count":23,"href":"https:\/\/www.web-workers.ch\/index.php\/wp-json\/wp\/v2\/posts\/316\/revisions"}],"predecessor-version":[{"id":620,"href":"https:\/\/www.web-workers.ch\/index.php\/wp-json\/wp\/v2\/posts\/316\/revisions\/620"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.web-workers.ch\/index.php\/wp-json\/wp\/v2\/media\/326"}],"wp:attachment":[{"href":"https:\/\/www.web-workers.ch\/index.php\/wp-json\/wp\/v2\/media?parent=316"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.web-workers.ch\/index.php\/wp-json\/wp\/v2\/categories?post=316"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.web-workers.ch\/index.php\/wp-json\/wp\/v2\/tags?post=316"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}