syslog-ng source
riemann.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2013, 2014 Balabit
3  * Copyright (c) 2013, 2014, 2015 Gergely Nagy
4  *
5  * This program is free software; you can redistribute it and/or modify it
6  * under the terms of the GNU General Public License version 2 as published
7  * by the Free Software Foundation, or (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17  *
18  * As an additional exemption you are allowed to compile & link against the
19  * OpenSSL libraries as published by the OpenSSL project. See the file
20  * COPYING for details.
21  *
22  */
23 
24 #ifndef SNG_RIEMANN_H_INCLUDED
25 #define SNG_RIEMANN_H_INCLUDED
26 
29 
30 #include <riemann/riemann-client.h>
31 
32 typedef struct
33 {
34  LogThreadedDestDriver super;
35 
36  gchar *server;
37  gint port;
38  riemann_client_type_t type;
39  guint timeout;
40 
41  struct
42  {
43  LogTemplate *host;
44  LogTemplate *service;
45  LogTemplate *event_time;
47  LogTemplate *state;
48  LogTemplate *description;
49  LogTemplate *metric;
50  LogTemplate *ttl;
51  GList *tags;
52  ValuePairs *attributes;
53  } fields;
54  LogTemplateOptions template_options;
55 
56  struct
57  {
58  gchar *cacert;
59  gchar *cert;
60  gchar *key;
61  } tls;
62 
64 
65 
66 LogDriver *riemann_dd_new(GlobalConfig *cfg);
67 
68 void riemann_dd_set_server(LogDriver *d, const gchar *host);
69 void riemann_dd_set_port(LogDriver *d, gint port);
70 LogTemplateOptions *riemann_dd_get_template_options(LogDriver *d);
71 
72 void riemann_dd_set_field_host(LogDriver *d, LogTemplate *value);
73 void riemann_dd_set_field_service(LogDriver *d, LogTemplate *value);
74 void riemann_dd_set_field_event_time(LogDriver *d, LogTemplate *value);
75 void riemann_dd_set_field_state(LogDriver *d, LogTemplate *value);
76 void riemann_dd_set_field_description(LogDriver *d, LogTemplate *value);
77 void riemann_dd_set_field_metric(LogDriver *d, LogTemplate *value);
78 void riemann_dd_set_field_ttl(LogDriver *d, LogTemplate *value);
79 void riemann_dd_set_field_tags(LogDriver *d, GList *taglist);
80 void riemann_dd_set_field_attributes(LogDriver *d, ValuePairs *vp);
81 gboolean riemann_dd_set_connection_type(LogDriver *d, const gchar *type);
82 void riemann_dd_set_tls_cacert(LogDriver *d, const gchar *path);
83 void riemann_dd_set_tls_cert(LogDriver *d, const gchar *path);
84 void riemann_dd_set_tls_key(LogDriver *d, const gchar *path);
85 void riemann_dd_set_timeout(LogDriver *d, guint timeout);
86 void riemann_dd_set_event_time_unit(LogDriver *d, gint unit);
87 
88 #endif
void riemann_dd_set_tls_cert(LogDriver *d, const gchar *path)
Definition: riemann.c:179
void riemann_dd_set_port(LogDriver *d, gint port)
Definition: riemann.c:49
void riemann_dd_set_timeout(LogDriver *d, guint timeout)
Definition: riemann.c:163
void riemann_dd_set_field_service(LogDriver *d, LogTemplate *value)
Definition: riemann.c:66
void riemann_dd_set_event_time_unit(LogDriver *d, gint unit)
Definition: riemann.c:84
void riemann_dd_set_tls_key(LogDriver *d, const gchar *path)
Definition: riemann.c:188
void riemann_dd_set_field_host(LogDriver *d, LogTemplate *value)
Definition: riemann.c:57
void riemann_dd_set_field_attributes(LogDriver *d, ValuePairs *vp)
Definition: riemann.c:137
LogTemplateOptions * riemann_dd_get_template_options(LogDriver *d)
Definition: riemann.c:197
gboolean riemann_dd_set_connection_type(LogDriver *d, const gchar *type)
Definition: riemann.c:146
void riemann_dd_set_field_event_time(LogDriver *d, LogTemplate *value)
Definition: riemann.c:75
void riemann_dd_set_field_description(LogDriver *d, LogTemplate *value)
Definition: riemann.c:101
void riemann_dd_set_field_ttl(LogDriver *d, LogTemplate *value)
Definition: riemann.c:119
void riemann_dd_set_field_tags(LogDriver *d, GList *taglist)
Definition: riemann.c:128
void riemann_dd_set_field_state(LogDriver *d, LogTemplate *value)
Definition: riemann.c:92
void riemann_dd_set_field_metric(LogDriver *d, LogTemplate *value)
Definition: riemann.c:110
LogDriver * riemann_dd_new(GlobalConfig *cfg)
Definition: riemann.c:327
void riemann_dd_set_tls_cacert(LogDriver *d, const gchar *path)
Definition: riemann.c:170
void riemann_dd_set_server(LogDriver *d, const gchar *host)
Definition: riemann.c:40
Definition: riemann.h:33
ValuePairs * attributes
Definition: riemann.h:52
LogTemplate * description
Definition: riemann.h:48
gchar * key
Definition: riemann.h:60
LogTemplate * state
Definition: riemann.h:47
LogThreadedDestDriver super
Definition: riemann.h:34
gchar * server
Definition: riemann.h:36
gchar * cert
Definition: riemann.h:59
LogTemplate * host
Definition: riemann.h:43
LogTemplateOptions template_options
Definition: riemann.h:54
LogTemplate * ttl
Definition: riemann.h:50
LogTemplate * metric
Definition: riemann.h:49
riemann_client_type_t type
Definition: riemann.h:38
GList * tags
Definition: riemann.h:51
LogTemplate * service
Definition: riemann.h:44
LogTemplate * event_time
Definition: riemann.h:45
guint timeout
Definition: riemann.h:39
gint event_time_unit
Definition: riemann.h:46
gchar * cacert
Definition: riemann.h:58
gint port
Definition: riemann.h:37
GlobalConfig * cfg
Definition: test_batched_ack_tracker.c:34
GString * value
Definition: test_decode.c:28