Projects Log

projects, diy

Search:

« PreviousNext »

Patching Smokeping for Windows so you don't have to.

14 October 2007

I'm releasing this today, but it's still in beta (Everything that used to work with my old 2.0.8 patch works with that version, but not all new features have been tested yet)

What you'll need:

-Perl (latest version if you can)
-A web server (wamp is good, but others should work fine as well)


What the script will do and what it won't:

it will: download smokeping, rrdtool, and fping, help you configure smokeping (owner, mail, etc), patch what's needed to be patched, install a new feature that is not included in smokeping's official package (zoom in/out with pageup|pagedown)
it won't: install/configure your webserver, install perl, add targets in your configuration file


what's working and what's untested yet:

working: everything that used to work with the 2.0.8 version, Ajax based ineractive graph zooming (+ my exclusive zoom with pageup/pagedown feature), Multi Target Graphs, using drives different than "c:"
not tested yet: Master/Slave setup for multi source smokeping deployments.

How to configure wamp, or apache:
edit httpd.conf (C:\wamp\Apache2\conf\httpd.conf with wamp)
change: ScriptAlias /cgi-bin/ "C:/wamp/Apache2/cgi-bin/" into ScriptAlias /cgi-bin/ "c:/wamp/cgi/" *
change: <Directory "C:/wamp/Apache2/cgi-bin/"> into <Directory "c:/wamp/cgi"> *
(* you don't _have_ to do that, and of course you can change every paths, you just have to provide every paths to the install script)
create a folder in your www root folder (c:\wamp\www if you're runing wamp) and name it "simg"

The install script will ask you the www root folder and the image folder

WWW root folder [Default: C:\wamp\www] (must already exist)

image folder from C:\wamp\www [Default: simg]

that's it! if something is not self explanatory enough, or if you have questions feel free to leave a comment

for testing, and autostart take a look at steps 7,8, and 10 here http://dev.pulsed.net/wp/?p=3

Download the Smokeping Installer for Windows, unzip it and launch "install n patch.pl"

Archived in Windows, perl, smokeping, win32 | Trackback | del.icio.us | Top Of Page

127 Responses to “Patching Smokeping for Windows so you don't have to.”

  1. Joksi Says:

    Nice job!

    However, seem there is a problem for me with this.

    Installation works nice, but when I start smokeping.pl i get the followin message:

    Can't locate Smokeping.pm in @INC (@INC contains: lib ../lib F:/Perl/site/lib
    /Perl/lib .) at F:\www\smokeping-2.2.4\bin\smokeping.pl line 7.
    BEGIN failed–compilation aborted at F:\www\smokeping-2.2.4\bin\smokeping.pl

  2. Joksi Says:

    add (after line 5): use lib qw(C:\smokeping-2.0.8\lib);

    This solved it, I thinkg you will have to change this in your install script :)

    But still, when I enter smokeping html pages i get this:

    ERROR: Could not parse color in "
    'DEF:median1=F\:/WWW/smokeping-2.2.4/var/Test/James.rrd:median:AVERAGE'

  3. Kevin DEHLINGER Says:

    the first issue is a little bit odd because ../lib should be just fine, anyway as you mentionned, it is possible to manually add the path to the library with "use lib qw(path\to\smokeping\lib);"

    The second issue is actually not an issue:
    i've commented the whole "*** Slaves ***" section out in the config.dist file, this is for the "Master/Slave setup for multi source smokeping deployments" thing; however i somehow forgot to comment the "slaves = boomer" line;
    all you have to do is delete or comment this line and it should work.

  4. Colin Cashin Says:

    Kevin

    Excellent work. You're a legend. Its nice to get this working on Windows coz not every Enterprise allows what they consider non-standard OS's on the network :-P
    Thanks again for the good work.

    Regards
    Colin

  5. Joksi Says:

    Hi again Kevin

    Okey, I see.

    Well I have commented out the boomer-line now, and your right the RRDtool error message dissapears.

    But it becomes empty though! No graphs/graphics at all.

  6. Kevin DEHLINGER Says:

    Hey Colin,

    Thanks for your comment. I have the same "non-standard OS’s" problem here too, that's why I started to port smokeping.

  7. Markus Joosten Says:

    Hi there,

    first off, great tool, and thanks a lot for your effort creating this package for smooth smokeping installation under windows!
    Saved me a lot of time!

    Fping probes are working fine now, but i seem to have some issues regarding curl probes.
    I dl'ed curl-windows binary, placed it in D:\Smokeping-2.2.4\curl
    and defined the Curl probe in config.dist right underneath the Fping probe.

    Now when i start smokeping.pl, it reports that some path does not exist, one syntactic error and that "-" is no file or command.

    I suspect some parsing errors regarding my curl probe config.

    EchoPingHttp won't work as well :(

    Pls help!
    Thanks in advance!

  8. Kevin DEHLINGER Says:

    Joksi,

    It looks like you're trying to ping the default target (James) which is not a real host.

    Please take a look here http://oss.oetiker.ch/smokeping/doc/smokeping_config.en.html and here http://oss.oetiker.ch/smokeping/doc/smokeping_examples.en.html to set up your own target hosts.

  9. Kevin DEHLINGER Says:

    Hey Markus,

    I didn't have enough spare time yet to look for other probes.
    I'll try to get it working soon

  10. Joksi Says:

    Hi

    Nope, I have addd my targets, but there isnt any graphs displayed on the webpage. However I see graphs are created in the /simg dir.

  11. Joksi Says:

    My targets gets created in individual folders, however the graphs are created in the root of /simg and, and not in each subfolder.

  12. Doug M Says:

    Scroll down to bottom to see the error I'm getting…

    —————————–

    C:\smokepinginstaller>"install n patch.pl"
    i found the perl executable here C:\Perl\bin\perl.exe
    press enter if that's ok, or type the correct path to the perl interpreter execu
    table

    Where do we install smokeping? [Default: C:\smokeping-2.2.4]

    Owner (your name should be ok)
    John Doe

    contact mail (as displayed on the smokeping page)
    john.doe@isp.com

    SMTP host (not using PopBeforeSMTP or something)
    mail.isp.com

    WWW root folder [Default: C:\wamp\www] (must already exist)

    image folder from C:\wamp\www [Default: simg]

    cgi url (not sure what exactly this is for) [Default: http://127.0.0.1/cgi-bin/
    smokeping.pl]

    cgi folder [Default: c:\wamp\cgi] (must already exist)

    Alerts: "alertee"
    john.doe@isp.com

    Alerts: sender email (can be fake)
    john.doe@isp.com

    installing RRDs
    Can't find unicode character property definition via main->e or e.pl at unicode/
    Is/e.pl line 0

    OK 256

    C:\smokeping-2.2.4\bin>smokeping.pl
    Can't locate RRDs.pm in @INC (@INC contains: lib ../lib C:/Perl/lib C:/Perl/site
    /lib .) at ../lib/Smokeping.pm line 13.
    BEGIN failed–compilation aborted at ../lib/Smokeping.pm line 13.
    Compilation failed in require at C:\smokeping-2.2.4\bin\smokeping.pl line 7.
    BEGIN failed–compilation aborted at C:\smokeping-2.2.4\bin\smokeping.pl line 7.

  13. Markus Joosten Says:

    Hi Doug,

    the error you mention seems to be caused by mismatched RegEx chars.

    Try entering the Paths with slashes instead of backslashes.

    i.e. C:/Perl/bin/perl.exe
    C:/Smokeping-2.2.4
    C:/wamp/www

    and so on.

    Greetings

  14. Kevin DEHLINGER Says:

    Joksi

    Could you please paste your *** target *** section with 2-3 targets in it (feel free to give fake ips if you're more confortable that way)

  15. Kevin DEHLINGER Says:

    hi Doug,

    the unicode thing kind of reminds me older windows version (95, 98, me); which windows version are you using?

    After a quick googling this issue seems to be related to ppm (activestate's package installer), did you try with the latest perl version?

  16. Joksi Says:

    *** Targets ***

    probe = FPing

    menu = Top
    title = Network Latency Grapher
    remark = Welcome to the SmokePing website of xxx Company. \
    Here you will learn all about the latency of our network.

    + LAN
    menu= LAN

    + Joksi

    menu = Joksi
    title = Joksi
    alerts = someloss
    host = 10.1.1.2

    + Google

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

  17. Kevin DEHLINGER Says:

    mhh I see, I guess.

    Try to add another + before Joksi and Google like that:

    ++ Joksi

    menu = Joksi
    title = Joksi
    alerts = someloss
    host = 10.1.1.2

    ++ Google

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

    "+ Lan" is a "container", and I think that it thinks that "+ Joksi" and "+ Google" are containers too

  18. Joksi Says:

    I did that just now, and it doesnt show graphs still.

    The folder structure that gets created is the following:

    simg/
    simg/LAN/Joksi
    simg/LAN/Google

    In simg/LAN the graphs exist, but the Joksi and Google folders are empty.

  19. Joksi Says:

    Im starting to think that the problem is the variable with value ../simg, that its the wrong path.

  20. Joksi Says:

    Solved it, changed ../simg to http://domain/simg

  21. Kevin DEHLINGER Says:

    strange, first ../lib, and now ../simg, don't know what could cause this

  22. Joksi Says:

    yeah its strange.

    also, when i click on a graph, i dont have the possibility to use page up and down, cannot change the graph at all

  23. Markus Joosten Says:

    Hi Kevin,

    i just started to port Curl probe for use with smokeping under windows, because i need it kinda fast :)
    Are you interested in including my changes in your smokepinginstaller since I think many people would be interested in measuring HTTP response times.

    As for now, I am making some progress in filtering Unix-specific commands from smokeping's curl module.

    Greetings

  24. Kevin DEHLINGER Says:

    Joksi, it looks like you have some pieces left from version 2.0.8

    Markus,
    I'd be happy to include your modifications to the curl probe in the installer!

  25. Joksi Says:

    Hi Kevin

    I dont think so, cause I deleted the old smokeping folder and then downloaded your installer.

  26. Colin Cashin Says:

    Folks,

    If anyone is working on porting probes, the CiscoRTTMonTcpConnect probe would be really cool to have.
    Can check response time for any TCP service running on any device on your network from a remote router. Performance management heaven. Loads of possibilities with this one. . .

  27. Joksi Says:

    Can't locate Sys/Syslog.pm in @INC (@INC contains: F:\smokeping-2.2.4\lib /usr/p
    ack/rrdtool-1.2.23-mo/lib/perl F:/Perl/site/lib F:/Perl/lib .) at F:\smokeping-2
    .2.4\lib/Smokeping.pm line 14.
    BEGIN failed–compilation aborted at F:\smokeping-2.2.4\lib/Smokeping.pm line 14
    .
    Compilation failed in require at F:\smokeping-2.2.4\bin\smokeping.pl line 7.
    BEGIN failed–compilation aborted at F:\smokeping-2.2.4\bin\smokeping.pl line 7.

    This is when I deleted the Smokeping folder and tried a new setup with the installer script.
    It doesnt help when chaging /lib to the right path like before either!

  28. Joksi Says:

    Strange, tried installation again and now it worked directly without modifications =S
    However, the zoom function doesnt work, and the javascripts are existing for it in the simg folder

  29. Joksi Says: