пятница, 9 сентября 2016 г.

filebeat vsftpd log to logstash


1. Install
yum install filebeat
OR
rpm -ihv filebeat-1.3.0-x86_64.rpm

2. Add service (optional)
chkconfig --add filebeat

3. Edit /etc/filebeat/filebeat.yml

        - /var/log/vsftpd.log
      input_type: log
      include_lines: ["DOWNLOAD", "UPLOAD"]
      document_type: vsftpd

  logstash:
    hosts: ["logstash.local.net:5044"]

4. Debug and check config
filebeat -d "*" -e -c  /etc/filebeat/filebeat.yml

2016/09/09 06:51:15.252655 publish.go:109: DBG  Publish: {
  "@timestamp": "2016-09-09T06:51:10.766Z",
  "beat": {
    "hostname": "ftp",
    "name": "ftp"
  },
  "count": 1,
  "fields": null,
  "input_type": "log",
  "message": "Fri Sep  9 13:51:06 2016 [pid 8989] [user] OK DOWNLOAD: Client \"10.1.1.1\", \"/share/LIST.TXT\", 210 bytes, 64.31Kbyte/sec",
  "offset": 35301580,
  "source": "/var/log/vsftpd.log",
  "type": "vsftpd"
}
2016/09/09 06:51:15.25

5. Start service
service filebeat start

понедельник, 25 апреля 2016 г.

./runInstaller: line 90: [: too many arguments

Issue

[oracle@oim Disk1]$ ./runInstaller
./runInstaller: line 90: [: too many arguments
head: cannot open `/home/oracle/Oracle' for reading: No such file or directory
head: cannot open `SOA' for reading: No such file or directory
head: cannot open `Suite' for reading: No such file or directory
head: cannot open `11.1.1.6.0/Disk1/stage/shiphomeproperties.xml' for reading: No such file or directory
head: cannot open `/home/oracle/Oracle' for reading: No such file or directory
head: cannot open `SOA' for reading: No such file or directory
head: cannot open `Suite' for reading: No such file or directory
head: cannot open `11.1.1.6.0/Disk1/stage/shiphomeproperties.xml' for reading: No such file or directory
./runInstaller: line 192: [: too many arguments
head: cannot open `/home/oracle/Oracle' for reading: No such file or directory
head: cannot open `SOA' for reading: No such file or directory
head: cannot open `Suite' for reading: No such file or directory
head: cannot open `11.1.1.6.0/Disk1/stage/disk.label' for reading: No such file or directory
ERROR: This version of the installer requires a operating system. Please download the appropriate installer for your operating system, or contact Oracle Support.

Solution:
Don't use spaces in install folder(/home/oracle/soa 11.1.1.6)

вторник, 1 марта 2016 г.

Oracle database .AUD files housekeeping method

Change directory to AUD location

[oracle@db adump]$ ls | wc -l
4125
[oracle@db adump]$ find . -mtime +30 -name "*.aud" | xargs tar -rf aud_archive.tar --remove-files

[oracle@db06 adump]$ ls | wc -l
2495
[oracle@db06 adump]$ ls -l aud_archive.tar
-rw-r--r-- 1 oracle oinstall 2508800 Мар  2 08:34 aud_archive.tar