Category Archives: Scripts

MariaDB/MySQL slow query log to syslog (and other output modules)

MariaDB (fork of MySQL), with a few lines of configuration, provide a very interesting log regarding application-level query performances: the slow-logs. Sadly, and for a reason I have yet to discover, these logs are not syslog-enabled. Thus, you cannot beneficiate of all the advantages of using the syslog protocol, ie: centralization, backup/archive, parsing, alerting… To [...]

Proper end-to-end syslog logging with Apache httpd

Table of content Context Objectives Folder structures and relevant files Configurations /etc/httpd/conf.d/httpd_base_module.conf /etc/httpd/conf.d/ /opt/fcrouzat/syslog/ /etc/rsyslog.d/zz-10-httpd.conf Remote logging: /etc/rsyslog.d/zz-09-remote-httpd.conf Caveats Conclusions Context For an unknown reason, Apache httpd only supports syslog since 2.4 and only for error logs. On top of that, default log format is very poor and (to me) doesn’t mean anything. Add these [...]

[Updated 2015-03-10] How to work with root shells in a PCI-DSS 10.2.2 compliant environment

Table of content Context and objectives PCI-DSS 10.2.2 How it limits your productivity Solutions PAM Bash PROMPT_COMMAND Concepts How it works Examples of output Context and objectives If you ever worked as a system administrator in a Linux PCI-DSS environment, you know it’s sometimes (often) difficult to administrate your servers from command-line because of PCI-DSS [...]