salesea


Namesalesea JSON
Version 1.0.34 PyPI version JSON
download
home_page
SummaryThis is an Nginx log collection tool.
upload_time2023-06-12 03:23:13
maintainer
docs_urlNone
authorhoward
requires_python>=3.0
license
keywords nginx logs collection
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # salesea@nginx-log-parser

## 开始使用

> 网络姻缘一线牵 珍惜这段缘

[![salesea](https://img.shields.io/pypi/v/salesea)](https://pypi.org/project/salesea/)
[![salesea](https://img.shields.io/pypi/dd/salesea)](https://pypi.org/project/salesea/#files)
[![salesea](https://img.shields.io/pypi/wheel/salesea)](https://pypi.org/project/salesea/)

### Nginx要求

- Nginx http配置:
  > 日志格式

  ```nginx
  log_format salesea '$remote_addr - $remote_user [$time_local] "$request" '
                 '$status $body_bytes_sent "$http_referer" '
                 '"$http_user_agent" "$http_x_forwarded_for"';
  ```

- Nginx server配置:
  > 日志路径
  ```shell
    access_log /to/path/access.log salesea;
  ```

### Python要求

- Python版本:3.6+

- salesea.row配置文件

  ```ini
  [nginx]
  server_name = 需要采集的nginx server_name,可以使用*通配符
  nginx_path = 如果你配置了环境变量,可以为空
  [request]
  concurrency = 上传日志并发数
  [salesea]
  visit_apikey = salesea的apikey
  interval = 采集间隔,单位秒
  ```

### 安装
    
```shell
python3 -m pip install salesea -i https://pypi.org/simple
```

### 运行

```shell
# 生成配置文件
$ salesea -g 
$ 请输入域名(可选): *.example.io
$ 请输入访问密钥(必填): ***********************
$ 请输入日志扫描间隔(默认60秒): 
$ 配置文件已生成: salesea.row

# 运行
$ salesea -s
# or
$ salesea -s -c salesea.row 

# debug mode
$ salesea -s -d
# or
$ salesea -s --debug
```


            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "salesea",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.0",
    "maintainer_email": "",
    "keywords": "nginx,logs,collection",
    "author": "howard",
    "author_email": "18071131140telephone@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/0a/3e/0e75e0d31688385438ccbbaffd6ca135b3ad234db12153738fcebc778dbc/salesea-1.0.34.tar.gz",
    "platform": null,
    "description": "# salesea@nginx-log-parser\n\n## \u5f00\u59cb\u4f7f\u7528\n\n> \u7f51\u7edc\u59fb\u7f18\u4e00\u7ebf\u7275 \u73cd\u60dc\u8fd9\u6bb5\u7f18\n\n[![salesea](https://img.shields.io/pypi/v/salesea)](https://pypi.org/project/salesea/)\n[![salesea](https://img.shields.io/pypi/dd/salesea)](https://pypi.org/project/salesea/#files)\n[![salesea](https://img.shields.io/pypi/wheel/salesea)](https://pypi.org/project/salesea/)\n\n### Nginx\u8981\u6c42\n\n- Nginx http\u914d\u7f6e\uff1a\n  > \u65e5\u5fd7\u683c\u5f0f\n\n  ```nginx\n  log_format salesea '$remote_addr - $remote_user [$time_local] \"$request\" '\n                 '$status $body_bytes_sent \"$http_referer\" '\n                 '\"$http_user_agent\" \"$http_x_forwarded_for\"';\n  ```\n\n- Nginx server\u914d\u7f6e\uff1a\n  > \u65e5\u5fd7\u8def\u5f84\n  ```shell\n    access_log /to/path/access.log salesea;\n  ```\n\n### Python\u8981\u6c42\n\n- Python\u7248\u672c\uff1a3.6+\n\n- salesea.row\u914d\u7f6e\u6587\u4ef6\n\n  ```ini\n  [nginx]\n  server_name = \u9700\u8981\u91c7\u96c6\u7684nginx server_name\uff0c\u53ef\u4ee5\u4f7f\u7528*\u901a\u914d\u7b26\n  nginx_path = \u5982\u679c\u4f60\u914d\u7f6e\u4e86\u73af\u5883\u53d8\u91cf\uff0c\u53ef\u4ee5\u4e3a\u7a7a\n  [request]\n  concurrency = \u4e0a\u4f20\u65e5\u5fd7\u5e76\u53d1\u6570\n  [salesea]\n  visit_apikey = salesea\u7684apikey\n  interval = \u91c7\u96c6\u95f4\u9694\uff0c\u5355\u4f4d\u79d2\n  ```\n\n### \u5b89\u88c5\n    \n```shell\npython3 -m pip install salesea -i https://pypi.org/simple\n```\n\n### \u8fd0\u884c\n\n```shell\n# \u751f\u6210\u914d\u7f6e\u6587\u4ef6\n$ salesea -g \n$ \u8bf7\u8f93\u5165\u57df\u540d(\u53ef\u9009): *.example.io\n$ \u8bf7\u8f93\u5165\u8bbf\u95ee\u5bc6\u94a5(\u5fc5\u586b): ***********************\n$ \u8bf7\u8f93\u5165\u65e5\u5fd7\u626b\u63cf\u95f4\u9694(\u9ed8\u8ba460\u79d2): \n$ \u914d\u7f6e\u6587\u4ef6\u5df2\u751f\u6210: salesea.row\n\n# \u8fd0\u884c\n$ salesea -s\n# or\n$ salesea -s -c salesea.row \n\n# debug mode\n$ salesea -s -d\n# or\n$ salesea -s --debug\n```\n\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "This is an Nginx log collection tool.",
    "version": "1.0.34",
    "project_urls": null,
    "split_keywords": [
        "nginx",
        "logs",
        "collection"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2e82cfa24d01ed2129db330941be89f26421ced6a470d70c22913dd4d160a161",
                "md5": "d3f722ece132a8de76973da9b292d1d9",
                "sha256": "66f4f8cccf786f1fe9a4491c52753c65d13cdca5bfb596aa749b38204a5138c9"
            },
            "downloads": -1,
            "filename": "salesea-1.0.34-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d3f722ece132a8de76973da9b292d1d9",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.0",
            "size": 17201,
            "upload_time": "2023-06-12T03:23:11",
            "upload_time_iso_8601": "2023-06-12T03:23:11.305177Z",
            "url": "https://files.pythonhosted.org/packages/2e/82/cfa24d01ed2129db330941be89f26421ced6a470d70c22913dd4d160a161/salesea-1.0.34-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0a3e0e75e0d31688385438ccbbaffd6ca135b3ad234db12153738fcebc778dbc",
                "md5": "6fe34a8fd63f092a4caf4112f17242e3",
                "sha256": "d4ba671b19d838bb4649c01f1222bcb5266e0291a2d907989e8175c773ff9be1"
            },
            "downloads": -1,
            "filename": "salesea-1.0.34.tar.gz",
            "has_sig": false,
            "md5_digest": "6fe34a8fd63f092a4caf4112f17242e3",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.0",
            "size": 15223,
            "upload_time": "2023-06-12T03:23:13",
            "upload_time_iso_8601": "2023-06-12T03:23:13.707003Z",
            "url": "https://files.pythonhosted.org/packages/0a/3e/0e75e0d31688385438ccbbaffd6ca135b3ad234db12153738fcebc778dbc/salesea-1.0.34.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-06-12 03:23:13",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "salesea"
}
        
Elapsed time: 0.08480s