mysql query for object status (with grafana)

Started by reez_q11, February 21, 2018, 10:36:37 AM

Previous topic - Next topic

reez_q11

hi,

i'm testing querying object status on database (mysql) with grafana. so i can put some dashboard on grafana. but seems the object status on the database isn't valid. i had already test it with 2 netxms server. do you know how i can read object status from database? what am i missing?

thx.


on console (valid):


on grafana query (not valid):


mysql query:

Quoteselect
   o.name,
   net.service_type,
   node.name as `node`,
   case
      when poller.name is null then "default (netxms server)"
      else poller.name
   end as `poller`,
   ip_port as `tcp port`,
   o.`status` as c
from object_properties o
   inner join network_services net on o.object_id = net.id
   inner join object_properties node on net.node_id = node.object_id
   left join object_properties poller on net.poller_node_id = poller.object_id
where
  o.`status` <> 6


Victor Kirhenshtein

Hi,

server only updates object_properties table when something persistent changes (like object name) and on shutdown (to save status and other runtime information). On large installations it removes a lot of unnecessary DB updates.

Best regards,
Victor