]> arthur.barton.de Git - netdata.git/blob - src/plugins_d.h
Merge remote-tracking branch 'upstream/master' into health
[netdata.git] / src / plugins_d.h
1 #ifndef NETDATA_PLUGINS_D_H
2 #define NETDATA_PLUGINS_D_H 1
3
4 #define PLUGINSD_FILE_SUFFIX ".plugin"
5 #define PLUGINSD_FILE_SUFFIX_LEN strlen(PLUGINSD_FILE_SUFFIX)
6 #define PLUGINSD_CMD_MAX (FILENAME_MAX*2)
7 #define PLUGINSD_LINE_MAX 1024
8
9 struct plugind {
10         char id[CONFIG_MAX_NAME+1];                     // config node id
11
12         char filename[FILENAME_MAX+1];          // just the filename
13         char fullfilename[FILENAME_MAX+1];      // with path
14         char cmd[PLUGINSD_CMD_MAX+1];           // the command that is executes
15
16         pid_t pid;
17         pthread_t thread;
18
19         size_t successful_collections;          // the number of times we have seen
20                                                                                 // values collected from this plugin
21
22         size_t serial_failures;                         // the number of times the plugin started
23                                                                                 // without collecting values
24
25         int update_every;                                       // the plugin default data collection frequency
26         int obsolete;                                           // do not touch this structure after setting this to 1
27         int enabled;                                            // if this is enabled or not
28
29         time_t started_t;
30
31         struct plugind *next;
32 };
33
34 extern struct plugind *pluginsd_root;
35
36 extern void *pluginsd_main(void *ptr);
37
38 #endif /* NETDATA_PLUGINS_D_H */