Tree wide: Move utilities and libraries to src/utils/.
[collectd.git] / src / utils / format_graphite / format_graphite.h
diff --git a/src/utils/format_graphite/format_graphite.h b/src/utils/format_graphite/format_graphite.h
new file mode 100644 (file)
index 0000000..60b89ae
--- /dev/null
@@ -0,0 +1,41 @@
+/**
+ * collectd - src/utils_format_graphite.h
+ * Copyright (C) 2012  Thomas Meson
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; only version 2 of the License is applicable.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+ *
+ * Author:
+ *   Thomas Meson <zllak at hycik.org>
+ **/
+
+#ifndef UTILS_FORMAT_GRAPHITE_H
+#define UTILS_FORMAT_GRAPHITE_H 1
+
+#include "collectd.h"
+
+#include "plugin.h"
+
+#define GRAPHITE_STORE_RATES 0x01
+#define GRAPHITE_SEPARATE_INSTANCES 0x02
+#define GRAPHITE_ALWAYS_APPEND_DS 0x04
+#define GRAPHITE_DROP_DUPE_FIELDS 0x08
+#define GRAPHITE_PRESERVE_SEPARATOR 0x10
+#define GRAPHITE_USE_TAGS 0x20
+
+int format_graphite(char *buffer, size_t buffer_size, const data_set_t *ds,
+                    const value_list_t *vl, const char *prefix,
+                    const char *postfix, const char escape_char,
+                    unsigned int flags);
+
+#endif /* UTILS_FORMAT_GRAPHITE_H */