Add creation and destruction of monitors

Monitors can now be created and destroyed at runtime. The configurations
for new monitors are persisted to disk.
This commit is contained in:
Markus Makela
2016-11-28 16:30:11 +02:00
parent 4ff4e69592
commit 07c602d81c
4 changed files with 171 additions and 3 deletions

View File

@ -157,3 +157,23 @@ bool runtime_create_listener(SERVICE *service, const char *name, const char *add
* @return True if the listener was successfully destroyed
*/
bool runtime_destroy_listener(SERVICE *service, const char *name);
/**
* @brief Create a new monitor
*
* @param name Name of the monitor
* @param module Monitor module
* @return True if new monitor was created and persisted
*/
bool runtime_create_monitor(const char *name, const char *module);
/**
* @brief Destroy a monitor
*
* Monitors are not removed from the runtime configuration but they are stopped.
* Destroyed monitor are removed after a restart.
*
* @param monitor Monitor to destroy
* @return True if monitor was destroyed
*/
bool runtime_destroy_monitor(MONITOR *monitor);