The flowcounter output plugin, allows to count up records and its size.
Key | Description | Default |
---|---|---|
Unit | The unit of duration. (second/minute/hour/day) | minute |
#include <stdio.h> | |
#include <string.h> | |
void report(int i) | |
{ | |
printf("[%s] %d\n", __FUNCTION__, i); | |
} | |
int main(void) | |
{ |
# OS | |
Raspbian on Raspberry Pi 2 | |
# gcc | |
$ gcc --version | |
gcc (Debian 4.6.3-14+rpi1) 4.6.3 | |
Copyright (C) 2011 Free Software Foundation, Inc. | |
This is free software; see the source for copying conditions. There is NO | |
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
#include <unistd.h> | |
#include <fluent-bit.h> | |
#include <msgpack.h> | |
int my_stdout_json(void* data, size_t size) | |
{ | |
printf("[%s]",__FUNCTION__); | |
printf("%s",(char*)data); | |
printf("\n"); |
#include <unistd.h> | |
#include <fluent-bit.h> | |
int main() | |
{ | |
int i; | |
int n; | |
char tmp[256]; | |
flb_ctx_t *ctx; | |
int in_ffd; |
#include <unistd.h> | |
#include <fluent-bit.h> | |
int main() | |
{ | |
int i; | |
int n; | |
char tmp[256]; | |
flb_ctx_t *ctx; | |
int in_ffd; |
package main | |
import ( | |
"debug/pe" | |
"fmt" | |
"os" | |
) | |
func main() { | |
file, err := pe.Open(os.Args[1]) |
fluent-bit には Lua スクリプトでfilterできるプラグインがあります。 これを使うと、下記のようなことができます。
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ | |
/* Fluent Bit | |
* ========== | |
* Copyright (C) 2019-2021 The Fluent Bit Authors | |
* Copyright (C) 2015-2018 Treasure Data Inc. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at |