Tags: syslog

Sort by: Date / Title /

  1. 6 years ago by spirit
    1. #!/bin/sh
    2. append="";
    3. tail -F /opt/log/audit/audit.log | sed -u -e 's/^M//g' -e '/^$/d' -e 's/ *$//g' -e 's/^ *//g' -e 's/ +/ /g'  | while read line; do
    4.         if [ "$line" == "___" ]
    5.         then
    6.                 logger -p local0.info -t tag $append
    7.                 append="";
    8.         else
    9.                 append="$append#$line";
    10.         fi
    11. done
    Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/2155"></script>
  2. 6 years ago by spirit
    1. export PROMPT_COMMAND="${PROMPT_COMMAND:+$PROMPT_COMMAND ; }"'echo $$ $USER "$(history 1)"|logger -p user.alert -t bash_history'
    2. readonly PROMPT_COMMAND
    Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/2153"></script>
  3. 6 years ago by spirit
    <150> represents facility and severity following RC3164 Syslog header use the current timestamp and a random hostname
    1. echo "<150>`env LANG=us_US.UTF-8 date "+%b %d %H:%M:%S"` host`date +%s` service: my special message goes here" | nc 192.168.0.1 -u 514 -w 1
    Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/2143"></script>
  4. sponsorised links
  5. 8 years ago by neorom
    In the format shown above, UDP is used for transmitting the message. The destination port is set to the default auf 514. Rsyslog is also capable of using much more secure and reliable TCP sessions for message forwarding. Also, the destination port can be specified. To select TCP, simply add one additional @ in front of the host name (that is, @host is UPD, @@host is TCP). For example:
    
    
    *.* @@finlandia
    
    To specify the destination port on the remote machine, use a colon followed by the port number after the machine name. The following forwards to port 1514 on finlandia:
    
    
    *.* @@finlandia:1514
    
    This syntax works both with TCP and UDP based syslog. However, you will probably primarily need it for TCP, as there is no well-accepted port for this transport (it is non-standard). For UDP, you can usually stick with the default auf 514, but might want to modify it for security rea-
    sons. If you would like to do that, it's quite easy:
    
    
    *.* @finlandia:151
    Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/2121"></script>
  6. 10 years ago by spirit
    # For IOS devices you might use the following to generate syslog entries for logins:
    
    login block-for 120 attempts 4 within 120
    login on-failure log
    login on-success log
    
    # to generate syslog entries for the executed commands:
    
    archive
    log config
    logging enable
    notify syslog
    hidekeys
    Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/1637"></script>
  7. 11 years ago by spirit and saved by 1 other
    1. # Dans /etc/syslog.conf
    2. facility.priority               @IP ou nom
    Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/46"></script>
  8. 11 years ago by spirit
    1. syslogd -m 0 -r
    Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/45"></script>
  9. 11 years ago by spirit
    1. logger -p facility.priority "your message"
    Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/44"></script>

First / Previous / Next / Last / Page 1 of 1 (8 posteets)