44 : m_slow_query_log(slow_query_log) {
82 HT_INFOF(
"Problem publishing Ganglia metrics - %s", e.what());
88 m_slow_query_log->sync();
95 HT_FATALF(
"Unrecognized event - %s", event->to_str().c_str());
static Comm * instance()
Creates/returns singleton instance of the Comm class.
MetricsHandler(PropertiesPtr &props)
Constructor.
Program options handling.
std::shared_ptr< Event > EventPtr
Smart pointer to Event.
void start_collecting()
Starts metrics collection.
interval_metric< int64_t > m_requests
Hyperspace requests
Declarations for MetricsHandler.
int64_t m_last_timestamp
Timestamp of last metrics collection
const char * get_text(int error)
Returns a descriptive error message.
std::shared_ptr< Properties > PropertiesPtr
Logging routines and macros.
Compatibility Macros for C/C++.
void stop_collecting()
Stops metrics collection.
int32_t m_collection_interval
Metrics collection interval
#define HT_FATALF(msg,...)
virtual void handle(EventPtr &event)
Collects and publishes metrics.
#define HT_INFOF(msg,...)
This is a generic exception class for Hypertable.
void collect(int64_t now, MetricsCollector *collector) override
Collects process metrics.
int set_timer(uint32_t duration_millis, const DispatchHandlerPtr &handler)
Sets a timer for duration_millis milliseconds in the future.
void cancel_timer(const DispatchHandlerPtr &handler)
Cancels all scheduled timers registered with the dispatch handler handler.
MetricsCollectorGangliaPtr m_ganglia_collector
Ganglia metrics collector.
Error codes, Exception handling, error logging.
MetricsProcess m_metrics_process
General process metrics tracker.
int64_t get_ts64()
Returns the current time in nanoseconds as a 64bit number.