syslog-ng source
stats-cluster-logpipe.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2002-2017 Balabit
3  * Copyright (c) 2017 Laszlo Budai
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18  *
19  * As an additional exemption you are allowed to compile & link against the
20  * OpenSSL libraries as published by the OpenSSL project. See the file
21  * COPYING for details.
22  *
23  */
24 
25 #ifndef STATS_CLUSTER_LOGPIPE_H_INCLUDED
26 #define STATS_CLUSTER_LOGPIPE_H_INCLUDED
27 
28 #include "syslog-ng.h"
29 
30 typedef enum
31 {
32  SC_TYPE_DROPPED = 0, /* number of messages dropped */
33  SC_TYPE_PROCESSED, /* number of messages processed */
34  SC_TYPE_QUEUED, /* number of messages on disk */
35  SC_TYPE_SUPPRESSED,/* number of messages suppressed */
36  SC_TYPE_STAMP, /* timestamp */
37  SC_TYPE_DISCARDED, /* discarded messages of filter */
38  SC_TYPE_MATCHED, /* discarded messages of filter */
39  SC_TYPE_NOT_MATCHED, /* discarded messages of filter */
40  SC_TYPE_WRITTEN, /* number of sent messages */
43 
44 void stats_cluster_logpipe_key_set(StatsClusterKey *key, const gchar *name,
45  StatsClusterLabel *labels, gsize labels_len);
46 
47 
48 /*
49  * The legacy functions should not be used for new code.
50  * When transforming a legacy stats key to a new metric key, aliases should be specified consistently at all call sites.
51  */
52 void stats_cluster_logpipe_key_legacy_set(StatsClusterKey *key, guint16 component, const gchar *id,
53  const gchar *instance);
54 void stats_cluster_logpipe_key_add_legacy_alias(StatsClusterKey *key, guint16 component, const gchar *id,
55  const gchar *instance);
56 #endif
const gchar * name
Definition: debugger.c:265
void stats_cluster_logpipe_key_set(StatsClusterKey *key, const gchar *name, StatsClusterLabel *labels, gsize labels_len)
Definition: stats-cluster-logpipe.c:73
void stats_cluster_logpipe_key_add_legacy_alias(StatsClusterKey *key, guint16 component, const gchar *id, const gchar *instance)
Definition: stats-cluster-logpipe.c:91
StatsCounterGroupLogPipe
Definition: stats-cluster-logpipe.h:31
@ SC_TYPE_DROPPED
Definition: stats-cluster-logpipe.h:32
@ SC_TYPE_MAX
Definition: stats-cluster-logpipe.h:41
@ SC_TYPE_WRITTEN
Definition: stats-cluster-logpipe.h:40
@ SC_TYPE_STAMP
Definition: stats-cluster-logpipe.h:36
@ SC_TYPE_DISCARDED
Definition: stats-cluster-logpipe.h:37
@ SC_TYPE_QUEUED
Definition: stats-cluster-logpipe.h:34
@ SC_TYPE_SUPPRESSED
Definition: stats-cluster-logpipe.h:35
@ SC_TYPE_PROCESSED
Definition: stats-cluster-logpipe.h:33
@ SC_TYPE_MATCHED
Definition: stats-cluster-logpipe.h:38
@ SC_TYPE_NOT_MATCHED
Definition: stats-cluster-logpipe.h:39
void stats_cluster_logpipe_key_legacy_set(StatsClusterKey *key, guint16 component, const gchar *id, const gchar *instance)
Definition: stats-cluster-logpipe.c:82
struct tm key
Definition: cache.c:63