[smokeping-users] Problem using Smokeping RRD in PHPWeathermap

Tony DeMatteis tonyd at commspeed.net
Fri Jun 27 17:40:20 CEST 2014


Hello Russell...

Thank you for your responses =)

I believe I am pointing to the correct rrd.  In fact, I have tried a 
dozen or so rrds which I know for a fact are active and being used to 
generate graphs in the Smokeping Web UI.

 From the Web UI this is the URL which gives me a graph with current 
stats, not a time period of un-reachability (nan).

http://x.x.19.135/cgi-bin/smokeping.cgi?target=Network.switches.sw-pvdc2mm


# Config
/etc/smokeping/config.d/pathnames
...
datadir  = /var/lib/smokeping

# Data path listing
admin at smokeping1:/home/admin# ll /var/lib/smokeping/Network/switches/
total 37976
drwxr-xr-x  2 smokeping smokeping    4096 Mar 27 06:16 ./
drwxr-xr-x 11 smokeping smokeping    4096 Mar 26 23:13 ../
-rw-r--r--  1 smokeping smokeping 2986808 Jun 27 07:51 sw-core2pcc.rrd
-rw-r--r--  1 smokeping smokeping 2986808 Jun 27 07:51 sw-core2pldn.rrd
-rw-r--r--  1 smokeping smokeping 2986808 Jun 27 07:51 sw-core2svb.rrd
-rw-r--r--  1 smokeping smokeping 2986808 Jun 27 07:51 
sw-core2tbm_mgmtvlan.rrd
-rw-r--r--  1 smokeping smokeping 2986808 Jun 27 07:51 sw-core2tbm.rrd
-rw-r--r--  1 smokeping smokeping 2986808 Jun 27 07:51 sw-cow2bwm.rrd
-rw-r--r--  1 smokeping smokeping 2986808 Jun 27 07:51 sw-crds2sqpk.rrd
-rw-r--r--  1 smokeping smokeping 2986808 Jun 27 07:51 sw-mm2sqpk.rrd
-rw-r--r--  1 smokeping smokeping 2986808 Jun 27 07:51 
sw-pvdc2mm_mgmtvlan.rrd
-rw-r--r--  1 smokeping smokeping 2986808 Jun 27 07:51 sw-pvdc2mm.rrd    
<-----------------------
-rw-r--r--  1 smokeping smokeping 2986808 Jun 27 07:51 
sw-sqpk2cottonwood.rrd
-rw-r--r--  1 smokeping smokeping 2986808 Jun 27 07:51 sw-sqpk2crds.rrd
-rw-r--r--  1 smokeping smokeping 2986808 Jun 27 07:51 sw-sqpk2mm.rrd

# Note
noc2:/www/phpweathermap/htdocs/fs_smokeping is a sshfs connected 
fileshare to my smokeping servers /var/lib/smokeping directory

tony at noc2:/www/phpweathermap/htdocs# ll fs_smokeping/Network/switches/
total 37968
drwxr-xr-x  1 smokeping smokeping     4096 Mar 27 06:16 ./
drwxr-xr-x  1 smokeping smokeping     4096 Mar 26 23:13 ../
-rw-r--r--  1 smokeping smokeping  2986808 Jun 27 07:56 sw-core2pcc.rrd
-rw-r--r--  1 smokeping smokeping  2986808 Jun 27 07:56 sw-core2pldn.rrd
-rw-r--r--  1 smokeping smokeping  2986808 Jun 27 07:56 sw-core2svb.rrd
-rw-r--r--  1 smokeping smokeping  2986808 Jun 27 07:56 sw-core2tbm.rrd
-rw-r--r--  1 smokeping smokeping  2986808 Jun 27 07:56 
sw-core2tbm_mgmtvlan.rrd
-rw-r--r--  1 smokeping smokeping  2986808 Jun 27 07:56 sw-cow2bwm.rrd
-rw-r--r--  1 smokeping smokeping  2986808 Jun 27 07:56 sw-crds2sqpk.rrd
-rw-r--r--  1 smokeping smokeping  2986808 Jun 27 07:56 sw-mm2sqpk.rrd
-rw-r--r--  1 smokeping smokeping  2986808 Jun 27 07:56 sw-pvdc2mm.rrd   
<-----------------------
-rw-r--r--  1 smokeping smokeping  2986808 Jun 27 07:56 
sw-pvdc2mm_mgmtvlan.rrd
-rw-r--r--  1 smokeping smokeping  2986808 Jun 27 07:56 
sw-sqpk2cottonwood.rrd
-rw-r--r--  1 smokeping smokeping  2986808 Jun 27 07:56 sw-sqpk2crds.rrd
-rw-r--r--  1 smokeping smokeping  2986808 Jun 27 07:56 sw-sqpk2mm.rrd

# Results of your requested queries
tony at noc2:/www/phpweathermap/htdocs# rrdtool fetch 
/www/phpweathermap/htdocs/fs_smokeping/Network/switches/sw-pvdc2mm.rrd 
AVERAGE --start now-800 --end now
                          uptime                loss 
median               ping1               ping2 ping3               
ping4               ping5 ping6               ping7               ping8 
ping9              ping10              ping11 ping12              
ping13              ping14 ping15              ping16              
ping17 ping18              ping19              ping20

1403881500: nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan 
nan nan nan nan nan nan nan nan
1403881800: nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan 
nan nan nan nan nan nan nan nan
1403882100: nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan 
nan nan nan nan nan nan nan nan
1403882400: nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan 
nan nan nan nan nan nan nan nan

tony at noc2:/www/phpweathermap/htdocs/weathermap# rrdtool fetch 
/www/phpweathermap/htdocs/fs_smokeping/Network/switches/sw-pvdc2mm.rrd 
MIN --start now-800 --end now
                          uptime                loss 
median               ping1               ping2 ping3               
ping4               ping5 ping6               ping7               ping8 
ping9              ping10              ping11 ping12              
ping13              ping14 ping15              ping16              
ping17 ping18              ping19              ping20

1403884800: nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan 
nan nan nan nan nan nan nan nan

tony at noc2:/www/phpweathermap/htdocs/weathermap# rrdtool fetch 
/www/phpweathermap/htdocs/fs_smokeping/Network/switches/sw-pvdc2mm.rrd 
MAX --start now-800 --end now
                          uptime                loss 
median               ping1               ping2 ping3               
ping4               ping5 ping6               ping7               ping8 
ping9              ping10              ping11 ping12              
ping13              ping14 ping15              ping16              
ping17 ping18              ping19              ping20

1403884800: nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan 
nan nan nan nan nan nan nan nan


On 06/27/2014 08:01 AM, Russell Dwarshuis wrote:
> I thought of another possibility.  Your rrd configuration may somehow be be non-standard so AVERAGE has no data to fetch.
>
> Try `/usr/local/bin/rrdtool fetch <file> AVERAGE --start now-800 --end now`
> and `/usr/local/bin/rrdtool fetch <file> MAX --start now-800 --end now`
> and `/usr/local/bin/rrdtool fetch <file> MIN --start now-800 --end now`
>
>
> -Russell Dwarshuis
>
> ----- Original Message -----
> From: "Russell Dwarshuis" <rjd at merit.edu>
> To: "Tony DeMatteis" <tonyd at commspeed.net>
> Cc: smokeping-users at lists.oetiker.ch
> Sent: Friday, June 27, 2014 10:48:42 AM
> Subject: Re: [smokeping-users] Problem using Smokeping RRD in PHPWeathermap
>
> phpweathermap is running rrdtool fetch to get the data.  From your debug, it is retreiving the nan's:
>
>> /usr/local/bin/rrdtool fetch
>> /www/phpweathermap/htdocs/fs_smokeping/Network/switches/sw-mm2sqpk.rrd
>> AVERAGE --start now-800 --end now
>> DEBUG: [wmrrd_read_from_real_rrdtool at WeatherMapDataSource_rrd.php:382]
>> configs/smokeping_test.conf: > 1403873700: nan nan nan nan nan nan nan
>> nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan
> It must not be reading the same rrd file that smokeping is using.  Check the datadir configuration option in your smokeping config file to see if the path is the same.
>
>
> -Russell Dwarshuis
>
> ----- Original Message -----
> From: "Tony DeMatteis" <tonyd at commspeed.net>
> To: smokeping-users at lists.oetiker.ch
> Sent: Friday, June 27, 2014 9:24:38 AM
> Subject: Re: [smokeping-users] Problem using Smokeping RRD in PHPWeathermap
>
> Addendum...
>
> BTW, here is my phpweathermap node config:
>
> NODE node09727
> LABEL Latency {node:this:bandwidth_in:%d} ms / Loss
> {node:this:bandwidth_out:%d}%
> TARGET
> gauge:/www/phpweathermap/htdocs/fs_smokeping/Network/switches/sw-mm2sqpk.rrd:median:loss
> USESCALE pingloss in
> POSITION 153 76
>
> Thank you,
>
> td
>
> On 06/27/2014 06:18 AM, Tony DeMatteis wrote:
>> Greetings all,
>>
>> I'm trying to use my smokeping rrds latency/loss in my PHPWeathermaps
>> and getting a "no valid data" error.  Graph generates fine in the
>> smokeping Web UI so I know it's not a lack of data.  I wouldn't think it
>> a scaling issue.  And I can clearly see from the phpweathermap debug
>> output that it's seeing nan data.  I have tried a number of other RRDs
>> with same result.  They too show the nan data.  Could someone shed some
>> light on this for me?
>>
>> Thank you all very much...
>>
>> td
>>
>> admin at noc2:/www/phpweathermap/htdocs# /usr/local/bin/php -q weathermap
>> --config configs/smokeping_test.conf --bulge
>> WARNING: configs/smokeping_test.conf: ReadData: NODE node09727, target:
>> gauge:/www/phpweathermap/htdocs/fs_smokeping/Network/switches/sw-mm2sqpk.rrd:median:loss
>> on config line 49 of configs/smokeping_test.conf had no valid data,
>> according to WeatherMapDataSource_rrd
>>
>>
>> admin at noc2:/www/phpweathermap/htdocs# /usr/local/bin/php -q weathermap
>> --config configs/smokeping_test.conf --bulge --debug
>>
>> DEBUG: [ReadData at Weathermap.class.php:892] configs/smokeping_test.conf:
>> ReadData for NODE node09727:
>> DEBUG: [ReadData at Weathermap.class.php:901] configs/smokeping_test.conf:
>> ReadData: New Target:
>> gauge:/www/phpweathermap/htdocs/fs_smokeping/Network/switches/sw-mm2sqpk.rrd:median:loss
>> DEBUG: [ReadData at WeatherMapDataSource_rrd.php:496]
>> configs/smokeping_test.conf: Special DS names seen (median and loss).
>> DEBUG: [ReadData at WeatherMapDataSource_rrd.php:516]
>> configs/smokeping_test.conf: SCALING result by 1
>> DEBUG: [ReadData at WeatherMapDataSource_rrd.php:574]
>> configs/smokeping_test.conf: RRD ReadData: Target DS names are median
>> and loss
>> DEBUG: [wmrrd_read_from_real_rrdtool at WeatherMapDataSource_rrd.php:322]
>> configs/smokeping_test.conf: RRD ReadData: traditional style
>> DEBUG: [wmrrd_read_from_real_rrdtool at WeatherMapDataSource_rrd.php:362]
>> configs/smokeping_test.conf: RRD ReadData: Running:
>> /usr/local/bin/rrdtool fetch
>> /www/phpweathermap/htdocs/fs_smokeping/Network/switches/sw-mm2sqpk.rrd
>> AVERAGE --start now-800 --end now
>> DEBUG: [wmrrd_read_from_real_rrdtool at WeatherMapDataSource_rrd.php:382]
>> configs/smokeping_test.conf: > 1403873700: nan nan nan nan nan nan nan
>> nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan
>> DEBUG: [wmrrd_read_from_real_rrdtool at WeatherMapDataSource_rrd.php:382]
>> configs/smokeping_test.conf: > 1403874000: nan nan nan nan nan nan nan
>> nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan
>> DEBUG: [wmrrd_read_from_real_rrdtool at WeatherMapDataSource_rrd.php:382]
>> configs/smokeping_test.conf: > 1403874300: nan nan nan nan nan nan nan
>> nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan
>> DEBUG: [wmrrd_read_from_real_rrdtool at WeatherMapDataSource_rrd.php:382]
>> configs/smokeping_test.conf: > 1403874600: nan nan nan nan nan nan nan
>> nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan
>> DEBUG: [wmrrd_read_from_real_rrdtool at WeatherMapDataSource_rrd.php:382]
>> configs/smokeping_test.conf: > DEBUG:
>> [wmrrd_read_from_real_rrdtool at WeatherMapDataSource_rrd.php:390]
>> configs/smokeping_test.conf: RRD ReadData: Read 5 lines from rrdtool
>> DEBUG: [wmrrd_read_from_real_rrdtool at WeatherMapDataSource_rrd.php:391]
>> configs/smokeping_test.conf: RRD ReadData: Headings
>> are:                          uptime loss
>> median               ping1 ping2               ping3               ping4
>> ping5               ping6               ping7 ping8
>> ping9              ping10 ping11              ping12              ping13
>> ping14              ping15              ping16 ping17
>> ping18              ping19              ping20
>>
>> DEBUG: [wmrrd_read_from_real_rrdtool at WeatherMapDataSource_rrd.php:400]
>> configs/smokeping_test.conf: --
>> DEBUG: [wmrrd_read_from_real_rrdtool at WeatherMapDataSource_rrd.php:400]
>> configs/smokeping_test.conf: --1403874600: nan nan nan nan nan nan nan
>> nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan
>>
>> DEBUG: [wmrrd_read_from_real_rrdtool at WeatherMapDataSource_rrd.php:400]
>> configs/smokeping_test.conf: --1403874300: nan nan nan nan nan nan nan
>> nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan
>>
>> DEBUG: [wmrrd_read_from_real_rrdtool at WeatherMapDataSource_rrd.php:400]
>> configs/smokeping_test.conf: --1403874000: nan nan nan nan nan nan nan
>> nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan
>>
>> DEBUG: [wmrrd_read_from_real_rrdtool at WeatherMapDataSource_rrd.php:400]
>> configs/smokeping_test.conf: --1403873700: nan nan nan nan nan nan nan
>> nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan nan
>>
>> DEBUG: [wmrrd_read_from_real_rrdtool at WeatherMapDataSource_rrd.php:455]
>> configs/smokeping_test.conf: RRD ReadDataFromRealRRD: Returning
>> (NULL,NULL,0)
>> DEBUG: [ReadData at WeatherMapDataSource_rrd.php:616]
>> configs/smokeping_test.conf: RRD ReadData: Returning (NULL,NULL,0)
>>
>> _______________________________________________
>> 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
>
> _______________________________________________
> smokeping-users mailing list
> smokeping-users at lists.oetiker.ch
> https://lists.oetiker.ch/cgi-bin/listinfo/smokeping-users
>



More information about the smokeping-users mailing list