summaryrefslogtreecommitdiffstats
path: root/database/engine/metadata_log/metalogpluginsd.h
blob: 96808aaa2c730276c7efaffee489e8d1dd0f36e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// SPDX-License-Identifier: GPL-3.0-or-later

#ifndef NETDATA_METALOGPLUGINSD_H
#define NETDATA_METALOGPLUGINSD_H

#include "../../../collectors/plugins.d/pluginsd_parser.h"
#include "../../../collectors/plugins.d/plugins_d.h"
#include "../../../parser/parser.h"

struct metalog_pluginsd_state {
    struct metalog_instance *ctx;
    uuid_t uuid;
    uuid_t host_uuid;
    uuid_t chart_uuid;
    uint8_t skip_record; /* skip this record due to errors in parsing */
    struct metadata_logfile *metalogfile; /* current metadata log file being replayed */
};

extern void metalog_pluginsd_state_init(struct metalog_pluginsd_state *state, struct metalog_instance *ctx);

extern PARSER_RC metalog_pluginsd_chart_action(void *user, char *type, char *id, char *name, char *family,
                                               char *context, char *title, char *units, char *plugin, char *module,
                                               int priority, int update_every, RRDSET_TYPE chart_type, char *options);
extern PARSER_RC metalog_pluginsd_dimension_action(void *user, RRDSET *st, char *id, char *name, char *algorithm,
                                                   long multiplier, long divisor, char *options,
                                                   RRD_ALGORITHM algorithm_type);
extern PARSER_RC metalog_pluginsd_guid_action(void *user, uuid_t *uuid);
extern PARSER_RC metalog_pluginsd_context_action(void *user, uuid_t *uuid);
extern PARSER_RC metalog_pluginsd_tombstone_action(void *user, uuid_t *uuid);
extern PARSER_RC metalog_pluginsd_host(char **words, void *user, PLUGINSD_ACTION  *plugins_action);
extern PARSER_RC metalog_pluginsd_host_action(void *user, char *machine_guid, char *hostname, char *registry_hostname, int update_every, char *os, char *timezone, char *tags);

#endif /* NETDATA_METALOGPLUGINSD_H */