Changeset ed271b26d31bd852807033fd23086db565b6106b

Show
Ignore:
Timestamp:
06/06/12 02:32:52 (2 years ago)
Author:
Theo Schlossnagle <jesus@omniti.com>
git-committer:
Theo Schlossnagle <jesus@omniti.com> 1338949972 -0400
git-parent:

[0563c1f93ab7120a09d4fb008a0f640ddd29c18d]

git-author:
Theo Schlossnagle <jesus@omniti.com> 1338949972 -0400
Message:

make 'offset' metric consistent.

offset in 'ntp' is seconds, offset in 'ntp control' is milliseconds.
so as to reduce confusion, provide both offset and offset_ms so that
we're clear and people relying on a specific unit don't have their
hopes dashed.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/modules-lua/noit/module/ntp.lua

    r9a579d2 red271b2  
    339339    check.metric_uint32('poll', poll) 
    340340    check.metric_double('delay', tonumber(vars.delay)) 
    341     check.metric_double('offset', tonumber(vars.offset)) 
     341    check.metric_double('offset', tonumber(vars.offset) / 1000) 
     342    check.metric_double('offset_ms', tonumber(vars.offset)) 
    342343    check.metric_double('jitter', tonumber(vars.jitter)) 
    343344    check.metric_double('dispersion', tonumber(vars.dispersion)) 
     
    391392    if # status.offset > 0 then 
    392393        check.metric_double('offset', status.avg_offset) 
     394        check.metric_double('offset_ms', status.avg_offset * 1000.0) 
    393395        check.metric_uint32('requests', cnt) 
    394396        check.metric_uint32('responses', status.responses) 
  • src/noit.conf.in

    rc060617 red271b2  
    7373    <module loader="lua" name="resmon" object="noit.module.resmon"/> 
    7474    <module loader="lua" name="smtp" object="noit.module.smtp"/> 
     75    <module loader="lua" name="ntp" object="noit.module.ntp"/> 
    7576    <jezebel> 
    7677      <config><url>http://127.0.0.1:8083/dispatch</url></config>