{"id":28290906,"url":"https://github.com/gnyblast/tase","last_synced_at":"2026-02-26T16:52:17.514Z","repository":{"id":293901693,"uuid":"938362870","full_name":"Gnyblast/tase","owner":"Gnyblast","description":"Multi-agent centralized logs control and management tool written in zig.","archived":false,"fork":false,"pushed_at":"2026-01-12T06:35:41.000Z","size":3220,"stargazers_count":15,"open_issues_count":2,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2026-01-12T16:31:49.617Z","etag":null,"topics":["controller","delete","devops","devops-tools","log","logging","management","multiagent","rotate","sysadmin","sysadmin-tool","truncate","zig","ziglang"],"latest_commit_sha":null,"homepage":"","language":"Zig","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Gnyblast.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-02-24T20:48:36.000Z","updated_at":"2026-01-12T06:35:44.000Z","dependencies_parsed_at":"2025-07-04T15:47:23.082Z","dependency_job_id":"adf32916-1b11-497a-878e-2f04a193f9b1","html_url":"https://github.com/Gnyblast/tase","commit_stats":null,"previous_names":["gnyblast/tase"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Gnyblast/tase","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gnyblast%2Ftase","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gnyblast%2Ftase/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gnyblast%2Ftase/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gnyblast%2Ftase/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Gnyblast","download_url":"https://codeload.github.com/Gnyblast/tase/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gnyblast%2Ftase/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29865399,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-26T16:38:37.846Z","status":"ssl_error","status_checked_at":"2026-02-26T16:37:58.932Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["controller","delete","devops","devops-tools","log","logging","management","multiagent","rotate","sysadmin","sysadmin-tool","truncate","zig","ziglang"],"created_at":"2025-05-22T03:12:51.515Z","updated_at":"2026-02-26T16:52:17.507Z","avatar_url":"https://github.com/Gnyblast.png","language":"Zig","funding_links":[],"categories":["Applications"],"sub_categories":[],"readme":"[![GitHub Actions Workflow Status](https://github.com/gnyblast/tase/actions/workflows/master-agent-test.yml/badge.svg)](https://github.com/gnyblast/tase/actions)\n[![GitHub Actions Workflow Status](https://github.com/gnyblast/tase/actions/workflows/unit-coverage-test.yml/badge.svg)](https://github.com/gnyblast/tase/actions)\n[![Coverage Status](https://coveralls.io/repos/github/Gnyblast/tase/badge.svg?branch=master)](https://coveralls.io/github/Gnyblast/tase?branch=master)\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"./trans_bg_wo_wm.png\" alt=\"drawing\" width=\"200\"/\u003e\n\u003c/p\u003e\n\n\u003e [!WARNING]\n\u003e Tase is well-tested on limited environments but not battle-tested fully.\n\n# Tase\n\n## Table of Contents\n\n- [Tase](#tase)\n  - [Table of Contents](#table-of-contents)\n  - [What is Tase?](#what-is-tase)\n  - [Features](#features)\n  - [Installation](#installation)\n  - [CLI Arguments](#cli-arguments)\n  - [Configuration Reference](#configuration-reference)\n    - [Configuration File Structure](#configuration-file-structure)\n      - [1. Configs (`configs`)](#1-configs-configs)\n      - [2. Action Strategies](#2-action-strategies)\n        - [Truncate Strategy](#truncate-strategy)\n        - [Rotate Strategy](#rotate-strategy)\n        - [Delete Strategy](#delete-strategy)\n      - [3. Agents Configuration](#3-agents-configuration)\n      - [4. Server Configuration](#4-server-configuration)\n  - [Example Configuration](#example-configuration)\n  - [License](#license)\n  - [Contributing](#contributing)\n  - [Roadmap](#roadmap)\n  - [Author](#author)\n\n## What is Tase?\n\nTase is a lightweight log management system written in Zig. It consists of a daemon running on a master server and lightweight agents deployed across multiple servers. With a single config.yaml, Tase allows centralized control over log file management, including deletion, rotation, and truncation.\n\n## Features\n\n1. **Master-Agent Architecture**: The master server manages configurations and schedules, while agents execute log management tasks.\n2. **YAML-Based Configuration**: The master server reads a `config.yaml` file to determine agent behavior and scheduling.\n3. **Cron-based Scheduling**: The application uses cron-based scheduling to execute the log management tasks at predefined intervals.\n4. **Delete Logs**: The application can delete log files that are older than a specified number of days or exceed a certain size.\n5. **Rotate Logs**: The application can rotate log files, optionally compressing the archived files using the GZip algorithm. It can also delete archived logs older than a specified number of days or size same as delete action.\n6. **Truncate Logs**: The application can truncate log files that are older than a specified number of days or exceed a certain size.\n\n## Installation\n\nTase is written in Zig, and to build and install it, follow these steps:\n\n```sh\n# Clone the repository\ngit clone https://github.com/Gnyblast/tase.git\ncd tase\n\n# Build the application\nzig build\n\n# Run the master daemon\nzig-out/bin/tase -m master -c /path/to/config.yml\n\n# Run the agent daemon on other servers that can communicate with master server\nzig-out/bin/tase --agent --secret \u003ca-generated-secret-that-matches-to-config\u003e --port 7423 --master-host localhost --master-port 7423\n```\n\n## CLI Arguments\n\n| Argument         | Type   | Description                                                       | Default              | Required                            |\n| ---------------- | ------ | ----------------------------------------------------------------- | -------------------- | ----------------------------------- |\n| `--log-dir`      | string | Directory for tase self logs                                      | `/var/log/tase`      | No                                  |\n| `--log-level`    | string | Logging level (`debug`, `info`, `warn`, `error`)                  | `info`               | No                                  |\n| `--master`       | bool   | For server type master                                            | -                    | Either --master or --agent required |\n| `--agent`        | bool   | For server type agent                                             | -                    | Either --master or --agent required |\n| `--config`       | string | absolute path for configuration file                              | `/etc/tase/app.yaml` | No                                  |\n| `--secret`       | string | Agents only - Secret for master/agent communication (JWT secret)  | -                    | Yes - Only for --agent              |\n| `--host`         | string | Agent Server host address (Only for agents)                       | `127.0.0.1`          | No                                  |\n| `--port`         | string | Agent Server port (Only for agents)                               | `7423`               | No                                  |\n| `--server-type`  | string | Agent Server type, only `tcp` atm (Only for agents)               | `tcp`                | No                                  |\n| `--master-host`  | string | Host address of the master for agent to connect (Only for agents) | -                    | Yes                                 |\n| `--mastger-port` | string | Port address of the master for agent to connect (Only for agents) | -                    | Yes                                 |\n| `--help`         | bool   | Print help menu                                                   | -                    | No                                  |\n\n## Configuration Reference\n\n### Configuration File Structure\n\nThe application uses a YAML configuration file with the following main sections:\n\n#### 1. Configs (`configs`)\n\nEach config defines a log management task with the following properties:\n\n| Property           | Type     | Description                                                                                            | Default | Required |\n| ------------------ | -------- | ------------------------------------------------------------------------------------------------------ | ------- | -------- |\n| `app_name`         | string   | Name of the application                                                                                | -       | Yes      |\n| `logs_dir`         | string   | Directory containing log files                                                                         | -       | Yes      |\n| `log_files_regexp` | string   | Regular expression to match log files. **Always use single quotes `'` because of Library Limitations** | -       | Yes      |\n| `cron_expression`  | string   | Cron schedule for the log management task                                                              | -       | Yes      |\n| `run_agent_names`  | string[] | List of agents to run this task **(\"local\" is a reserved word to run against master server itself)**   | -       | Yes      |\n| `action`           | object   | Log management strategy details                                                                        | -       | Yes      |\n\n#### 2. Action Strategies\n\nThe `action` object supports three strategies:\n\n##### Truncate Strategy\n\n| Property                   | Type   | Description                                                          | Default | Required                     |\n| -------------------------- | ------ | -------------------------------------------------------------------- | ------- | ---------------------------- |\n| `strategy`                 | string | Must be `\"truncate\"`                                                 | -       | Yes                          |\n| `truncate_settings.from`   | string | Truncate from top or bottom (`\"top\"` or `\"bottom\"`)                  | -       | Yes                          |\n| `truncate_settings.lines`  | int    | Truncate by lines (it's mutually exclusive with `\"size\"`)            | -       | Either `\"lines\"` or `\"size\"` |\n| `truncate_settings.size`   | int    | Truncate by size in MB (it's mutually exclusive with `\"lines\"`)      | -       | Either `\"lines\"` or `\"size\"` |\n| `truncate_settings.action` | string | Keep or Delete matching `truncate_settings` (`\"delete\"` or `\"keep\"`) | -       | Yes                          |\n| `if.condition`             | string | Condition type (`\"days\"` or `\"size\" in MB`)                          | -       | Yes                          |\n| `if.operator`              | string | Comparison operator (`\"gt\"`, `\"lt\"`, `\"eq\"`)                         | -       | Yes                          |\n| `if.operand`               | number | Threshold value                                                      | -       | Yes                          |\n\n##### Rotate Strategy\n\n| Property                 | Type   | Description                                  | Default                      | Required                         |\n| ------------------------ | ------ | -------------------------------------------- | ---------------------------- | -------------------------------- |\n| `strategy`               | string | Must be `\"rotate\"`                           | -                            | Yes                              |\n| `rotate_archives_dir`    | string | Directory for archiving rotated files        | same directory with log file | No                               |\n| `if.condition`           | string | Condition type (`\"days\"` or `\"size\" in MB`)  | -                            | Yes                              |\n| `if.operator`            | string | Comparison operator (`\"gt\"`, `\"lt\"`, `\"eq\"`) | -                            | Yes                              |\n| `if.operand`             | number | Threshold value                              | -                            | Yes                              |\n| `keep_archive.condition` | string | Condition type (`\"days\"` or `\"size\" in MB`)  | -                            | Yes if `keep_archive` is defined |\n| `keep_archive.operator`  | string | Comparison operator (`\"gt\"`, `\"lt\"`, `\"eq\"`) | -                            | Yes if `keep_archive` is defined |\n| `keep_archive.operand`   | number | Threshold value                              | -                            | Yes if `keep_archive` is defined |\n| `compress`               | string | Compression algorithm (`\"gzip\"`)             | -                            | No                               |\n| `compression_level`      | number | Compression level (4-9)                      | 4                            | No                               |\n\n##### Delete Strategy\n\n| Property       | Type   | Description                                  | Default | Required |\n| -------------- | ------ | -------------------------------------------- | ------- | -------- |\n| `strategy`     | string | Must be `\"delete\"`                           | -       | Yes      |\n| `if.condition` | string | Condition type (`\"days\"` or `\"size\" in MB`)  | -       | Yes      |\n| `if.operator`  | string | Comparison operator (`\"gt\"`, `\"lt\"`, `\"eq\"`) | -       | Yes      |\n| `if.operand`   | number | Threshold value                              | -       | Yes      |\n\n#### 3. Agents Configuration\n\n| Property   | Type   | Description                                         | Default | Required |\n| ---------- | ------ | --------------------------------------------------- | ------- | -------- |\n| `name`     | string | Agent name **(\"local\" is reserved cannot be used)** | -       | Yes      |\n| `hostname` | string | Agent hostname                                      | -       | Yes      |\n| `port`     | number | Agent port                                          | -       | Yes      |\n| `secret`   | string | Authentication secret                               | -       | Yes      |\n\n#### 4. Server Configuration\n\n| Property    | Type   | Description      | Default       | Required |\n| ----------- | ------ | ---------------- | ------------- | -------- |\n| `host`      | string | Server hostname  | `\"127.0.0.1\"` | No       |\n| `port`      | number | Server port      | `7423`        | No       |\n| `type`      | string | Server type      | `\"tcp\"`       | No       |\n| `time_zone` | string | Server time zone | `\"UTC\"`       | No       |\n\n## Example Configuration\n\n```yaml\nserver:\n  host: \"127.0.0.1\"\n  port: 7423\n  time_zone: \"UTC\"\n\nagents:\n  - name: agent_1\n    hostname: \"192.xxx.xxx.xxx\"\n    port: 7423\n    secret: \"your-secret-key\"\n\nconfigs:\n  - app_name: \"rotate_logs\"\n    logs_dir: \"/var/log/myapp\"\n    log_files_regexp: 'test\\.log'\n    cron_expression: \"0 0 * * *\"\n    run_agent_names:\n      - agent_1\n    action:\n      strategy: rotate\n      if:\n        condition: days\n        operator: \"gt\"\n        operand: 7\n      compression_type: gzip\n      compression_level: 5\n\n  - app_name: \"delete_logs\"\n    logs_dir: \"/var/log/myapp2\"\n    log_files_regexp: 'test\\.log'\n    cron_expression: \"30 08 * * 7\"\n    run_agent_names:\n      - agent_1\n      - local\n    action:\n      strategy: delete\n      if:\n        condition: size\n        operator: \"gt\"\n        operand: 20\n\n  - app_name: \"truncate_by_lines_delete_top\"\n    logs_dir: \"/var/log/myapp3\"\n    log_files_regexp: 'test\\.log'\n    cron_expression: \"30 09 * * 1\"\n    run_agent_names:\n      - agent_1\n    action:\n      strategy: truncate\n      if:\n        condition: days\n        operator: \"gt\"\n        operand: 2\n      truncate_settings:\n        action: \"delete\"\n        from: \"top\"\n        lines: 1000\n```\n\nFor more example please see: [config](app-test-container/master/config.yaml)\n\n## Contributing\n\nContributions are welcome! Feel free to submit issues and pull requests on [GitHub](https://github.com/Gnyblast/tase).\n\nPlease read [Contiribution guide](CONTRIBUTING.md)\n\n## Roadmap\n\n### Version 1.0.0\n\n- Create a builder for different CPU architectures and OS and implement a released inside\n\n### Version 2.0.0\n\n1. Log file monitoring\n1. Parse and process monitored log files\n1. Save processed log files to a database for future consumption by a UI application\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE).\n\n## Author\n\nDeveloped by [Gnyblast](https://github.com/Gnyblast).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgnyblast%2Ftase","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgnyblast%2Ftase","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgnyblast%2Ftase/lists"}