MySQL 26.10.0
Source Code Documentation
health_monitor_triggered_reporter.h
Go to the documentation of this file.
1/* Copyright (c) 2023, 2026, Oracle and/or its affiliates.
2
3This program is free software; you can redistribute it and/or modify
4it under the terms of the GNU General Public License, version 2.0,
5as published by the Free Software Foundation.
6
7This program is designed to work with certain software (including
8but not limited to OpenSSL) that is licensed under separate terms,
9as designated in a particular file or component or in included license
10documentation. The authors of MySQL hereby grant you an additional
11permission to link the program and your derivative works with the
12separately licensed software that they have either included with
13the program or referenced in the documentation.
14
15This program is distributed in the hope that it will be useful,
16but WITHOUT ANY WARRANTY; without even the implied warranty of
17MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18GNU General Public License, version 2.0, for more details.
19
20You should have received a copy of the GNU General Public License
21along with this program; if not, write to the Free Software
22Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
23
24#pragma once
25
28
29namespace hm {
30
31/**
32 The Triggered_Reporter overrides run_process to react only to signals.
33 When signaled, the Triggered_Reporter will issue the report according
34 to the definition.
35 */
37 public:
38 Triggered_Reporter(const char *reporter_name, const char *status_name,
39 const char *instr_name, const char *os_name,
40 const char *description, sv_bool *sysvar_running,
41 sv_char *sysvar_def);
42 void run_process() override;
43 void issue_report() override;
44 // Default definition of the report triggered when approaching OOM.
45 static const char *default_memory_report;
46};
47
48} // namespace hm
The Periodic_Reporter has a framework for printing reports to some destination.
Definition: health_monitor_periodic_reporter.h:44
The Triggered_Reporter overrides run_process to react only to signals.
Definition: health_monitor_triggered_reporter.h:36
Triggered_Reporter(const char *reporter_name, const char *status_name, const char *instr_name, const char *os_name, const char *description, sv_bool *sysvar_running, sv_char *sysvar_def)
Definition: health_monitor_triggered_reporter.cc:44
void issue_report() override
Run the set of queries defined by the config settings and print results.
Definition: health_monitor_triggered_reporter.cc:79
void run_process() override
Thread process loop: Wait for signal then run reports.
Definition: health_monitor_triggered_reporter.cc:55
static const char * default_memory_report
Definition: health_monitor_triggered_reporter.h:45
Definition: component_command.h:29