|
Monitoring System 0.1.0
System resource monitoring with pluggable collectors and alerting
|
Configuration for webhook notifier. More...
#include <alert_notifiers.h>

Public Member Functions | |
| webhook_config & | add_header (const std::string &key, const std::string &value) |
| Add a custom header. | |
| bool | validate () const |
| Validate configuration. | |
Public Attributes | |
| std::string | url |
| Webhook URL. | |
| std::string | method = "POST" |
| HTTP method. | |
| std::chrono::milliseconds | timeout {30000} |
| Request timeout. | |
| std::unordered_map< std::string, std::string > | headers |
| Custom headers. | |
| size_t | max_retries = 3 |
| Maximum retry attempts. | |
| std::chrono::milliseconds | retry_delay {1000} |
| Delay between retries. | |
| bool | send_resolved = true |
| Send resolved notifications. | |
| std::string | content_type = "application/json" |
| Content type header. | |
Configuration for webhook notifier.
Definition at line 37 of file alert_notifiers.h.
|
inline |
Add a custom header.
Definition at line 50 of file alert_notifiers.h.
References headers.
Referenced by main().

|
inline |
Validate configuration.
Definition at line 58 of file alert_notifiers.h.
Referenced by kcenon::monitoring::webhook_notifier::is_ready().

| std::string kcenon::monitoring::webhook_config::content_type = "application/json" |
Content type header.
Definition at line 45 of file alert_notifiers.h.
Referenced by main(), and kcenon::monitoring::webhook_notifier::send_with_retry().
| std::unordered_map<std::string, std::string> kcenon::monitoring::webhook_config::headers |
Custom headers.
Definition at line 41 of file alert_notifiers.h.
Referenced by add_header(), main(), and kcenon::monitoring::webhook_notifier::send_with_retry().
| size_t kcenon::monitoring::webhook_config::max_retries = 3 |
Maximum retry attempts.
Definition at line 42 of file alert_notifiers.h.
Referenced by main(), and kcenon::monitoring::webhook_notifier::send_with_retry().
| std::string kcenon::monitoring::webhook_config::method = "POST" |
HTTP method.
Definition at line 39 of file alert_notifiers.h.
Referenced by main(), and kcenon::monitoring::webhook_notifier::send_with_retry().
| std::chrono::milliseconds kcenon::monitoring::webhook_config::retry_delay {1000} |
Delay between retries.
Definition at line 43 of file alert_notifiers.h.
Referenced by main(), and kcenon::monitoring::webhook_notifier::send_with_retry().
| bool kcenon::monitoring::webhook_config::send_resolved = true |
Send resolved notifications.
Definition at line 44 of file alert_notifiers.h.
Referenced by main(), and kcenon::monitoring::webhook_notifier::notify().
| std::chrono::milliseconds kcenon::monitoring::webhook_config::timeout {30000} |
Request timeout.
Definition at line 40 of file alert_notifiers.h.
Referenced by main(), and validate().
| std::string kcenon::monitoring::webhook_config::url |
Webhook URL.
Definition at line 38 of file alert_notifiers.h.
Referenced by main(), kcenon::monitoring::webhook_notifier::name(), kcenon::monitoring::webhook_notifier::send_with_retry(), and validate().