Ken Dreyer | 2 Aug 2011 00:09
Favicon
Gravatar

Re: speedycgi replacement

On Tue, Jul 19, 2011 at 9:00 AM, Ken Dreyer <ktdreyer <at> ktdreyer.com> wrote:
> I had to modify
> Smokeping.pm's cgi() to take $q as a second argument rather than
> creating a new CGI object upon each invocation.

For those interested, here is my patch against Smokeping.pm to use
FastCGI. Note that you'll also have to modify the .cgi file(s) like I
described in my previous email.

- Ken
Attachment (smokeping-fcgi.patch): text/x-patch, 839 bytes
_______________________________________________
smokeping-users mailing list
smokeping-users <at> lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/smokeping-users
Juan Vasquez | 2 Aug 2011 04:19
Picon
Favicon

Update Smokeping on Ubuntu from 2.3.2 to 2.4.2

Hello


does anyone know what is the best way to upgrade an Ubuntu smokeping install from the version that you can get via apt-get to 2.4.2

ive been trying to do diff's on individual files to determine which files need replacement, but it would be greatly appreciated if someone lets me know what experience they have had.
I do not think that upgrade instructions are very clear.

Alternately does anyone have a good step by step install doc including the dependency names needed in Ubuntu?

Thanks

-Juan


--


_______________________________________________
smokeping-users mailing list
smokeping-users <at> lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/smokeping-users
Josh Wisman | 3 Aug 2011 02:15
Picon

Large deployment problems

I have a need to do a 5600+ node deployment of Smokeping. Meaning that I have 5600 devices to ping. Some 10% -20% have high latency 1000ms+. Currently I have about 1200 nodes in smokeping. This is a new build. I am building this on a OpenSuse 11.4 x86_64 platform. I am running into problems.


1. SpeedyCGI does not compile on this version of Suse even after my best effort. I have attempted to make use of fastCGI, but I dont know that I am doing it right. The menu(smokeping.cgi) is large. Its by State then City in my config. It maxes out my cpu (1 of 4)  when you open smokeping, because of this, page load times are pretty slow and it will only get worse as I add more nodes.
make[1]: Entering directory `/apps/CGI-SpeedyCGI-2.22/src'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/apps/CGI-SpeedyCGI-2.22/src'
make[1]: Entering directory `/apps/CGI-SpeedyCGI-2.22/speedy_backend'
cc -c  -I../src -I. -D_REENTRANT -D_GNU_SOURCE -DPERL_USE_SAFE_PUTENV -DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O   -DVERSION=\"2.22\" -DXS_VERSION=\"2.22\" -fPIC "-I/usr/lib/perl5/5.12.3/x86_64-linux-thread-multi/CORE"  -DSPEEDY_PROGNAME=\"speedy_backend\" -DSPEEDY_VERSION=\"2.22\" -DSPEEDY_BACKEND speedy_backend_main.c
cc -c  -I../src -I. -D_REENTRANT -D_GNU_SOURCE -DPERL_USE_SAFE_PUTENV -DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O   -DVERSION=\"2.22\" -DXS_VERSION=\"2.22\" -fPIC "-I/usr/lib/perl5/5.12.3/x86_64-linux-thread-multi/CORE"  -DSPEEDY_PROGNAME=\"speedy_backend\" -DSPEEDY_VERSION=\"2.22\" -DSPEEDY_BACKEND speedy_perl.c
speedy_perl.c: In function find_scr:
speedy_perl.c:258:2: error: expected expression before âSpeedyScript
speedy_perl.c: In function get_string:
speedy_perl.c:449:2: error: expected expression before char
speedy_perl.c: In function cwd_new:
speedy_perl.c:484:5: error: expected expression before SpeedyCwd
speedy_perl.c: In function onerun:
speedy_perl.c:808:47: warning: comparison between pointer and integer
speedy_perl.c:809:40: warning: comparison between pointer and integer
speedy_perl.c:810:40: warning: comparison between pointer and integer
speedy_perl.c: In function speedy_perl_init:
speedy_perl.c:918:2: warning: passing argument 2 of âperl_parseâ from incompatible pointer type
/usr/lib/perl5/5.12.3/x86_64-linux-thread-multi/CORE/proto.h:57:19: note: expected XSINIT_t but argument is of type void (*)(void)
make[1]: *** [speedy_perl.o] Error 1
make[1]: Leaving directory `/apps/CGI-SpeedyCGI-2.22/speedy_backend'
make: *** [subdirs] Error 2

smokeping.cgi:
use CGI::Fast;

while (my $q = new CGI::Fast) {
       Smokeping::cgi("/etc/smokeping/config", $q);
}

Smokeping.PM
diff -ur smokeping-2.4.2/lib/Smokeping.pm smokeping-dev/lib/Smokeping.pm
--- smokeping-2.4.2/lib/Smokeping.pm    2008-07-24 11:37:05.000000000 -0600
+++ smokeping-dev/lib/Smokeping.pm      2011-07-02 16:15:11.000000000 -0600
<at> <at> -1376,7 +1376,7 <at> <at>
              print "Content-Length: ".length($data)."\nn";
              print $data;
              unlink "${imgbase}_${end}_${start}.png";
-             exit;
         }
         elsif ($mode eq 'n'){ # navigator mode
 #           $page .= qq|<div class="zoom" style="cursor: crosshair;">|;
<at> <at> -3843,11 +3843,12 <at> <at>
 POD

 }
-sub cgi ($) {
+sub cgi ($$) {
     $cgimode = 'yes';
     umask 022;
     load_cfg shift;
-    my $q=new CGI;
+    my $q = shift;
     initialize_cgilog();
     if ($q->param(-name=>'slave')) { # a slave is calling in
         Smokeping::Master::answer_slave($cfg,$q);

2. Because of the number of nodes, fping poller does not finish in 300 seconds.  I have blazemode enabled. Is there a way to run multiple fping probes or increase parallelization? Any help would be greatly appreciated. 

3. If smokeping cant practically scale to this size, Does anyone have an open sourced suggestion. I am also running cacti and it has scaled rather well.
_______________________________________________
smokeping-users mailing list
smokeping-users <at> lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/smokeping-users
Peter Kristolaitis | 3 Aug 2011 05:04
Picon

Re: Large deployment problems

1)  I assume that you've checked for a speedycgi package in your distro's repositories first?   Speedy is pretty common (though obviously outdated) and most distros should have a pre-patched, pre-compiled binary available.   If not, search through the archives for this list -- someone JUST submitted a patchset to use FastCGI instead of Speedy (seriously, I think it was the post before yours on the list!).

2)  Absolutely, you can run multiple probes in parallel.   The documentation available at smokeping.org covers this, and there have been many threads on this list about that topic.   Consider also changing your 'step' and 'pings' values to meet your requirements -- you're essentially balancing granularity vs performance.   It can take a bit of guesswork and futzing with numbers to get something that works for you.

3)  I don't see a problem scaling to 5600+ nodes with Smokeping if it's configured properly (there's the rub, of course).  I honestly don't know of any other F/OSS software that does the same thing that Smokeping does, unfortunately (though IIRC, someone did write a "Smokeping-like" module for Cacti a few years ago.... maybe check cactiusers.org (again IIRC) if you're interested in this option). 

On 02/08/2011 8:15 PM, Josh Wisman wrote:
I have a need to do a 5600+ node deployment of Smokeping. Meaning that I have 5600 devices to ping. Some 10% -20% have high latency 1000ms+. Currently I have about 1200 nodes in smokeping. This is a new build. I am building this on a OpenSuse 11.4 x86_64 platform. I am running into problems.

1. SpeedyCGI does not compile on this version of Suse even after my best effort. I have attempted to make use of fastCGI, but I dont know that I am doing it right. The menu(smokeping.cgi) is large. Its by State then City in my config. It maxes out my cpu (1 of 4)  when you open smokeping, because of this, page load times are pretty slow and it will only get worse as I add more nodes.  (snip build output - PK)
2. Because of the number of nodes, fping poller does not finish in 300 seconds.  I have blazemode enabled. Is there a way to run multiple fping probes or increase parallelization? Any help would be greatly appreciated. 

3. If smokeping cant practically scale to this size, Does anyone have an open sourced suggestion. I am also running cacti and it has scaled rather well.


_______________________________________________ smokeping-users mailing list smokeping-users <at> lists.oetiker.ch https://lists.oetiker.ch/cgi-bin/listinfo/smokeping-users

_______________________________________________
smokeping-users mailing list
smokeping-users <at> lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/smokeping-users
Niko Tyni | 3 Aug 2011 07:57
Picon
Picon

Re: Large deployment problems

On Tue, Aug 02, 2011 at 05:15:56PM -0700, Josh Wisman wrote:

> 1. SpeedyCGI does not compile on this version of Suse even after my best
> effort.

You might want to check if any of the patches at
 http://patch-tracker.debian.org/package/speedy-cgi-perl
help.

Alternatively, I think fastCGI should work with the changes you included
in your mail. You'll need a fastCGI enabled web server of course.

> 2. Because of the number of nodes, fping poller does not finish in 300
> seconds.  I have blazemode enabled. Is there a way to run multiple fping
> probes or increase parallelization? Any help would be greatly appreciated.

Multiple probe instances are supported, see the smokeping_examples document.

HTH,
--

-- 
Niko

_______________________________________________
smokeping-users mailing list
smokeping-users <at> lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/smokeping-users

Darren Murphy | 3 Aug 2011 14:56
Gravatar

Re: Large deployment problems

On 3 August 2011 08:15, Josh Wisman <jwisman <at> gmail.com> wrote:

> 2. Because of the number of nodes, fping poller does not finish in 300
> seconds.  I have blazemode enabled. Is there a way to run multiple fping
> probes or increase parallelization? Any help would be greatly appreciated.

As others have mentioned, the answer is yes, and documented. I run 20
FPing probes on each of 3 slaves, with each slave polling ~1000 hosts
(50 hosts per probe).
One problem I have found with running multiple FPing probes is that
individual probes on my slaves tend to die from time to time.
I haven't been able to figure out why they die, but I have found that
monit (http://mmonit.com/monit/) is particularly effective in keeping
the required number of probes running.
My monit config for smokeping is quite simple and looks like so:

check process smokeping with pidfile /var/smokeping/smokeping.pid
    start program = "/etc/init.d/smokeping start"
    stop program  = "/etc/init.d/smokeping stop"
    if children < 20 then restart
    if 3 restarts within 5 cycles then alert

The above will restart smokeping at any time than less than the
required number (20) of probes are found, and alert me via email if 3
restarts occur within 5 checks.

Hope this helps,
Darren

_______________________________________________
smokeping-users mailing list
smokeping-users <at> lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/smokeping-users
Layla Nahar | 8 Aug 2011 20:32
Picon

purpose of user 'www' (vs 'apache)?

Hello,

I've seen reference in some mails on this list to the user www.
I have user 'apache' in my system and Smokeping is running without user www.
I tried checked on the internet to try and find our if there are any
conventions or requirements vis a vis 'www' but found very little.

I suspect this is a very elementary question, but would someone mind
clarifying how it is used in connection with smokeping?  I'm guessing
it is just the convention among some admins to have this user start
and run apache server, but I'd like to be sure.

thanks
LN

_______________________________________________
smokeping-users mailing list
smokeping-users <at> lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/smokeping-users

Josh Luthman | 8 Aug 2011 20:39

Re: purpose of user 'www' (vs 'apache)?

RHEL vs Debian vs BSD vs another distro.  Some install httpd as www, some as nobody, some as apache, etc.

Smokeping is run under Apache and hence the user Apache uses.

Josh Luthman
Office: 937-552-2340
Direct: 937-552-2343
1100 Wayne St
Suite 1337
Troy, OH 45373


On Mon, Aug 8, 2011 at 2:32 PM, Layla Nahar <laylanahar <at> gmail.com> wrote:
Hello,

I've seen reference in some mails on this list to the user www.
I have user 'apache' in my system and Smokeping is running without user www.
I tried checked on the internet to try and find our if there are any
conventions or requirements vis a vis 'www' but found very little.

I suspect this is a very elementary question, but would someone mind
clarifying how it is used in connection with smokeping?  I'm guessing
it is just the convention among some admins to have this user start
and run apache server, but I'd like to be sure.

thanks
LN

_______________________________________________
smokeping-users mailing list
smokeping-users <at> lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/smokeping-users

_______________________________________________
smokeping-users mailing list
smokeping-users <at> lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/smokeping-users
Layla Nahar | 8 Aug 2011 20:50
Picon

Re: purpose of user 'www' (vs 'apache)?

Hello  Josh,  Deny IP -

thank you very much for the clarification.  I feel much more at ease
being sure rather than just guessing and hoping!

thanks again

LN

On Mon, Aug 8, 2011 at 3:40 PM, Deny IP Any Any <denyipanyany <at> gmail.com> wrote:
> back in the old days, the Apache daemon ran as the user 'root'. This
> caused lots of security issues (think if someone wrote a web page that
> tries to write to /etc/password; since Apache ran as root, so their
> their script).
>
> In current systems, Apache runs as a non-root user; this user is often
> called www, or apache, or www-data, etc. The actual name makes no
> difference, as long as it isn't ran as root.

On Mon, Aug 8, 2011 at 3:32 PM, Layla Nahar <laylanahar <at> gmail.com> wrote:
> Hello,
>
> I've seen reference in some mails on this list to the user www.
> I have user 'apache' in my system and Smokeping is running without user www.
> I tried checked on the internet to try and find our if there are any
> conventions or requirements vis a vis 'www' but found very little.
>
> I suspect this is a very elementary question, but would someone mind
> clarifying how it is used in connection with smokeping?  I'm guessing
> it is just the convention among some admins to have this user start
> and run apache server, but I'd like to be sure.
>
> thanks
> LN
>

_______________________________________________
smokeping-users mailing list
smokeping-users <at> lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/smokeping-users

Glenn Andersson | 23 Aug 2011 15:11
Picon
Favicon

Steps and new graph

Hi there again.

 

I have changes some settings in my smokeping config to be able to see more in-depth information in my graphs.

So I have set the ‘step’ part in ‘Database’ section to 5 (I should maybe change this to 1 in the future). Changing that would end up in me having history for about 360 days?

If I wanted to maintain the step = 5 and increase the history date, what value would I change?

 

And another thing, I want a new graph separated from the other ones with less sampling rate but stretch over 10 years.

How and where could I do that?

 

Best regards,

Glenn Andersson

_______________________________________________
smokeping-users mailing list
smokeping-users <at> lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/smokeping-users

Gmane