yahi

ภาพหน้าจอของซอฟแวร์:
yahi
รายละเอียดซอฟแวร์:
รุ่น: 0.1.2
วันที่อัพโหลด: 20 Feb 15
ผู้พัฒนา: Julien Tayon
การอนุญาต: ฟรี
ความนิยม: 12

Rating: nan/5 (Total Votes: 0)

Yahi เป็นตัวแยกวิเคราะห์ล็อกหลากหลายให้สกัดเริ่มต้นสำหรับ Apache / lighttpd
คำสั่งการใช้งานสาย
ตัวอย่างของข้อมูลแจงกับ Yahi: http://wwwstat.julbox.fr/
การใช้งานที่ง่ายที่สุดคือ:
speed_shoot -g / usr / local / ข้อมูล / GeoIP / var / www / Apache / การเข้าถึงล็อก *
ก็จะกลับ JSON ในรูปแบบ:
{
& nbsp; "by_date": {
& nbsp; "2012/05/03": 11
& nbsp;}
& nbsp; "total_line": 11,
& nbsp; "ip_by_url": {
& nbsp; "/ favicon.ico": {
& nbsp; "192.168.0.254": 2,
& nbsp; "192.168.0.35": 2
& nbsp;}
& nbsp; "/": {
& nbsp; "74.125.18.162": 1
& nbsp; "192.168.0.254": 1
& nbsp; "192.168.0.35": 5
& nbsp;}
& nbsp;}
& nbsp; "by_status": {
& nbsp; "200": 7,
& nbsp; "404": 4
& nbsp;}
& nbsp; "by_dist": {
& nbsp; "ไม่ทราบ": 11
& nbsp;}
& nbsp; "bytes_by_ip": {
& nbsp; "74.125.18.162": 151,
& nbsp; "192.168.0.254": 489,
& nbsp; "192.168.0.35": 1093
& nbsp;}
& nbsp; "by_url": {
& nbsp; "/ favicon.ico": 4
& nbsp; "/": 7
& nbsp;}
& nbsp; "by_os": {
& nbsp; "ไม่ทราบ": 11
& nbsp;}
& nbsp; "week_browser": {
& nbsp; "3": {
& nbsp; "ไม่ทราบ": 11
& nbsp;}
& nbsp;}
& nbsp; "by_referer": {
& nbsp; "-": 11
& nbsp;}
& nbsp; "by_browser": {
& nbsp; "ไม่ทราบ": 11
& nbsp;}
& nbsp; "by_ip": {
& nbsp; "74.125.18.162": 1
& nbsp; "192.168.0.254": 3,
& nbsp; "192.168.0.35": 7
& nbsp;}
& nbsp; "by_agent": {
& nbsp; "Mozilla / 5.0 (X11; อูบุนตู; Linux x86_64; rv: 12.0) Gecko / 20100101 Firefox / 12.0 gzip (GFE) (ผ่าน tr​​anslate.google.com)": 1
& nbsp; "Mozilla / 5.0 (X11; อูบุนตู; Linux x86_64; rv: 12.0) Gecko / 20100101 Firefox / 12.0": 10
& nbsp;}
& nbsp; "by_hour": {
& nbsp; "9": 3,
& nbsp; "10": 4
& nbsp; "11" 1
& nbsp; "12": 3
& nbsp;}
& nbsp; "by_country": {
& nbsp; "": 10,
& nbsp; "สหรัฐฯ": 1
& nbsp;}
}
ถ้าคุณใช้:
speed_shoot -f CSV -g / usr / local / ข้อมูล / GeoIP / var / www / Apache / การเข้าถึงล็อก *
ผลของคุณคือ:
by_date, 2012-5-3,11
total_line, 11
ip_by_url / favicon.ico, 192.168.0.254,2
ip_by_url / favicon.ico, 192.168.0.35,2
ip_by_url, / 74.125.18.162,1
ip_by_url, / 192.168.0.254,1
ip_by_url, / 192.168.0.35,5
by_status, 200.7
by_status, 404.4
by_dist ที่ไม่รู้จัก, 11
bytes_by_ip, 74.125.18.162,151
bytes_by_ip, 192.168.0.254,489
bytes_by_ip, 192.168.0.35,1093
by_url / favicon.ico 4
by_url / 7
by_os ที่ไม่รู้จัก, 11
week_browser, 3, ไม่รู้จัก, 11
by_referer, -, 11
by_browser ที่ไม่รู้จัก, 11
by_ip, 74.125.18.162,1
by_ip, 192.168.0.254,3
by_ip, 192.168.0.35,7
by_agent "Mozilla / 5.0 (X11; อูบุนตู; Linux x86_64; rv: 12.0) Gecko / 20100101 Firefox / 12.0 gzip (GFE) (ผ่าน tr​​anslate.google.com)" 1
by_agent, Mozilla / 5.0 (X11; อูบุนตู; Linux x86_64; rv: 12.0) Gecko / 20100101 Firefox / 12.0,10
by_hour, 9,3
by_hour, 10.4
by_hour, 11.1
by_hour, 12,3
by_country ,, 10
by_country สหรัฐอเมริกา 1
ดีผมคิดว่ามันไม่ได้ทำงานเพราะคุณต้องเรียก GeoIP แฟ้มข้อมูล:
wget -O- "http://www.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz" | zcat> /usr/local/data/GeoIP.dat
ของหลักสูตรนี้เป็นฐานข้อมูล geolit​​e ผมไม่ได้มีข้อมูลในแพคเกจตั้งแต่ GeoIP ต้องมีการปรับปรุงมักจะอยู่ที่ถูกต้อง
เส้นทางเริ่มต้นสำหรับ GeoIP ข้อมูล / GeoIP.dat
ใช้เป็นสคริปต์
ยิงความเร็วในความเป็นจริงแม่แบบของวิธีการใช้ Yahi เป็นโมดูล:
#! / usr / bin / หลาม env
จากการนำเข้า archery.bow Hanky​​u เป็น _dict
จากรอยนำเข้า Yahi ยิง
จากวันที่และเวลาวันที่และเวลานำเข้า
บริบทบาก = ()
date_formater = แลมบ์ดา dt: "% s-% s-% s"% (dt.year, dt.month, dt.day)
context.output (
& nbsp; ยิง (
& nbsp; บริบท
& nbsp; ข้อมูลแลมบ์ดา: _dict ({
& nbsp; 'by_country': _dict ({ข้อมูล ['_ ประเทศ']: 1})
& nbsp; 'by_date': _dict ({date_formater (ข้อมูล ['_ datetime']): 1})
& nbsp; 'by_hour': _dict ({. ข้อมูล ['_ datetime'] ชั่วโมง: 1})
& nbsp; 'by_os': _dict ({ข้อมูล ['_ os_name']: 1})
& nbsp; 'by_dist': _dict ({ข้อมูล ['_ dist_name']: 1})
& nbsp; 'by_browser': _dict ({ข้อมูล ['_ BROWSER_NAME']: 1})
& nbsp; 'by_ip': _dict ({ข้อมูล ['ip']: 1})
& nbsp; 'by_status': _dict ({ข้อมูล ['สถานะ']: 1})
& nbsp; 'by_url': _dict ({ข้อมูล ['uri']: 1})
& nbsp; 'by_agent': _dict ({ข้อมูล ['ตัวแทน']: 1})
& nbsp; 'by_referer': _dict ({ข้อมูล ['referer']: 1})
& nbsp; 'ip_by_url': _dict ({ข้อมูล ['uri']: _dict ({ข้อมูล ['ip']: 1})})
& nbsp; 'bytes_by_ip': _dict ({ข้อมูล ['ip']: int (ข้อมูล ['ไบต์'])})
& nbsp; 'week_browser'. _dict ({ข้อมูล ['_ datetime'] ธรรมดา ():
& nbsp; _dict ({ข้อมูล ["_ BROWSER_NAME"]: 1})})
& nbsp; 'total_line': 1
& nbsp;})
& nbsp;)
)
การติดตั้ง
เรื่องง่ายเหมือนการ:
PIP ติดตั้ง Yahi
หรือ:
easy_install Yahi
recommanded การใช้งาน
- สำหรับการรวมเข้าสู่ระบบขั้นพื้นฐานฉัน recommand ใช้บรรทัดคำสั่ง;
- สำหรับหนึ่งตัวชี้วัดยิงผมขอแนะนำให้คอนโซลโต้ตอบ (bpython หรือ ipython);
. - สำหรับตัวชี้วัดที่เฉพาะเจาะจงหรือตัวกรองที่ซับซ้อนผม recommand ใช้ API

ต้องการ

  • หลาม

ซอฟแวร์อื่น ๆ ของนักพัฒนา Julien Tayon

gof
gof

20 Feb 15

ความคิดเห็นที่ yahi

ความคิดเห็นที่ไม่พบ
เพิ่มความคิดเห็น
เปิดภาพ!