AltraMayor / AltraMayor/gatekeeper

User friendliness: improve the logged information of dumped flows

未关闭
#724 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
enhancement good first issue
主要语言
C
星标
1.6k
派生
252
PR 合并指标
30 天内没有已合并 PR

描述

A log entry with information on a dumped flow looks like this:
```
GK/6 2024-12-13 18:45:57 ERR Flow (src: 111.111.111.111, dst: 222.222.222.222) at index 10998: [state: GK_BPF (3), flow_hash_value: 0x3a4ad6e1, expire_at: 0x16984504d9c543, program_index=100, cookie=1a55f823e6971600, 000c000099000000, 98fe2f0000000000, 0064020000000000, 30d0251822981600, 90d308bf01000000, 0100000000000000, 0000000000000000, grantor_ip: 222.222.222.111]
```
This log entry can be improved as follows:
1. The field `expire_at` should show the remaining time using the units seconds, minutes, hours, days, and weeks. Larger time units such as months and years should be avoided because they do not have fixed sizes; for example, a month can be 28, 29, 30, or 31 days long. Expired flows should show the field `expire_at` as "EXPIRED

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。