{ "info": { "author": "binger", "author_email": "", "bugtrack_url": null, "classifiers": [], "description": "**syslog_parse**\n----------------\n\n\nDocumentation\n-------------\n\nThe documentation is hosted at https://github.com/BingerYang/syslog_parse\n\nInstallation\n------------\n\nsyslog_parse requires **Python **Python 3.x >= 3.4**.\n\nInstall from PyPI::\n $ pip install syslog_parse\n\nUsage\n-----\n1. \u5355\u6761\u89e3\u6790\n\n>>> from syslog_parse import parse\n>>> a = \"<189>Jan 20 2019 06:31:16.173 US-LAX-2-CR-2-new %%01OPS/5/OPS_LOGIN(s):CID=0x80b40445;Succeeded in establishing the OPS connection.(ServiceType=embedding-script, UserName=_soc_l3loop.py, Ip=0.0.0.0, VpnName=_public_)\"\n>>> parse(a)\n\n>>> parse(a)\nMessage(facility=, severity=, timestamp=datetime.datetime(2019, 1, 20, 6, 31, 16), hostname='US-LAX-2-CR-2-new', module='OPS', digest='OPS_LOGIN', content='CID=0x80b40445;Succeeded in establishing the OPS connection.(ServiceType=embedding-script, UserName=_soc_l3loop.py, Ip=0.0.0.0, VpnName=_public_)')\n\n\n2. \u5faa\u73af\u89e3\u6790\n\n>>> from syslog_parse import cycle_parse\n>>> aa = \"<189>Jan 20 2019 06:31:17.60.1 US-DFW-1-CR-1 %%01INFO/5/SUPPRESS_LOG(l)[8480539]:Last message repeated 20 times.(InfoID=1079656494, ModuleName=VTY, InfoAlias=ACL_DENY)<7>Jan 20 14:30:56 AP-HKG-2-CR-1-RE0 kernel: rts_commit_proposalmput op: 2, peer_type:17, peer_index:3, vskid:0, seqno:14447884, flag:9,<7>Jan 20 14:30:56 AP-HKG-2-CR-1-RE0 kernel: rts_commit_proposalmput op: 2, peer_type:17, peer_index:1, vskid:0, seqno:14447884, flag:9,<7>Jan 20 14:30:56 AP-HKG-2-CR-1-RE0 kernel: rts_commit_proposalmput op: 2, peer_type:17, peer_index:5, vskid:0, seqno:14447884, flag:9,<37>Jan 20 14:30:56 AP-HKG-2-CR-1-RE0 snmpd[15576]: SNMPD_AUTH_RESTRICTED_ADDRESS: nsa_initial_callback: request from address 103.36.133.244 not allowed<7>Jan 20 14:30:57 AP-HKG-2-CR-1-RE0 kernel: rts_commit_proposalmput op: 2, peer_type:17, peer_index:3, vskid:0, seqno:14447886, flag:9,<7>Jan 20 06:25:22 AP-SGN-1-CR-1-RE0 kernel: rts_commit_proposalmput op: 2, peer_type:17, peer_index:1, vskid:0, seqno:1158657, flag:9,<7>Jan 20 14:30:57 AP-HKG-2-CR-1-RE0 kernel: rts_commit_proposalmput op: 2, peer_type:17, peer_index:5, vskid:0, seqno:14447886, flag:9,<7>Jan 20 14:30:57 AP-HKG-2-CR-1-RE0 kernel: rts_commit_proposalmput op: 2, peer_type:17, peer_index:1, vskid:0, seqno:14447886, flag:9,<188>Jan 20 2019 06:31:14.967 SA-SAO-2-CR-1 %%01SOC/4/hwBaseArpVlanCarEnhanceTrap_clear(l):VS=Admin-VS-CID=0x80c4046e-alarmID=0x09e62006-clearType=service_resume;ARP VLAN CAR became ineffective on an interface.(Logical Interface = Eth-Trunk4, Physical Interface = GigabitEthernet3/0/6, Pe-Vlan = 0, Ce-Vlan = 0, Sample Rate = 499)\"\n>>> cycle_parse(aa)\n\n>>> next(cycle_parse(aa))\nMessage(facility=, severity=, timestamp=datetime.datetime(2019, 1, 20, 6, 31, 17), hostname='US-DFW-1-CR-1', module='INFO', digest='SUPPRESS_LOG', content='Last message repeated 20 times.(InfoID=1079656494, ModuleName=VTY, InfoAlias=ACL_DENY)')\n>>> for msg in cycle_parse(bb):\n print(msg)\nMessage(facility=, severity=, timestamp=datetime.datetime(2019, 1, 20, 6, 31, 17), hostname='US-DFW-1-CR-1', module='INFO', digest='SUPPRESS_LOG', content='Last message repeated 20 times.(InfoID=1079656494, ModuleName=VTY, InfoAlias=ACL_DENY)')\nMessage(facility=, severity=, timestamp=datetime.datetime(2019, 1, 20, 14, 30, 56), hostname='AP-HKG-2-CR-1-RE0', module='kernel', digest='rts_commit_proposalmput op', content='2, peer_type:17, peer_index:3, vskid:0, seqno:14447884, flag:9,')\n\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/BingerYang/syslog_parse", "keywords": "", "license": "2009-2018 (c) binger \n\nPermission is hereby granted, free of charge, to any person\nobtaining a copy of this software and associated documentation\nfiles (the \"Software\"), to deal in the Software without\nrestriction, including without limitation the rights to use,\ncopy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following\nconditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\nOF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\nHOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\nWHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n", "maintainer": "", "maintainer_email": "", "name": "syslog_parse", "package_url": "https://pypi.org/project/syslog_parse/", "platform": "all", "project_url": "https://pypi.org/project/syslog_parse/", "project_urls": { "Homepage": "https://github.com/BingerYang/syslog_parse" }, "release_url": "https://pypi.org/project/syslog_parse/0.2.1.1909161139/", "requires_dist": null, "requires_python": "", "summary": "syslog parser", "version": "0.2.1.1909161139" }, "last_serial": 5834100, "releases": { "0.2.1.1909161139": [ { "comment_text": "", "digests": { "md5": "fcb928fd711ed698bd007e0583621d76", "sha256": "6d1b046a82e495a1157c1e18a24e9e7091bf263c2c43f48105cad65cbd58d7a4" }, "downloads": -1, "filename": "syslog_parse-0.2.1.1909161139.tar.gz", "has_sig": false, "md5_digest": "fcb928fd711ed698bd007e0583621d76", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8515, "upload_time": "2019-09-16T06:00:42", "url": "https://files.pythonhosted.org/packages/39/c9/77c73b4aa55dbe81f3b8728e79c4bbecaef390c393a99c9e1264fb516a89/syslog_parse-0.2.1.1909161139.tar.gz" } ], "0.2.1.9161139": [ { "comment_text": "", "digests": { "md5": "a58dea186ec691792d972fd695b3f9c5", "sha256": "9c2a1be44ca00f78ee8076624525acdd444f7dd43e8c3018de5aa6e14563a20a" }, "downloads": -1, "filename": "syslog_parse-0.2.1.9161139.tar.gz", "has_sig": false, "md5_digest": "a58dea186ec691792d972fd695b3f9c5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8512, "upload_time": "2019-09-16T03:41:08", "url": "https://files.pythonhosted.org/packages/0a/54/e0c818aa15ad7b2ce0a002eb55e2e7ba5c80a1c82c67e648774b571b008f/syslog_parse-0.2.1.9161139.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "fcb928fd711ed698bd007e0583621d76", "sha256": "6d1b046a82e495a1157c1e18a24e9e7091bf263c2c43f48105cad65cbd58d7a4" }, "downloads": -1, "filename": "syslog_parse-0.2.1.1909161139.tar.gz", "has_sig": false, "md5_digest": "fcb928fd711ed698bd007e0583621d76", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8515, "upload_time": "2019-09-16T06:00:42", "url": "https://files.pythonhosted.org/packages/39/c9/77c73b4aa55dbe81f3b8728e79c4bbecaef390c393a99c9e1264fb516a89/syslog_parse-0.2.1.1909161139.tar.gz" } ] }