Added a function to test the connection to the event replication DB.

This commit is contained in:
Ramon Novoa 2014-09-30 16:14:18 +02:00
parent 67c2c92ab8
commit 07b5480732
1 changed files with 11 additions and 0 deletions

View File

@ -30,6 +30,7 @@ include_once($config['homedir'] . "/include/functions_network_components.php");
include_once($config['homedir'] . "/include/functions_netflow.php");
include_once($config['homedir'] . "/include/functions_servers.php");
enterprise_include_once ('include/functions_local_components.php');
enterprise_include_once ('include/functions_events.php');
/**
* Parse the "other" parameter.
@ -206,6 +207,16 @@ function api_get_test() {
echo "OK,$pandora_version,$build_version";
}
// Returs the string OK if a connection to the event replication DB can be established.
function api_get_test_event_replication_db() {
$status = enterprise_hook('events_test_replication_db', array());
if ($status === ENTERPRISE_NOT_HOOK) {
echo 'ERR';
return;
}
echo $status;
}
//-------------------------DEFINED OPERATIONS FUNCTIONS-----------------
function api_get_groups($thrash1, $thrash2, $other, $returnType, $user_in_db) {
if ($other['type'] == 'string') {