Fawkes API
Fawkes Development Version
|
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_;
307 class RRDGraphGPrint :
public RRDGraphElement
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_;
size_t find_ds_index(const char *ds_name) const
Find data source index.
void set_filename(const char *filename)
Set filename.
const char * get_filename() const
Get filename.
RRDGraphGPrint(const char *def_name, RRDArchive::ConsolidationFunction cf, const char *format)
Constructor.
const char * get_legend() const
Get legend label.
~RRDGraphDefinition()
Destructor.
Type get_type() const
Get type.
virtual RRDGraphElement * clone() const
Minimum consolidation function.
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.
const char * get_format() const
Get format string.
virtual ~RRDGraphLine()
Destructor.
const char * get_def_name() const
Get definition name.
Maximum consolidation function.
float get_min() const
Get minimum.
static const char * cf_to_string(ConsolidationFunction cf)
Convert consolidation function type to string.
const std::vector< RRDGraphElement * > & get_elements() const
Get graph elements.
const char * get_name() const
Get name.
time_t get_start() const
Get start time.
virtual const char * to_string() const
Create string representation.
const char * get_ds_name() const
Get data source name.
unsigned int get_rows() const
Get number of rows.
const char * get_vertical_label() const
Get vertical label.
unsigned int get_step_sec() const
Get step size in sec.
RRDArchive & operator=(const RRDArchive &rra)
Assignment operator.
RRDArchive::ConsolidationFunction get_cf() const
Get consolidation function type.
RRDGraphLine(const char *def_name, float width, const char *color, const char *legend, bool stacked=false)
Constructor.
const char * get_def_name() const
Get definition name.
float get_xff() const
Get xfiles factor.
const char * get_rpn_expression() const
Get RPN expression.
const std::vector< RRDArchive > & get_rra() const
Get RRD archives.
float get_max() const
Get maximum.
virtual const char * to_string() const
Create string representation.
virtual const char * to_string() const
Create string representation.
const char * to_string() const
Get string reprensetation.
RRDDefinition(const char *name, std::vector< RRDDataSource > &ds, unsigned int step_sec=10, bool recreate=false)
Constructor with default RRAs.
const char * to_string() const
Get string representation.
const char ** get_argv(size_t &argc) const
Get argument array and size.
const RRDDefinition * get_rrd_def() const
Get RRD definition.
const RRDDefinition * get_rrd_def() const
Get RRD definition.
virtual RRDGraphElement * clone() const
ConsolidationFunction
Consolidation function type.
const char * to_string() const
Create string representation.
const char * get_color() const
Get color string.
const std::vector< RRDDataSource > & get_ds() const
Get data sources.
bool get_slope_mode() const
Get slope moe.
RRDDataSource & operator=(const RRDDataSource &other)
Assignment operator.
unsigned int get_heartbeat() const
Get heartbeat.
const char * get_filename() const
Get file name.
unsigned int get_width() const
Get line width.
virtual RRDGraphElement * clone() const
virtual RRDGraphElement * clone() const =0
ConsolidationFunction get_cf() const
Get consolidation function type.
RRDGraphGPrint & operator=(const RRDGraphGPrint &g)
Assignment operator.
virtual ~RRDGraphArea()
Destructor.
bool get_stacked() const
Get stacked flag.
unsigned int get_update_interval() const
Get update interval.
const char * get_name() const
Get name.
RRDGraphLine & operator=(const RRDGraphLine &g)
Assignment operator.
const char * get_name() const
Get name.
RRDDefinition & operator=(const RRDDefinition &other)
Assignment operator.
const std::vector< const char * > get_fonts() const
Get fonts.
~RRDGraphDataDefinition()
Destructor.
time_t get_end() const
Get end time.
unsigned int get_step() const
Get step size.
bool get_recreate() const
Check recreation flag.
RRDArchive(ConsolidationFunction cf, float xff, unsigned int steps, unsigned int rows)
Constructor.
float get_width() const
Get line width.
const char * get_color() const
Get color string.
const char * get_name() const
Get graph definition name.
~RRDDefinition()
Destructor.
static const std::vector< RRDArchive > get_default_rra()
Get default RRAs.
bool get_stacked() const
Get stacked flag.
~RRDDataSource()
Destructor.
void set_rrd_manager(RRDManager *rrd_manager)
Set RRD manager.
Averaging consolidation function.
RRDGraphArea(const char *def_name, const char *color, const char *legend, bool stacked=false)
Constructor.
const char * get_rpn_expression() const
Get RPN expression.
virtual ~RRDGraphGPrint()
Destructor.
RRDGraphDataDefinition & operator=(const RRDGraphDataDefinition &rra)
Assignment operator.
unsigned int get_steps() const
Get number of steps.
virtual const char * to_string() const
Create string representation.
static const float UNKNOWN
Use for unknown min or max values.
const std::vector< RRDGraphDataDefinition > & get_defs() const
Get definitions.
const char * get_title() const
Get title.
Last value consolidation function.
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.
void set_filename(const char *filename)
Set filename.
RRDGraphArea & operator=(const RRDGraphArea &g)
Assignment operator.
const char * get_legend() const
Get legend label.
RRDArchive::ConsolidationFunction get_cf() const
Get consolidation function type.
RRDGraphDataDefinition(const char *name, RRDArchive::ConsolidationFunction cf, const RRDDefinition *rrd_def, const char *ds_name=NULL)
DEF constructor.