<p dir="ltr">What do the apache logs show?</p>
<div class="gmail_quote">On Jan 15, 2014 6:15 AM, &quot;Mark Haney&quot; &lt;<a href="mailto:mhaney@practichem.com">mhaney@practichem.com</a>&gt; wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
-----BEGIN PGP SIGNED MESSAGE-----<br>
Hash: SHA1<br>
<br>
On 1/14/2014 4:03 PM, Gregory Sloop wrote:<br>
&gt; [Top posting]<br>
&gt;<br>
&gt; Here&#39;s the FAQ:<br>
&gt;<br>
&gt; <a href="https://github.com/oetiker/SmokePing/issues/11" target="_blank">https://github.com/oetiker/SmokePing/issues/11</a><br>
<br>
&gt;<br>
&gt; 1) Data not reaching the RRD [round robin databases] Run smokeping<br>
&gt; in debug mode and watch what it says - you&#39;ll probably find some<br>
&gt; good reasons stuff isn&#39;t working and be able to fix it yourself.<br>
&gt; Like this: smokeping --debug<br>
&gt;<br>
&gt; 2) Data is hitting the RRD&#39;s as confirmed by --debug. However, you<br>
&gt; still get an empty graph from the browser.<br>
&gt;<br>
&gt; You see: the user smokeping is running as, is writing the data -<br>
&gt; that&#39;s often root or smokeping. However, the thing that&#39;s creating<br>
&gt; the graphs has to read the data - and that&#39;s whatever process your<br>
&gt; web-server is running as. That&#39;s often apache or www, httpd or<br>
&gt; www-data.<br>
&gt;<br>
&gt; [It depends on the apache [or how your distro sets it]<br>
&gt; configuration - or whatever other web-server you&#39;re using.]<br>
&gt;<br>
&gt; So, make sure that both the user smokeping is running as, as well<br>
&gt; as the user the web-server is running as, both have rights to the<br>
&gt; RRD&#39;s. [If you aren&#39;t sure what apache is running at, have a look<br>
&gt; at the apache config files. For example Ubuntu 12.04 has the user<br>
&gt; in /etc/apache2/envvars - and the user is www-data.]<br>
&gt;<br>
&gt; So, to spoon-feed you - you&#39;ll need to chown the files to something<br>
&gt; like: chown smokeping:www-data some-rrd-files*.rrd<br>
&gt;<br>
&gt; -Greg<br>
<br>
First off, it&#39;s not just the images of the graphs I&#39;m not getting, I&#39;m<br>
also not getting the counter image, nor the RRDtool image. I get the<br>
same broken image in their place.  So it&#39;s not a read/write issue with<br>
only the graphs.<br>
<br>
Let me show you what I have setup: (smokeping is run as root and<br>
apache is the httpd user (I&#39;m on CentOS 6.5).<br>
<br>
<br>
[root@mon smokeping]# ls -l<br>
total 36<br>
drwxr-xr-x. 2 root   root 4096 Jan 14 09:58 bin<br>
lrwxrwxrwx. 1 apache root   20 Jan 14 10:07 cache -&gt; /var/www/html/cache/<br>
drwxrwxrw-. 5 apache root 4096 Jan 14 10:27 data<br>
drwxr-xr-x. 3 root   root 4096 Jan 14 13:02 etc<br>
drwxr-xr-x. 3 root   root 4096 Jan 14 09:58 htdocs<br>
drwxr-xr-x. 3 root   root 4096 Jan 14 09:58 lib<br>
drwxr-xr-x. 3 root   root 4096 Jan 14 09:58 share<br>
- -rw-r--r--. 1 root   root  302 Jan 14 13:06 smoke.log<br>
drwxr-xr-x. 6 root   root 4096 Jan 14 09:57 thirdparty<br>
drwxr-xr-x. 2 root   root 4096 Jan 14 10:07 var<br>
<br>
When I run smokeping with --debug I get this:<br>
<br>
[root@mon smokeping]# ./bin/smokeping --debug<br>
### Compiling alert detector pattern &#39;someloss&#39;<br>
### &gt;0%,*12*,&gt;0%,*12*,&gt;0%<br>
sub {<br>
    my $d = shift;<br>
    my $y = $d-&gt;{loss};<br>
    for(1){<br>
        my $imax2 = min(@$y - 3, 12);<br>
        my $imax1 = min(@$y - 3, 12);<br>
        my $minlength = 3;<br>
        my $maxlength = 27;<br>
        next if scalar @$y &lt; $minlength ;<br>
        my $i1;<br>
        for($i1=0; $i1 &lt; min($maxlength,$imax1); $i1++){<br>
            my $i2;<br>
            for($i2=0; $i2 &lt; min($maxlength-$i1,$imax2); $i2++){<br>
                next unless defined $y-&gt;[-3-$i1-$i2]<br>
                                and $y-&gt;[-3-$i1-$i2] =~ /^\d/<br>
                                and $y-&gt;[-3-$i1-$i2] &gt; 0<br>
                                     ;                last;<br>
            }<br>
            return 0 if $i2 &gt;= min($maxlength-$i1-$i2,$imax2);<br>
            next unless defined $y-&gt;[-2-$i1]<br>
                            and $y-&gt;[-2-$i1] =~ /^\d/<br>
                            and $y-&gt;[-2-$i1] &gt; 0<br>
                                 ;            last;<br>
        }<br>
        return 0 if $i1 &gt;= min($maxlength-$i1,$imax1);<br>
        next unless defined $y-&gt;[-1]<br>
                        and $y-&gt;[-1] =~ /^\d/<br>
                        and $y-&gt;[-1] &gt; 0<br>
                             ;        return 1;<br>
    }<br>
    return 0;<br>
}<br>
<br>
<br>
<br>
Smokeping version 2.006009 successfully launched.<br>
Not entering multiprocess mode with &#39;--debug&#39;. Use &#39;--debug-daemon&#39;<br>
for that.<br>
FPing: probing 1 targets with step 300 s and offset 241 s.<br>
FPing: Executing /usr/sbin/fping -C 20 -q -B1 -r1 -i10 66.188.99.174<br>
FPing: Got fping output: &#39;66.188.99.174 : 269.98 183.10 81.46 118.87<br>
82.20 79.97 85.42 81.77 82.68 82.11 82.29 87.19 80.58 82.50 82.84<br>
82.56 80.92 80.20 81.37 104.47&#39;<br>
Calling RRDs::update(/opt/smokeping/data/MTC/ASUSWifi.rrd --template<br>
uptime:loss:median:ping1:ping2:ping3:ping4:ping5:ping6:ping7:ping8:ping9:ping10:ping11:ping12:ping13:ping14:ping15:ping16:ping17:ping18:ping19:ping20<br>
1389793594:U:0:8.2500000000e-02:7.9970000000e-02:8.0200000000e-02:8.0580000000e-02:8.0920000000e-02:8.1370000000e-02:8.1460000000e-02:8.1770000000e-02:8.2110000000e-02:8.2200000000e-02:8.2290000000e-02:8.2500000000e-02:8.2560000000e-02:8.2680000000e-02:8.2840000000e-02:8.5420000000e-02:8.7190000000e-02:1.0447000000e-01:1.1887000000e-01:1.8310000000e-01:2.6998000000e-01)<br>

<br>
So it certainly looks like the RRDs are being written:<br>
<br>
[root@mon smokeping]# ls -l cache/MTC/<br>
total 132<br>
- -rw-r--r--. 1 apache apache 29323 Jan 15 08:43 ASUSWifi_last_108000.png<br>
- -rw-r--r--. 1 apache apache 26737 Jan 15 08:43 ASUSWifi_last_10800.png<br>
- -rw-r--r--. 1 apache apache 26326 Jan 15 08:43 ASUSWifi_last_34560000.png<br>
- -rw-r--r--. 1 apache apache 26224 Jan 15 08:43 ASUSWifi_last_864000.png<br>
- -rw-r--r--. 1 apache apache    44 Jan 15 08:43 ASUSWifi.maxheight<br>
- -rw-r--r--. 1 apache apache 11742 Jan 15 08:59 ASUSWifi_mini.png<br>
<br>
8:43 being the time I ran that command this morning.<br>
<br>
Here&#39;s the listing in /var/www/:<br>
<br>
[root@mon var]# ls www/html/cache/ -l<br>
total 28<br>
drwxr-xr-x. 2 apache root 4096 Jan 14 13:08 __chartscache<br>
drwxr-xr-x. 2 apache root 4096 Jan 14 10:27 MTC<br>
drwxr-xr-x. 2 apache root 4096 Jan 15 09:07 __navcache<br>
- -rw-r--r--. 1 apache root 3908 Jan 14 10:15 rrdtool.png<br>
- -rw-r--r--. 1 apache root 4382 Jan 14 10:15 smokeping.png<br>
drwxr-xr-x. 2 apache root 4096 Jan 14 10:15 Test<br>
[root@mon var]# ls www/html/cache/MTC/<br>
ASUSWifi_last_108000.png  ASUSWifi_last_10800.png<br>
ASUSWifi_last_34560000.png  ASUSWifi_last_864000.png<br>
ASUSWifi.maxheight  ASUSWifi_mini.png<br>
[root@mon var]# ls www/html/cache/MTC/ -l<br>
total 132<br>
- -rw-r--r--. 1 apache root 29191 Jan 15 09:07 ASUSWifi_last_108000.png<br>
- -rw-r--r--. 1 apache root 28220 Jan 15 09:07 ASUSWifi_last_10800.png<br>
- -rw-r--r--. 1 apache root 25284 Jan 15 09:07 ASUSWifi_last_34560000.png<br>
- -rw-r--r--. 1 apache root 26784 Jan 15 09:07 ASUSWifi_last_864000.png<br>
- -rw-r--r--. 1 apache root    42 Jan 15 09:07 ASUSWifi.maxheight<br>
- -rw-r--r--. 1 apache root 11542 Jan 15 09:07 ASUSWifi_mini.png<br>
<br>
Now, by all rights, the apache user /should/ be able to read and<br>
display the PNG file for the RRDtool and the SmokePing counter.  But<br>
they are not showing up. I&#39;m at a loss and getting in credibly<br>
frustrated by this.  It should not be that hard to make this work.<br>
I&#39;ve used and configured apache dozens of times and this makes no<br>
sense at all.<br>
<br>
<br>
<br>
<br>
- --<br>
Mark Haney<br>
Network Administrator/IT Support<br>
Practichem<br>
W:919-714-8428<br>
-----BEGIN PGP SIGNATURE-----<br>
Version: GnuPG v2.0.22 (MingW32)<br>
Comment: Using GnuPG with Thunderbird - <a href="http://www.enigmail.net/" target="_blank">http://www.enigmail.net/</a><br>
<br>
iQEcBAEBAgAGBQJS1pfsAAoJEDgEuzPE0JQvQMcH+gOWr6ZXL1GxtBvR37ecQHdq<br>
V7QyrwBKc9vd5ebRx6b9Z3wpmuJIs/Ts77m8djZCiw1ILw+xOCj2SeShU60DjsZ5<br>
D5vHhnwhTrrleqmoRF0p4hQ40WoEj+aKLm5y/qssB08Q73sgDDH6okKuRlaI3NKv<br>
VJIQJWJBMmNHSs/G2sd8jB7rzSiRm8RtGygN3TFTLhjAdCs8IAPhbKRK9nYwxS5f<br>
nDqwZZEUc2ii2CAPT0oVrfI1edYAxfQZEZ82ehOxLwML5EwskTBynsib05V4zweg<br>
KHfvET98wYmisQCGkW8pAIkxPR8NNluPOwGu9bYpK7cRwYXcEdBvf0ZXDNWFjt8=<br>
=McCX<br>
-----END PGP SIGNATURE-----<br>
<br>
</blockquote></div>