{"id":414,"date":"2017-12-13T14:39:20","date_gmt":"2017-12-13T14:39:20","guid":{"rendered":"https:\/\/pandorafms.com\/library\/?p=414"},"modified":"2017-12-13T14:50:35","modified_gmt":"2017-12-13T14:50:35","slug":"custom-sql-reporting","status":"publish","type":"post","link":"https:\/\/pandorafms.com\/library\/custom-sql-reporting\/","title":{"rendered":"Custom SQL Reporting"},"content":{"rendered":"<p class=\"description_pui\">This SQL is for report different information about the current monitoring:<\/p>\n<p>&#8211; List of currently configured agents, with its group and ip address.<br \/>\n&#8211; List of currently configured agents and modules.<br \/>\n&#8211; List of currently configured modules and alerts \/ actions.<\/p>\n<h2>Module data<\/h2>\n<p><strong>Monitoring Report Agent<\/strong><\/p>\n<pre>select direccion, nombre, comentarios, (select nombre from tgrupo where tgrupo.id_grupo = tagente.id_grupo) as `group` from tagente;<\/pre>\n<p><strong>Monitoring Report Modules<\/strong><\/p>\n<pre>select (select tagente.nombre from tagente where tagente.id_agente = tagente_modulo.id_agente) as agent_name, nombre , (select tmodule_group.name from tmodule_group where tmodule_group.id_mg = tagente_modulo.id_module_group) as module_group, module_interval from tagente_modulo where delete_pending = 0 order by agent_name;<\/pre>\n<p><strong>Monitoring Report Alerts<\/strong><\/p>\n<pre>select t1.nombre as agent_name, t2.nombre as module_name, (select talert_templates.name from talert_templates where talert_templates.id = t3.id_alert_template) as template, (select group_concat(t02.name) from talert_template_module_actions as t01 inner join talert_actions as t02 on t01.id_alert_action = t02.id where t01.id_alert_template_module = t3.id group by t01.id_alert_template_module) as actions from tagente as t1 inner join tagente_modulo as t2 on t1.id_agente = t2.id_agente inner join talert_template_modules as t3 on t2.id_agente_modulo = t3.id_agent_module order by agent_name, module_name;<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>This SQL is for report different information about the current monitoring: &#8211; List of currently configured agents, with its group and ip address. &#8211; List of currently configured agents and modules. &#8211; List of currently configured modules and alerts \/ actions. Module data Monitoring Report Agent select direccion, nombre, comentarios, (select nombre from tgrupo where [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"categories":[4],"tags":[81],"_links":{"self":[{"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/posts\/414"}],"collection":[{"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/comments?post=414"}],"version-history":[{"count":0,"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/posts\/414\/revisions"}],"wp:attachment":[{"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/media?parent=414"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/categories?post=414"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/tags?post=414"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}