stalker-parser

0.0.9-15 • Public • Published

追踪者(stalker)项目nginx日志解析工具:stalker

安装

npm install stalker-parser

命令

# 遍历 
stalker walk nginx/log
# 入库 
stalker insertdb nginx/log
# 导出csv文件 
stalker csv nginx/log

配置

创建config.json,格式如下:

{
    "database": {
        "connectionLimit": 10,
        "host": "localhost",
        "port": 3306,
        "user": "root",
        "passord": "",
        "database": "tracker",
        "table": "test"
    },
    "database_timeout": 10000,
    "fileds_order_map": {
        "feature": ["id", "product_id", "ip", "access_time", "user_agent", "os_name", "os_version", "browser_name", "browser_version", "device_name", "device_version", "os_fullversion", "browser_fullversion", "device_fullversion", "screen", "device_pixel_ratio"],
        "hijack": [],
        "badjs": []
    },
    "query_map": {
        "hijack": {},
        "badjs": {},
        "feature": {}
    }
}

执行:

# 如果config.json在执行目录下
stalker insertdb nginx/log
# OR
stalker insertdb nginx/log -c config/path

Package Sidebar

Install

npm i stalker-parser

Weekly Downloads

2

Version

0.0.9-15

License

none

Last publish

Collaborators

  • ksky521