Skip to content
Advertisement

Tag: logging

How to log every single command executed from shell script

I am trying to find a way to record every single command that is executed by any user on the system. Things that I have came across earlier. It is possible to view shell commands executed from the terminal using ~/.bashrc_history file. There is a catch here, It logs only those commands which were executed interactively from bash shell/terminal. This

Options for getting logs in kubernetes pods

Have few developer logs in kubernetes pods, what is the best method to get the logs for the developers to see it. Any specific tools that we can use? I have the option of graylog, but not sure if that can be customized to get the developer logs into it. Answer The most basic method would be to simply use

how to customize ssh log?

Goals of my ask: Implement a fail2ban which ban user. (For this I have a solution) Work environment: I connect to my machines with ssh-key protect with a password When a user type a wrong password for his ssh-key thrice I want to ban it for prevent attack Fail2ban parsed logs in /var/log/messages. Actually I have enable LogLevel DEBUG2 on

How to remove/modify syslogd message’s header?

I’m currently use the syslogd of busybox for logging some information. However, I’m unable to modify the message’s header. I log the message like this: And I got this output: I want to replace message’s header with epoch time format like this: Or is there any way to completely remove the message’s header so I could manually add the epoch

How to log to /var/log/mail.log using rsyslogd?

I am currently playing around with logging under Linux. I have made the following very simple test application (in plain C): This “application” compiles, and when I execute it, it generates an entry in /var/log/syslog, but no entry in /var/log/mail.log and no entry in /var/log/mail.err. Could somebody please explain why? I am using rsyslogd on the test machine; this is

No activity on server with logging every 5 seconds

Recently I have notices that log files on my server grow faster than I was expecting. After a quick look I have realized that it is wtmp what aggressively is taking my disk space. Using utmpdump command (see below) I found out that every 5 seconds new 3 or 4 logs are recorded. There is no load on the server:

Advertisement