octo@casella:~/collectd $ svn merge -r754:800 branches/ntpd trunk
[collectd.git] / contrib / collection.cgi
index 0d65a76..2af6e44 100755 (executable)
@@ -247,6 +247,18 @@ our $GraphDefs;
                        'GPRINT:temp_max:MAX:%4.1lf Max,',
                        'GPRINT:temp_avg:LAST:%4.1lf Last\l'
                ],
+               frequency_offset => [ # NTPd
+                       'DEF:ppm_avg={file}:ppm:AVERAGE',
+                       'DEF:ppm_min={file}:ppm:MIN',
+                       'DEF:ppm_max={file}:ppm:MAX',
+                       "AREA:ppm_max#$HalfBlue",
+                       "AREA:ppm_min#$Canvas",
+                       "LINE1:ppm_avg#$FullBlue:{inst}",
+                       'GPRINT:ppm_min:MIN:%5.2lf Min,',
+                       'GPRINT:ppm_avg:AVERAGE:%5.2lf Avg,',
+                       'GPRINT:ppm_max:MAX:%5.2lf Max,',
+                       'GPRINT:ppm_avg:LAST:%5.2lf Last'
+               ],
                hddtemp => [
                        'DEF:temp_avg={file}:value:AVERAGE',
                        'DEF:temp_min={file}:value:MIN',
@@ -703,6 +715,21 @@ our $GraphDefs;
                        'GPRINT:temp_max:MAX:%4.1lf Max,',
                        'GPRINT:temp_avg:LAST:%4.1lf Last\l'
                ],
+               time_offset => [ # NTPd
+                       'DEF:ms_avg={file}:ms:AVERAGE',
+                       'DEF:ms_min={file}:ms:MIN',
+                       'DEF:ms_max={file}:ms:MAX',
+                       'CDEF:s_avg=ms_avg,1000,/',
+                       'CDEF:s_min=ms_min,1000,/',
+                       'CDEF:s_max=ms_max,1000,/',
+                       "AREA:s_max#$HalfBlue",
+                       "AREA:s_min#$Canvas",
+                       "LINE1:s_avg#$FullBlue:{inst}",
+                       'GPRINT:s_min:MIN:%7.3lf%s Min,',
+                       'GPRINT:s_avg:AVERAGE:%7.3lf%s Avg,',
+                       'GPRINT:s_max:MAX:%7.3lf%s Max,',
+                       'GPRINT:s_avg:LAST:%7.3lf%s Last'
+               ],
                traffic => ['DEF:out_min_raw={file}:outgoing:MIN',
                        'DEF:out_avg_raw={file}:outgoing:AVERAGE',
                        'DEF:out_max_raw={file}:outgoing:MAX',
@@ -945,6 +972,9 @@ our $GraphDefs;
        $GraphDefs->{'disk'} = $GraphDefs->{'partition'};
        $GraphDefs->{'meminfo'} = $GraphDefs->{'memory'};
        $GraphDefs->{'sensors'} = $GraphDefs->{'temperature'};
+
+       $GraphDefs->{'delay'}           = $GraphDefs->{'time_offset'};
+       $GraphDefs->{'time_dispersion'} = $GraphDefs->{'time_offset'};
 }
 
 our $GraphArgs =
@@ -957,9 +987,11 @@ our $GraphArgs =
        cpufreq => ['-t', '{host} cpu{inst} usage', '-v', 'Mhz'],
        current => ['-t', '{host} current', '-v', 'Ampere'],
        #disk => ['-t', '{host} disk {inst} IO wait', '-v', 'Seconds'],
+       delay => ['-t', 'NTPd peer delay ({inst})', '-v', 'Seconds'],
        df => ['-t', '{host}:{inst} usage', '-v', 'Percent', '-l', '0'],
        disk => ['-t', '{host} disk {inst} usage', '-v', 'Byte/s'],
        fanspeed => ['-t', '{host} fanspeed {inst}', '-v', 'rpm'],
+       frequency_offset => ['-t', 'NTPd frequency offset ({inst})', '-v', 'Parts per million'],
        hddtemp => ['-t', '{host} hdd temperature {inst}', '-v', '°Celsius'],
        load => ['-t', '{host} load average', '-v', 'System load', '-X', '0'],
        mails   => ['-t', '{host} mail count', '-v', 'Amount', '-X', '0'],
@@ -975,6 +1007,8 @@ our $GraphArgs =
        sensors => ['-t', '{host} sensor {inst}', '-v', '°Celsius'],
        swap => ['-t', '{host} swap usage', '-v', 'Bytes', '-b', '1024', '-l', '0'],
        temperature => ['-t', '{host} temperature {inst}', '-v', '°Celsius'],
+       time_offset => ['-t', 'NTPd time offset ({inst})', '-v', 'Seconds'],
+       time_dispersion => ['-t', 'NTPd time dispersion ({inst})', '-v', 'Seconds'],
        traffic => ['-t', '{host} {inst} traffic', '-v', 'Bit/s'],
        users => ['-t', '{host} users', '-v', 'Users'],
        voltage => ['-t', '{host} voltage', '-v', 'Volts'],