2006-06-13 21:34:36 +02:00
|
|
|
#ifndef _PLUGINS_H_
|
|
|
|
#define _PLUGINS_H_
|
|
|
|
|
2007-03-31 23:21:31 +02:00
|
|
|
#include <time.h>
|
|
|
|
|
2006-06-13 21:34:36 +02:00
|
|
|
#include "list.h"
|
|
|
|
#include "logging.h"
|
|
|
|
|
2006-09-30 20:27:56 +02:00
|
|
|
#define PLUGIN_RRD 0x01
|
|
|
|
#define PLUGIN_NET 0x02
|
|
|
|
|
2006-06-13 21:34:36 +02:00
|
|
|
struct sammler_plugin {
|
|
|
|
struct list_head list;
|
2007-03-31 22:31:07 +02:00
|
|
|
const char *name;
|
2007-03-31 23:21:31 +02:00
|
|
|
|
|
|
|
/* timing */
|
2006-09-30 17:10:32 +02:00
|
|
|
unsigned int interval;
|
2007-03-31 23:21:31 +02:00
|
|
|
time_t lastprobe;
|
|
|
|
|
|
|
|
/* scratchpad memory */
|
|
|
|
int bufsize;
|
|
|
|
char *buffer;
|
|
|
|
|
2006-10-07 20:37:30 +02:00
|
|
|
int (*init) (void);
|
|
|
|
int (*fini) (void);
|
|
|
|
int (*probe) (void);
|
2007-03-31 22:31:07 +02:00
|
|
|
const char * (*get_ds) (int ds_id);
|
2006-06-13 21:34:36 +02:00
|
|
|
};
|
|
|
|
|
2007-03-31 23:21:31 +02:00
|
|
|
int plugin_init(int flags);
|
2006-06-13 21:34:36 +02:00
|
|
|
|
|
|
|
void plugins_probe(void);
|
|
|
|
|
2007-03-31 22:31:07 +02:00
|
|
|
struct sammler_plugin * plugin_lookup(const char *name);
|
2006-06-13 21:34:36 +02:00
|
|
|
|
2007-03-31 22:31:07 +02:00
|
|
|
int probe_submit(struct sammler_plugin *plugin, const char *filename, int ds_id, const char *fmt, ... );
|
2006-06-13 21:34:36 +02:00
|
|
|
|
|
|
|
#endif /* _PLUGINS_H_ */
|