make_combined_log.pl(1)

πŸ’– make_combined_log.pl(1) πŸ’–

okay bestie, buckle up, this is the make_combined_log.pl manual β€” a General Commands Manual situation, and it's giving extremely useful chaos. let's go πŸ¦‹


✨ NAME ✨

make_combined_log.pl β€” make combined logfile from SQL database. yes that's the whole vibe. logfile. from SQL. combined. slay πŸ’…


🌸 SYNOPSIS 🌸

make_combined_log.pl <days> <virtual host>

two args, that's it, iconic. πŸ‘‘


πŸŽ€ DESCRIPTION πŸŽ€

so this perl script goes into a MySQL database, pulls out the httpd access data, and formats it properly so that 3rd-party log analysis tools can parse it. it's giving "translator between two worlds" honestly 🌈

the script is meant to be run out by cron. its commandline arguments tell it:

  1. how many days' worth of access records to extract
  2. which virtual_host you're interested in

(that second one matters bc many people log several virthosts into one MySQL db, and we are NOT about to mix them up, no ma'am πŸ™ˆ)

and the best part? this means you can run it daily, weekly, every 9 days β€” whatever you decide. your schedule, your rules, main character energy fr fr ✨


⭐ NOTE ⭐

when we say "days" we mean "chunks of 24 hours prior to the moment this script is run."

so like… if you run it at 4:34 p.m. on the 12th, it will go back through 4:34 p.m. on the 11th. it's not "midnight to midnight", bestie, it's exactly 24 hours before right now. clock math, not calendar math. πŸ’€


πŸ’€ KNOWN ISSUES πŸ’€

okay so here's where we keep it real:

  • because GET and POST are not discriminated in the MySQL log, we'll just assume that all requests are GETs. this should have negligible effect on any analysis software. it could be remedied IF you stored the full HTTP request in your database instead of just the URI β€” but that's going to cost you a LOT of space really quickly… like, a lot a lot. 😭
  • because this is somewhat of a quick hack, it doesn't do the most robust error checking in the world. so like…
🚨 bestie please β€” run it by hand to confirm your usage before putting it in crontab. do not rawdog this into a cron job. i'm begging. 🫢

πŸ‘‘ AUTHOR πŸ‘‘

Edward Rudd <eddie@omegaware.com>


🧚 MAN PAGE CREATED BY 🧚

Michael A. Toth <lirul.lists@gmail.com> β€” based on comments of script. a real one for this. πŸ’œ


πŸ’… COMMENTS πŸ’…

this man page was written using xml2man (1) by the same author. yes, the man page about the script was made by the same person as the script-adjacent stuff. it's giving full-circle. we love to see it. 🌟


and that's the whole page, bestie!! this lil gem comes to you from the Manuals collection, sitting in the User section, and its official name-tag is make_combined_log.pl(1). go forth and combine those logs. periodt. πŸŽ€πŸ¦‹βœ¨