24 #ifndef _PLUGINS_RRD_ASPECT_RRD_DESCRIPTIONS_H_ 25 #define _PLUGINS_RRD_ASPECT_RRD_DESCRIPTIONS_H_ 50 unsigned int heartbeat = 30,
94 return rpn_expression_;
100 unsigned int heartbeat_;
103 char * rpn_expression_;
105 mutable char *string_;
159 mutable char *string_;
166 std::vector<RRDDataSource> &ds,
167 unsigned int step_sec = 10,
168 bool recreate =
false);
171 std::vector<RRDDataSource> &ds,
172 std::vector<RRDArchive> & rra,
173 unsigned int step_sec = 10,
174 bool recreate =
false);
203 const std::vector<RRDDataSource> &
217 const std::vector<RRDArchive> &
233 unsigned int step_sec_;
235 std::vector<RRDDataSource> ds_;
236 std::vector<RRDArchive> rra_;
248 const char * ds_name = NULL);
278 return rpn_expression_;
291 char * rpn_expression_;
294 mutable char *string_;
348 mutable char *string_;
358 bool stacked =
false);
410 mutable char *string_;
416 RRDGraphArea(
const char *def_name,
const char *color,
const char *legend,
bool stacked =
false);
461 mutable char *string_;
470 const char * vertical_label,
471 std::vector<RRDGraphDataDefinition> &def,
472 std::vector<RRDGraphElement *> & elements,
475 unsigned int step = 10,
476 unsigned int update_interval = 10,
477 bool slope_mode =
false);
482 const char **
get_argv(
size_t &argc)
const;
524 return vertical_label_;
530 return update_interval_;
539 const std::vector<RRDGraphDataDefinition> &
545 const std::vector<RRDGraphElement *> &
557 const std::vector<const char *>
576 char * vertical_label_;
577 const unsigned int update_interval_;
578 const bool slope_mode_;
579 std::vector<RRDGraphDataDefinition> defs_;
580 std::vector<RRDGraphElement *> elements_;
586 std::vector<const char *> fonts_;
588 mutable size_t argc_;
589 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.
RRDGraphDefinition(const char *name, RRDDefinition *rrd_def, const char *title, const char *vertical_label, std::vector< RRDGraphDataDefinition > &def, std::vector< RRDGraphElement * > &elements, time_t start=-600, time_t end=-10, unsigned int step=10, unsigned int update_interval=10, bool slope_mode=false)
Constructor.
virtual RRDGraphElement * clone() const
Clone this element.
const char * get_name() const
Get name.
virtual const char * to_string() const
Create string representation.
unsigned int get_width() const
Get line width.
const std::vector< const char * > get_fonts() const
Get fonts.
virtual const char * to_string() const
Create string representation.
Interface for a RRD connection creator.
Type get_type() const
Get type.
const char * get_name() const
Get graph definition name.
RRDGraphLine & operator=(const RRDGraphLine &g)
Assignment operator.
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.
const char * to_string() const
Get string representation.
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.
RRDGraphArea & operator=(const RRDGraphArea &g)
Assignment operator.
void set_filename(const char *filename)
Set filename.
float get_xff() const
Get xfiles factor.
const std::vector< RRDDataSource > & get_ds() const
Get data sources.
const char * get_ds_name() const
Get data source name.
static const char * cf_to_string(ConsolidationFunction cf)
Convert consolidation function type to string.
const char * get_legend() const
Get legend label.
~RRDGraphDefinition()
Destructor.
unsigned int get_rows() const
Get number of rows.
time_t get_end() const
Get end time.
RRDGraphGPrint(const char *def_name, RRDArchive::ConsolidationFunction cf, const char *format)
Constructor.
unsigned int get_heartbeat() const
Get heartbeat.
RRDGraphArea(const char *def_name, const char *color, const char *legend, bool stacked=false)
Constructor.
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.
unsigned int get_update_interval() const
Get update interval.
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.
~RRDGraphDataDefinition()
Destructor.
const char * get_def_name() const
Get definition name.
~RRDDefinition()
Destructor.
const std::vector< RRDGraphDataDefinition > & get_defs() const
Get definitions.
Class representing a graph definition.
void set_filename(const char *filename)
Set filename.
const std::vector< RRDArchive > & get_rra() const
Get RRD archives.
RRDDataSource & operator=(const RRDDataSource &other)
Assignment operator.
Class to represent a RRD data source.
virtual const char * to_string() const
Create string representation.
const char * to_string() const
Create string representation.
RRDGraphDataDefinition(const char *name, RRDArchive::ConsolidationFunction cf, const RRDDefinition *rrd_def, const char *ds_name=NULL)
DEF constructor.
const RRDDataSource & get_ds(size_t i) const
Get specific data source.
RRDDefinition(const char *name, std::vector< RRDDataSource > &ds, unsigned int step_sec=10, bool recreate=false)
Constructor with default RRAs.
virtual ~RRDGraphLine()
Destructor.
RRDArchive & operator=(const RRDArchive &rra)
Assignment operator.
const char ** get_argv(size_t &argc) const
Get argument array and size.
bool get_slope_mode() const
Get slope moe.
virtual RRDGraphElement * clone() const
Clone this element.
time_t get_start() const
Get start time.
virtual const char * to_string() const
Create string representation.
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.
size_t find_ds_index(const char *ds_name) const
Find data source index.
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.
RRDArchive(ConsolidationFunction cf, float xff, unsigned int steps, unsigned int rows)
Constructor.
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.
RRDGraphGPrint & operator=(const RRDGraphGPrint &g)
Assignment operator.
RRDDefinition & operator=(const RRDDefinition &other)
Assignment operator.
virtual RRDGraphElement * clone() const =0
Clone this element.
virtual ~RRDGraphArea()
Destructor.
Last value consolidation function.
Minimum consolidation function.
RRDGraphLine(const char *def_name, float width, const char *color, const char *legend, bool stacked=false)
Constructor.
const char * get_color() const
Get color string.
static const std::vector< RRDArchive > get_default_rra()
Get default RRAs.
bool get_recreate() const
Check recreation flag.
RRDGraphDataDefinition & operator=(const RRDGraphDataDefinition &rra)
Assignment operator.
void set_rrd_manager(RRDManager *rrd_manager)
Set RRD manager.
Averaging consolidation function.
virtual ~RRDGraphGPrint()
Destructor.