1
1
2
- [ ![ Build Status] ( https://travis-ci.org/lindig /rrd-client-lib-1 .svg?branch=master )] ( https://travis-ci.org/lindig /rrd-client-lib-1 )
2
+ [ ![ Build Status] ( https://travis-ci.org/xapi-project /rrd-client-lib.svg?branch=master )] ( https://travis-ci.org/xapi-project /rrd-client-lib )
3
3
4
4
# rrd-client-lib - A Library to Provide RRD Data
5
5
@@ -19,7 +19,6 @@ The `Makefile` builds the library and a simple test. The implementation
19
19
relies on a small JSON library that is included as a Git submodule. This
20
20
needs to be initialised:
21
21
22
- make parson
23
22
make
24
23
25
24
make test
@@ -28,9 +27,7 @@ needs to be initialised:
28
27
## Parson
29
28
30
29
The JSON library [ Parson] ( https://github.com/kgabis/parson.git ) is
31
- included as a Git submodule. A submodule points to a specific commit in
32
- an external repository and does not track its master branch as this
33
- advances. Instead, it needs to be updated explicitly.
30
+ included as a copy of the source code.
34
31
35
32
## Documentation - Overview
36
33
@@ -45,7 +42,7 @@ library:
45
42
int rrd_close(RRD_PLUGIN * plugin);
46
43
int rrd_add_src(RRD_PLUGIN * plugin, RRD_SOURCE * source);
47
44
int rrd_del_src(RRD_PLUGIN * plugin, RRD_SOURCE * source);
48
- int rrd_sample(RRD_PLUGIN * plugin);
45
+ int rrd_sample(RRD_PLUGIN * plugin, time_t (*t)(time_t*) );
49
46
50
47
A plugin reports streams of data to the RRD service. Each such
51
48
stream is represented as an ` RRD_SOURCE ` value. An ` RRD_PLUGIN `
@@ -86,7 +83,7 @@ All strings are in UTF8 encoding. The library implements the following
86
83
policy to manage memory: it does not free any memory that is hasn't
87
84
itself allocated. This means, if the client passes dynamically allocated
88
85
data into the library, it is the client's responsibility to de-allocate
89
- it.
86
+ it.
90
87
91
88
## Open, Sample, Close
92
89
@@ -105,12 +102,14 @@ considered private to the library.
105
102
<<function declarations>>=
106
103
RRD_PLUGIN *rrd_open(char *name, rrd_domain_t domain, char *path);
107
104
int rrd_close(RRD_PLUGIN * plugin);
108
- int rrd_sample(RRD_PLUGIN * plugin);
105
+ int rrd_sample(RRD_PLUGIN * plugin, time_t (*t)(time_t*) );
109
106
110
107
111
108
The name of the plugin is descriptive, as whether it reports data
112
109
for a single machine (` RRD_LOCAL_DOMAIN ` ) or multiple
113
- (` RRD_INTER_DOMAIN ` ).
110
+ (` RRD_INTER_DOMAIN ` ). The second parameter of ` rrd_sample ` is typically
111
+ NULL. If it isn't, it us used to obtain a timestamp instead of using
112
+ time(3).
114
113
115
114
## Data Sources
116
115
0 commit comments