32 lines
631 B
C
32 lines
631 B
C
#ifndef _PLUGINS_H_
|
|
#define _PLUGINS_H_
|
|
|
|
#include "list.h"
|
|
#include "logging.h"
|
|
|
|
#define PLUGIN_RRD 0x01
|
|
#define PLUGIN_NET 0x02
|
|
|
|
struct sammler_plugin {
|
|
struct list_head list;
|
|
char *name;
|
|
unsigned int interval;
|
|
unsigned long lastprobe;
|
|
int (*init) (void);
|
|
int (*fini) (void);
|
|
int (*probe) (void);
|
|
char * (*get_ds) (int ds_id);
|
|
};
|
|
|
|
void plugin_init(int flags);
|
|
|
|
void plugins_probe(void);
|
|
|
|
struct sammler_plugin * plugin_lookup(char *name);
|
|
|
|
int probe_submit(struct sammler_plugin *plugin, char *filename, int ds_id, const char *fmt, ... );
|
|
|
|
int strsplit(char *string, char **fields, size_t size);
|
|
|
|
#endif /* _PLUGINS_H_ */
|