Ignore:
Timestamp:
03/26/13 15:55:23 (11 years ago)
Author:
ramonb
Message:
  • minor optimization
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/0.4/web/addons/job_monarch/libtoga.php

    r751 r752  
    749749            $metrics[$hostname]['gmond_started']['TYPE'] = "timestamp";
    750750            $metrics[$hostname]['last_reported']['NAME'] = "REPORTED";
    751             $metrics[$hostname]['last_reported']['VAL'] = uptime($cluster['LOCALTIME'] - $attrs['REPORTED']);
     751            $metrics[$hostname]['last_reported']['VAL'] = $attrs['REPORTED'];
    752752            $metrics[$hostname]['last_reported']['TYPE'] = "string";
    753753            $metrics[$hostname]['last_reported_timestamp']['NAME'] = "REPORTED TIMESTAMP";
     
    926926                            $domain_len    = 0 - strlen( $domain );
    927927
    928                             $nodekeys     = array_keys( $this->nodes );
    929 
    930                             $first_host    = $nodekeys[0];
     928                            $first_host    = key( array_slice($this->nodes, 0, 1, true) );
     929
    931930                            // Let's see if Ganglia use's FQDN or short hostnames
    932931                            //
Note: See TracChangeset for help on using the changeset viewer.