Discussion:
[smokeping-users] Installing and getting Smokeping to run on Fedora 10
Guy Lajeunesse
2009-01-30 03:08:32 UTC
Permalink
Hi everyone,

I'm 'kinda' a noob to this Linux world... I'm a Windows guy, but because of
the security issues with Windows, I decided to setup a Fedora 10 box.

I'm having problems with this Smokeping program! I followed the
instructions found at:
http://lzheng.blogspot.com/2007/02/install-smokeping-via-yum.html which were
great, except that Smokeping isn't working!

As for following the instructions, I ha problems with a few steps:

I did "yum install rrdtool perl-CGI-SpeedyCGI fping" and that was great

but when I got to:

cd /usr/local/smokeping/bin
for foo in *.dist; do cp $foo `basename $foo .dist`; done

cd /usr/local/smokeping/etc/
for foo in *.dist; do cp $foo `basename $foo .dist`; done

cd /usr/local/smokeping/htdocs
for foo in *.dist; do cp $foo `basename $foo .dist`; done

this didn't work as I thought... what is this command doing? I think it's
removing the .dist from the filenames in the folders? Anyways, since it
didn't work, I removed the .dist from every file in the folders shown above.

Next problem was with:

use lib
qw(/usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi/auto/RRDs);

my perl version is 5.10.0, so I made that change (5.8.5)

I don't have a RRDs folder in this location. I've been doing some reading
and I should have some files in this folder. I don't even have the
folder... and when I search for RRD*, I don't get anything!

next, when I run: /usr/local/smokeping/bin/smokeping & I get:

Can't locate loadable object for module RRDs in @INC (@INC contains:
/usr/local/smokeping/lib
/usr/lib/perl5/vendor_perl/5.10.0/i386-linux-thread-multi/auto/RRDs
/usr/lib/perl5/5.10.0/i386-linux-thread-multi /usr/lib/perl5/5.10.0
/usr/local/lib/perl5/site_perl/5.10.0/i386-linux-thread-multi
/usr/local/lib/perl5/site_perl/5.10.0
/usr/lib/perl5/vendor_perl/5.10.0/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.10.0 /usr/lib/perl5/vendor_perl
/usr/local/lib/perl5/site_perl .) at /usr/local/smokeping/lib/Smokeping.pm
line 13
Compilation failed in require at /usr/local/smokeping/lib/Smokeping.pm line
13.
BEGIN failed--compilation aborted at /usr/local/smokeping/lib/Smokeping.pm
line 13.
Compilation failed in require at /usr/local/smokeping/bin/smokeping line 8.
BEGIN failed--compilation aborted at /usr/local/smokeping/bin/smokeping line
8.
reading this, I have to say it has to do with the missing RRDs folder/files


Can someone HELP ME!!! PLEASE!!! I will be forever greatful!!! :) is
there a yum package that I need? I perfer yum packages 'cuz it takes care
of dependencies for me.

Thanks!!!

Guy :)
G.W. Haywood
2009-01-30 08:56:16 UTC
Permalink
Hi there,
Post by Guy Lajeunesse
I'm 'kinda' a noob to this Linux world...
Welcome.
Post by Guy Lajeunesse
I'm a Windows guy
Not any more. :)
Post by Guy Lajeunesse
I decided to setup a Fedora 10 box.
Wouldn't have been my first choice, but it's a good choice.
Post by Guy Lajeunesse
I'm having problems with this Smokeping program!
It's more than a program. It's a system. There's a lot in it.
You've picked a difficult installation for a beginner if things
go wrong, because there's a lot involved in a working Smokeping
system, but it's quite doable. Basically you have five things
that all need to be working (I've used spaced to format these
next few lines so please use a fixed pitch character set to view:)

1. Perl An enormous can of worms but Fedora has it taped.
2. RRDtool A package for handling time-series data.
3. Smokeping Collects the data, stores it using RRD, serves it
to clients using Apache
4. Apache One of the most popular Webservers in the world, might
even be the most popular.
5. A browser Any browser, such as Firefox, Konqueror, Opera or
even Internet Exploder.

The browser doesn't have to be on the same machine, but it can be.
Smokeping can be on several machines and feed all the data to one
RRDtool installation.
Post by Guy Lajeunesse
http://lzheng.blogspot.com/2007/02/install-smokeping-via-yum.html
Again, wouldn't have been my first choice. Try to learn how to
install packages from the source, by reading the documentation
which comes with the original package. Then learn how to create
a package for yourself. I promise it will be worth the effort.
Post by Guy Lajeunesse
which were great, except that Smokeping isn't working!
That's normal.
Post by Guy Lajeunesse
cd /usr/local/smokeping/bin
for foo in *.dist; do cp $foo `basename $foo .dist`; done
...
this didn't work as I thought... what is this command doing?
It's just creating a copy of any file with the suffix .dist, but the
copy doesn't have the suffix. The copy is in the same directory.
It's a kind of precaution, so that you can mess around with the copy
but still have the original in there for reference. Sometimes this
kind of thing is also a precaution to prevent over-writing files in
places like the configuration directories just in case e.g. you're
upgrading an installation as opposed to installing from scratch, and
you don't want to overwrite any existing files. Read

man basename
man cp
man bash

That last one will take you a while. You might be better off reading
the O'Reilly book. You need to get a copy of it anyway, now you're a
Linux guy. You'll also need to read about Apache and it will help an
awful lot if you learn a bit about Perl, C, and make.
Post by Guy Lajeunesse
I think it's removing the .dist from the filenames in the folders?
No, it doesn't remove anything.
Post by Guy Lajeunesse
Anyways, since it didn't work, I removed the .dist from every file
in the folders shown above.
It's far better to find out why things didn't work, and fix the cause,
than it is to hack around making bodge fixes. The installation
scripts were created with great care, and you can break all sorts of
things if you mess around without understanding what you're doing.
One of the problems with yum-like installations is that they cannot
possibly take account of all the different things that people do to
their systems. Some of the things they do are, well, a little odd,
especially when they don't know what they're doing. :)
Post by Guy Lajeunesse
use lib
qw(/usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi/auto/RRDs);
my perl version is 5.10.0, so I made that change (5.8.5)
I don't have a RRDs folder in this location.
Then find out where it is and use that path. And please stop talking
about folders, you're not a Windows guy any more. There are files,
and there are directories. The term 'folder' can mean either, but is
generally reserved for use by mail clients which can treat both files
and directories as mail folders. There are also links but we'll talk
about that later.
Post by Guy Lajeunesse
I've been doing some reading and I should have some files in this
folder. I don't even have the folder... and when I search for RRD*,
I don't get anything!
man find
man locate
man slocate
That's to be expected if you haven't got the right 'use lib' line(s).
Don't worry about it.
Post by Guy Lajeunesse
Can someone HELP ME!!! PLEASE!!!
You don't need to shout, nor even to ask. We're here to help, and you
probably wouldn't be posting if you didn't need help. :)
Post by Guy Lajeunesse
I will be forever greatful!!! :)
I believe you. :)
Post by Guy Lajeunesse
there a yum package that I need? I perfer yum packages 'cuz it
takes care of dependencies for me.
No, they sometimes take care of dependencies for you, which is why I
hate those things so much. Granted, Red Hat, oops, sorry, Fedora are
better than most, but in my experience there's no substitute for
knowing what's going on.

Can we take it that you've been using the privileged 'root' account
where it's been necessary (and where it isn't, not using it)?

Do you have RRDtool installed properly? The first thing to check
is that you can use RRDtool itself. What happens if you type

man rrdtool

or

rrdtool help create

?

--

73,
Ged.
G.W. Haywood
2009-01-31 11:49:15 UTC
Permalink
Hi there,

Please keep traffic on the list.
Post by G.W. Haywood
1. Perl An enormous can of worms but Fedora has it taped.
I know Perl is working, I made a little "hello world" perl script and it
worked
Well that's a good start, but there's a bit more to it than ust having
a working interpreter (like being able to find all the modules;).
RDDtool ... homework for me
:)
Smokeping - once I get RDDtool working, I'll work on getting it going.
A couple of things to watch out for when you start on this. (1) People
seem to have quite a bit of trouble with permissions, so make sure that
the things you're trying to run are being run by the right user, and/or
have suitable filesystem permissions. Don't go overboard giving 'rwx'
permissions to the world except for testing. (2) Smokeping relies on a
lot of third-party tools, and some of them have changed during the life
of the Smokeping project. Sometimes the Smokeping scripts will give a
switch or argument to a third-party tool and the tool fails to parse it
correctly because it is designed for an earlier or later version of the
tool. In that case you either need to use the version of the tool that
Smokeping expects or modify Smokeping to suit the tool. Of course it's
quite possible to have both versions of any particular tool installed,
you won't want to mess up your system for other uses/users.
Apache - I know it's working because I have a webpage being served
The main things there are to get the Smokeping cgi-bin script in the
right place with the right permissions - and of course to give the
proper URL to the browser - and to make sure that the Web server can
write the data. There have been a few threads on this on the mailing
list. It's not a high-volume list so you'll should easily be able to
find the right messages in the list archives.
Using Firefox, working great
I use Firefox most of the time too, seems to work fine with Smokeping.
I've seen a few little oddities with some other browsers like KDE, but
it still mostly works.
Kinda figured it was copying (cp command) just didn't get the "foo"
Hehe. It's a shell variable, as I guess you've figured out. I like
to use, er, more descriptive variables, to make the code more obvious
to anyone who happens to be reading. And put comments in there.
Tried those commands... guess when I try to re-install everything
the manual way, I hope to find the directory and files. I used yum
to install librrds-perl but I still can't find RRDs.pm anywhere...
root_prompt# find / -name RRDs.pm
Quite so. Try

perldoc perlfaq8

(and if you don't have perldoc installed - I'd be very surprised -
then you need to install it).
Should these modules be installed in a directory within my perl
directory?
Not necessarily, but it's normal. However you may have several Perl
directoriesvalready. When you're more familiar with the rationale
behind the directory hierarchy you'll start to decide where you want
things to be, rather than just accepting where someone else (e.g. the
package maintainer) decides they should be. Most of the time the
maintainers' choice is fine, but there will obviously be occasions
when you know more about what you want to do, or about your system,
than they do. For example you might not want other users on the
system to have access to certain facilities, so you might install
them just in your own home directory tree rather than system-wide.
I tried a command I found on the 'net to test if my RRD
That just means the path containing RRDs.pm hasn't been pushed into
@INC yet. Sometimes paths aren't needed most of the time, so there's
little point in having them searched for stuff which won't be there -
it just wastes CPU cycles - and as I said you might not want things to
be available system-wide, So you can modify the Perl environment on
the occasions that you'll need those modules.
Post by G.W. Haywood
rrdtool help create
Hmm.. I get the Usage information...
Then rrdtool should be installed Ok.
do I have to create a new RRD??? looks interresting... I will have
to read up on this one..
Smokeping itself should create the databases for you. Spending a bit
of quality time with the Smokeping documentation is a good idea, to my
mind it's a bit verbose, structured rather loosely and makes a few too
many assumptions, but Tobi's done a great job when you consider the
price you paid... :)

--

73,
Ged.
Tobias Oetiker
2009-01-31 12:47:28 UTC
Permalink
Post by G.W. Haywood
Spending a bit
of quality time with the Smokeping documentation is a good idea, to my
mind it's a bit verbose, structured rather loosely and makes a few too
many assumptions, but Tobi's done a great job when you consider the
price you paid... :)
Ged,

if you have patches to improve the situation or ideas on the
structuring of it all please share!

cheers
tobi
--
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
http://it.oetiker.ch ***@oetiker.ch ++41 62 775 9902 / sb: -9900
Jonte Regnéll
2009-02-02 04:34:25 UTC
Permalink
Hi Everyone,

I email this directly to Guy cause I have in the past I have failed to
join the list, today the join worked so here is what I sent. I have
included what I sent him at the bottom of this post.

I would like to do a few more observations while I'm at it. First off 'Hi'
to everyone. I'm one of those annoying people that like Redhat and it's
derivatives like CentOS.

Fedora 10 come with SElinux which is great at keeping security. While
outside of the scope of this list please make sure that it's not
interfering with other 'permissions' on the system.
"/usr/sbin/sestatus" should tell how your system looks. If you go with the
RPM listed below it should make the necessary changes for everything to
work smoothly, if you use the tgz you are on your own and should probably
turn off SElinux at least while your testing "/usr/sbin/setenforce 0" but
doing so will make your system "more" vulnerable then it with SElinux
enabled, it's your call.

If you still looking for your RRDs.pm you probably want to make sure you
have the rrdtool-perl rpm installed "rpm -qi rrdtool-perl" should show you
if it's on your system. "rpm -ql rrdtool-perl|grep RRDs.pm" should tell
you where it got installed by the rpm. But more to the point if you use
yum to install the smokeping rpm, or that don't work in Fedora 10 you can
always pull that rpm to your system and do an "yum --localinstall
smokeping-2.4.2-7.fc10.noarch.rpm" and yum will take care of all
dependency.

Last but not least this all works great for CentOS too, I use the above
RPM to run it in CentOS 5.2, but I use the SRPM to roll my own rpm to make
sure I don't have to bother with things like perl etc which can easily
become an nightmare, especially for people new to Linux.

YMMV but I hope that someone finds this helpful, enjoy and good luck.

---

Hi Guy,

sorry to email you directly but for some reason I can't join the smokeping
list.

Smokeping is available for Fedora 10 as an RPM, please use that instead of
the old 2.0.9 that sits in Tobies contrib.

http://download.fedora.redhat.com/pub/fedora/linux/releases/10/Everything/i386/os/Packages/smokeping-2.4.2-7.fc10.noarch.rpm

Hope that's helpful, enjoy and good luck.

---



Regards,
Jonte.

Loading...