24 #ifndef __PLUGINS_RRD_ASPECT_RRD_DESCRIPTIONS_H_ 25 #define __PLUGINS_RRD_ASPECT_RRD_DESCRIPTIONS_H_ 51 RRDDataSource(
const char *name, Type type,
unsigned int heartbeat = 30,
52 float min = 0,
float max = UNKNOWN);
62 const char *
get_name()
const {
return __name; };
78 unsigned int __heartbeat;
81 char *__rpn_expression;
83 mutable char * __string;
98 float xff,
unsigned int steps,
unsigned int rows);
103 static const char * cf_to_string(ConsolidationFunction cf);
108 ConsolidationFunction
get_cf()
const {
return __cf; }
117 ConsolidationFunction __cf;
119 unsigned int __steps;
122 mutable char *__string;
129 std::vector<RRDDataSource> &ds,
130 unsigned int step_sec = 10,
bool recreate =
false);
133 std::vector<RRDDataSource> &ds,
134 std::vector<RRDArchive> &rra,
135 unsigned int step_sec = 10,
bool recreate =
false);
140 size_t find_ds_index(
const char *ds_name)
const;
141 void set_filename(
const char *filename);
142 static const std::vector<RRDArchive> get_default_rra();
152 const std::vector<RRDDataSource> &
get_ds()
const {
return __ds; }
158 const std::vector<RRDArchive> &
get_rra()
const {
return __rra; }
162 void set_rrd_manager(
RRDManager *rrd_manager);
166 unsigned int __step_sec;
168 std::vector<RRDDataSource> __ds;
169 std::vector<RRDArchive> __rra;
202 char *__rpn_expression;
205 mutable char *__string;
243 mutable char *__string;
249 RRDGraphLine(
const char *def_name,
float width,
const char *color,
250 const char *legend,
bool stacked =
false);
278 mutable char *__string;
285 const char *legend,
bool stacked =
false);
310 mutable char *__string;
317 const char *title,
const char *vertical_label,
318 std::vector<RRDGraphDataDefinition> &def,
319 std::vector<RRDGraphElement *> &elements,
320 time_t start = -600, time_t end = -10,
unsigned int step = 10,
321 unsigned int update_interval = 10,
bool slope_mode =
false);
325 void set_filename(
const char *filename);
326 const char ** get_argv(
size_t &argc)
const;
348 const std::vector<RRDGraphDataDefinition> &
get_defs()
const {
return __defs; }
351 {
return __elements; }
355 const std::vector<const char *>
get_fonts()
const {
return __fonts; }
362 const time_t __start;
366 char *__vertical_label;
367 const unsigned int __update_interval;
368 const bool __slope_mode;
369 std::vector<RRDGraphDataDefinition> __defs;
370 std::vector<RRDGraphElement *> __elements;
371 unsigned int __width;
376 std::vector<const char *> __fonts;
378 mutable size_t __argc;
379 mutable const char **__argv;
static const float UNKNOWN
Use for unknown min or max values.
RRDArchive::ConsolidationFunction get_cf() const
Get consolidation function type.
const char * get_title() const
Get title.
virtual RRDGraphElement * clone() const
Clone this element.
const char * get_name() const
Get name.
unsigned int get_width() const
Get line width.
const std::vector< const char * > get_fonts() const
Get fonts.
Interface for a RRD connection creator.
Type get_type() const
Get type.
const char * get_name() const
Get graph definition name.
Fawkes library namespace.
unsigned int get_steps() const
Get number of steps.
const char * to_string() const
Get string reprensetation.
float get_width() const
Get line width.
const char * get_filename() const
Get filename.
unsigned int get_step() const
Get step size.
Maximum consolidation function.
float get_min() const
Get minimum.
const RRDDefinition * get_rrd_def() const
Get RRD definition.
RRDDataSource(const char *name, Type type, unsigned int heartbeat=30, float min=0, float max=UNKNOWN)
Constructor for regular data source.
const char * get_def_name() const
Get definition name.
float get_xff() const
Get xfiles factor.
const unsigned int get_update_interval() const
Get update interval.
const std::vector< RRDDataSource > & get_ds() const
Get data sources.
const char * get_ds_name() const
Get data source name.
const char * get_legend() const
Get legend label.
unsigned int get_rows() const
Get number of rows.
time_t get_end() const
Get end time.
unsigned int get_heartbeat() const
Get heartbeat.
const char * get_color() const
Get color string.
ConsolidationFunction
Consolidation function type.
const char * get_rpn_expression() const
Get RPN expression.
unsigned int get_step_sec() const
Get step size in sec.
bool get_stacked() const
Get stacked flag.
const bool get_slope_mode() const
Get slope moe.
const char * get_rpn_expression() const
Get RPN expression.
const std::vector< RRDGraphElement * > & get_elements() const
Get graph elements.
float get_max() const
Get maximum.
const char * get_legend() const
Get legend label.
Represent data definition in graph arguments.
const char * get_def_name() const
Get definition name.
const std::vector< RRDGraphDataDefinition > & get_defs() const
Get definitions.
Class representing a graph definition.
const std::vector< RRDArchive > & get_rra() const
Get RRD archives.
RRDDataSource & operator=(const RRDDataSource &other)
Assignment operator.
Class to represent a RRD data source.
const RRDDataSource & get_ds(size_t i) const
Get specific data source.
virtual RRDGraphElement * clone() const
Clone this element.
time_t get_start() const
Get start time.
const char * get_vertical_label() const
Get vertical label.
const RRDDefinition * get_rrd_def() const
Get RRD definition.
bool get_stacked() const
Get stacked flag.
const char * get_name() const
Get name.
const char * get_def_name() const
Get definition name.
const char * get_name() const
Get name.
const char * get_filename() const
Get file name.
Interface for graph elements.
virtual RRDGraphElement * clone() const
Clone this element.
ConsolidationFunction get_cf() const
Get consolidation function type.
RRDArchive::ConsolidationFunction get_cf() const
Get consolidation function type.
const char * get_format() const
Get format string.
Print string inside graph.
~RRDDataSource()
Destructor.
Minimum consolidation function.
const char * get_color() const
Get color string.
bool get_recreate() const
Check recreation flag.
Averaging consolidation function.