summaryrefslogtreecommitdiffstats
path: root/src/plugins_d.h
diff options
context:
space:
mode:
authorFederico Ceratto <federico.ceratto@gmail.com>2016-03-30 21:40:42 +0000
committerFederico Ceratto <federico.ceratto@gmail.com>2016-03-30 21:40:42 +0000
commit9ce153ce7167c11adba8ac225edc7a707e97c6eb (patch)
tree9f6e849cce2dcc7e5b4e9e6252c843dc2d0787a2 /src/plugins_d.h
downloadnetdata-9ce153ce7167c11adba8ac225edc7a707e97c6eb.tar.xz
netdata-9ce153ce7167c11adba8ac225edc7a707e97c6eb.zip
Imported Upstream version 1.0.0upstream/1.0.0
Diffstat (limited to 'src/plugins_d.h')
-rwxr-xr-xsrc/plugins_d.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/plugins_d.h b/src/plugins_d.h
new file mode 100755
index 000000000..11e89e0ac
--- /dev/null
+++ b/src/plugins_d.h
@@ -0,0 +1,36 @@
+#include <sys/types.h>
+#include <unistd.h>
+
+
+#ifndef NETDATA_PLUGINS_D_H
+#define NETDATA_PLUGINS_D_H 1
+
+#define PLUGINSD_FILE_SUFFIX ".plugin"
+#define PLUGINSD_FILE_SUFFIX_LEN strlen(PLUGINSD_FILE_SUFFIX)
+#define PLUGINSD_CMD_MAX (FILENAME_MAX*2)
+#define PLUGINSD_LINE_MAX 1024
+
+struct plugind {
+ char id[CONFIG_MAX_NAME+1]; // config node id
+
+ char filename[FILENAME_MAX+1]; // just the filename
+ char fullfilename[FILENAME_MAX+1]; // with path
+ char cmd[PLUGINSD_CMD_MAX+1]; // the command that is executes
+
+ pid_t pid;
+ pthread_t thread;
+
+ int update_every;
+ int obsolete;
+ int enabled;
+
+ time_t started_t;
+
+ struct plugind *next;
+};
+
+extern struct plugind *pluginsd_root;
+
+extern void *pluginsd_main(void *ptr);
+
+#endif /* NETDATA_PLUGINS_D_H */