anchor.diff:          _            -> throw(metric_not_available)
       end.
   
  --spec get_request_metric() -> ok.
  +-spec get_request_metric() -> number().
   get_request_metric() ->
       Metric = config:read(lb_active_request_metric),
       Value = case get_request_metric(Metric) of
                   unknown -> 0;
  -                Val -> Val
  +                Val -> erlang:round(Val)
               end,
       io:format("Requests: ~p~n", [Value]),
       Value.
   
  --spec get_request_metric(request_metric()) -> ok.
  +-spec get_request_metric(request_metric()) -> unknown | number().
   get_request_metric(Metric) ->
       get_request_metric(Metric, normal).
   
  --spec get_request_metric(request_metric(), normal | strict) -> ok.
  +-spec get_request_metric(request_metric(), normal | strict) -> unknown | number().
   get_request_metric(Metric, Mode) ->
       case Metric of
  -        db_reads -> get_dht_metric({lb_active, db_reads}, Mode);
  -        db_writes -> get_dht_metric({lb_active, db_writes}, Mode)
  +        db_reads -> get_dht_metric(db_reads, Mode);
  +        db_writes -> get_dht_metric(db_writes, Mode)
           %db_requests  -> get_request_metric(db_reads, Mode) +
           %                get_request_metric(db_writes, Mode); %% TODO
       end.
   
  --spec get_vm_metric(load_metric() | request_metric(), normal | strict) -> unknown | number().
  +-spec get_vm_metric(load_metric(), normal | strict) -> unknown | number().
   get_vm_metric(Metric, Mode) ->
       ClientMonitorPid = pid_groups:pid_of("clients_group", monitor),
       get_metric(ClientMonitorPid, Metric, Mode).
   
  +-spec get_dht_metric(load_metric() | request_metric(), normal | strict) -> unknown | number().
   get_dht_metric(Metric, Mode) ->
       MonitorPid = pid_groups:get_my(monitor),
       get_metric(MonitorPid, Metric, Mode).
   
   -spec get_metric(pid(), monitor:table_index(), normal | strict) -> unknown | number().
   get_metric(MonitorPid, Metric, Mode) ->
  -    [{_Process, _Key, RRD}] = monitor:get_rrds(MonitorPid, [Metric]),
  +    [{_Process, _Key, RRD}] = monitor:get_rrds(MonitorPid, [{lb_active, Metric}]),
       case RRD of
           undefined ->
               unknown;
  
positive.code: get_load_metric() ->
      Metric = config:read(lb_active_load_metric),
      Value = case get_load_metric(Metric) of
                  unknown -> 0;
                  Val -> Val
              end,
      io:format("Load: ~p~n", [Value]),
      Value. %%TODO
  
  -spec get_load_metric(load_metric()) -> items | number(). %% unknwon shouldn't happen here, in theory it can TODO
  get_load_metric(Metric) ->
      get_load_metric(Metric, normal).
  
  -spec get_load_metric(load_metric(), normal | strict) -> unknown | items | number().
  get_load_metric(Metric, Mode) ->
      case Metric of
          cpu          -> get_vm_metric({lb_active, cpu}, Mode) / 100;
          mem          -> get_vm_metric({lb_active, mem}, Mode) / 100;
          %net_latency  ->
          %net_bandwith ->
          %tx_latency   -> get_dht_metric({api_tx, req_list}, avg, Mode);
  
negative.code:     erlang:put(last_db_monitor_init, os:timestamp()), %% TODO ugly
      case collect_stats() of
          true ->
              _ = application:start(sasl),   %% required by os_mon.
              _ = application:start(os_mon), %% for monitoring cpu and memory usage.
              trigger(collect_stats);
          _ -> ok
      end,
  