Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
External API - Force Alert
#1
I have a situation where I need to ‘force’ an agent alert using the external API. Searching through the API documentation, there is not that capability in the API Library. Is this capability planned in an upcoming release? If not, are there any recommendations for how to proceed?

This is for a very simple web page I am developing for non-Pandora users to force a specific agent’s alert.
 Reply
#2
Hello,

Yes, in "tree_agents" option, there is an option called "alert_force_execution". Link attached documentation:

http://wiki.pandorafms.com/index.php?tit...ree_agents

Regards,

Sergio
 Reply
#3
Hi Sergio, I find the API tree_agents is a get operation that provides the alert_force_execution value for that module's alert. It does not perform the force alert. What I find is, under normal operation when none of the alerts are being fired/forced, the alert_force_execution value is 0.

For example, this call:
Code:
http://127.0.0.1/pandora_console/include/api.php?op=get&op2=tree_agents&return_type=csv&other=;|%20|type_row,agent_name,agent_disabled,module_id_agent_modulo,module_id_agent,module_name,alert_id_agent_module,alert_id_alert_template,alert_type,alert_last_fired,alert_force_execution&other_mode=url_encode_separator_|&apipass=1234&user=admin&pass=pandora

returns:
...
agent;DIO2;0;;;;;;;;
module;;;289;58;Channel 1;;;;;
alert;;;;;;289;4;critical;1421255908;0
alert;;;;;;289;6;warning;0;0
alert;;;;;;289;16;max_min;1421255909;0
...

Do you have any other suggestions on how to force alert execution through the API?


 Reply
#4
Hello,

if that does not force the execution can not be performed. We will talk with the development department to add it as a new feature.

Regards,

Sergio
 Reply


Users browsing this thread: 1 Guest(s)


(c) 2006-2018 Artica Soluciones Tecnológicas. Contents of this wiki are under Create Common Attribution v3 licence. | pandorafms.com | pandorafms.org

Theme © MyBB Themes