{"id":21056931,"url":"https://github.com/fluent-plugins-nursery/fluent-plugin-stats-notifier","last_synced_at":"2025-10-04T16:44:52.080Z","repository":{"id":56847200,"uuid":"13854556","full_name":"fluent-plugins-nursery/fluent-plugin-stats-notifier","owner":"fluent-plugins-nursery","description":"Fluentd plugin to calculate statistics and then thresholding","archived":false,"fork":false,"pushed_at":"2017-09-15T08:29:23.000Z","size":22,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-09-11T18:02:10.434Z","etag":null,"topics":["fluentd-output-plugin","fluentd-plugin","v10","v12","v14"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fluent-plugins-nursery.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-10-25T07:46:34.000Z","updated_at":"2023-04-04T08:23:41.000Z","dependencies_parsed_at":"2022-09-12T11:44:31.237Z","dependency_job_id":null,"html_url":"https://github.com/fluent-plugins-nursery/fluent-plugin-stats-notifier","commit_stats":null,"previous_names":["sonots/fluent-plugin-stats-notifier"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/fluent-plugins-nursery/fluent-plugin-stats-notifier","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fluent-plugins-nursery%2Ffluent-plugin-stats-notifier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fluent-plugins-nursery%2Ffluent-plugin-stats-notifier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fluent-plugins-nursery%2Ffluent-plugin-stats-notifier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fluent-plugins-nursery%2Ffluent-plugin-stats-notifier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fluent-plugins-nursery","download_url":"https://codeload.github.com/fluent-plugins-nursery/fluent-plugin-stats-notifier/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fluent-plugins-nursery%2Ffluent-plugin-stats-notifier/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278343068,"owners_count":25971399,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-04T02:00:05.491Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fluentd-output-plugin","fluentd-plugin","v10","v12","v14"],"created_at":"2024-11-19T16:55:11.841Z","updated_at":"2025-10-04T16:44:52.056Z","avatar_url":"https://github.com/fluent-plugins-nursery.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fluent-plugin-stats-notifier [![Build Status](https://secure.travis-ci.org/sonots/fluent-plugin-stats-notifier.png?branch=master)](http://travis-ci.org/sonots/fluent-plugin-stats-notifier)\n\nFluentd plugin to calculate statistics and then thresholding\n\n## Configuration\n\n### Example 1\n\nGet statistics on messages\n\n```\n\u003cmatch foo.**\u003e\n  type stats_notifier\n  tag notifier\n  interval 5\n  target_key 4xx_count\n  greater_equal 4\n  stats max # default\n  store_file /path/to/store_file.dat\n\u003c/match\u003e\n```\n\nAssuming following inputs are coming:\n\n    foo.bar1: {\"4xx_count\":1,\"foobar\":2\"}\n    foo.bar1: {\"4xx_count\":6,\"foobar\":2\"}\n\nthen this plugin emits an message because the max of `4xx_count` is greater than or equal to the specified value `4`. Output will be as following:\n\n    notifier: {\"4xx_count\":6.0}\n\n### Example 2\n\nGet statistics among tags\n\n```\n\u003cmatch foo.**\u003e\n  type stats_notifier\n  tag notifier\n  interval 5\n  target_key 4xx_count\n  greater_equal 4\n  aggregate all # default\n  aggregate_stats max # default\n  store_file /path/to/store_file.dat\n\u003c/match\u003e\n```\n\nAssuming following inputs are coming:\n\n    foo.bar1: {\"4xx_count\":1,\"foobar\":2\"}\n    foo.bar2: {\"4xx_count\":6,\"foobar\":2\"}\n\nthen this plugin emits an message because the max of `4xx_count` is greater than or equal to the specified value `4`. Output will be as following:\n\n    notifier: {\"4xx_count\":6.0}\n\n### Combined Example\n\n```\n\u003cmatch foo.**\u003e\n  type stats_notifier\n  tag notifier\n  interval 5\n  target_key 4xx_count\n  greater_equal 4\n  stats max # default\n  aggregate all # default\n  aggregate_stats max # default\n  store_file /path/to/store_file.dat\n\u003c/match\u003e\n```\n\nAssuming following inputs are coming:\n\n    foo.bar1: {\"4xx_count\":1,\"foobar\":2\"}\n    foo.bar1: {\"4xx_count\":8,\"foobar\":2\"}\n    foo.bar2: {\"4xx_count\":6,\"foobar\":2\"}\n\nOutput will be as following:\n\n    notifier: {\"4xx_count\":8.0}\n\n## Parameters\n\n- target\\_key (required)\n\n    The target key in the event record.\n\n- interval\n\n    The interval time of calculation and bounding. Default is 60.\n\n- less\\_than\n\n    A `less than` threshold value, that is, emit if `target_key` value \u003c specified value.\n\n- less\\_equal\n\n    A `less than or eqaul` threshold value, that is, emit if `target_key` value \u003c= specified value.\n\n- greater\\_than\n\n    A `greater than` threshold value, that is, emit if `target_key` value \u003e specified value. \n\n- greater\\_equal\n\n    A `greater than or eqaul` threshold value, that is, emit if `target_key` value \u003e= specified value. \n\n- stats\n\n    `max`, `avg`, `min`, `sum` can be specified. Default is `max`.\n\n- aggregate\\_stats\n\n    Work only with `aggregate all`. `max`, `avg`, `min`, `sum` can be specified. Default is `max`.\n\n- compare\\_with \n\n    Obsolete. Use `aggregate_stats`.\n\n- tag\n\n    The output tag name. Required for `aggregate all`.\n\n- add_tag_prefix\n\n    Add tag prefix for output message. Required for `aggregate tag`.\n\n- remove_tag_prefix\n\n    Remove tag prefix for output message.\n\n- add_tag_suffix\n\n    Add tag suffix for output message.\n\n- remove_tag_suffix\n\n    Remove tag suffix for output message.\n\n- aggragate\n    \n    Do calculation for each `tag` or `all`. The defaultis `all`.\n\n- store_file\n\n    Store internal data into a file of the given path on shutdown, and load on starting.\n\n## ChangeLog\n\nSee [CHANGELOG.md](CHANGELOG.md) for details.\n\n## Contributing\n\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new [Pull Request](../../pull/new/master)\n\n## Copyright\n\nCopyright (c) 2013 Naotoshi Seo. See [LICENSE](LICENSE) for details.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffluent-plugins-nursery%2Ffluent-plugin-stats-notifier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffluent-plugins-nursery%2Ffluent-plugin-stats-notifier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffluent-plugins-nursery%2Ffluent-plugin-stats-notifier/lists"}