LogRotate Configuration for Splunk



[root@Server~]# cat /etc/logrotate.conf
# see "man logrotate" for details
# rotate log files monthly
weekly

# keep 6 weeks worth of backlogs
rotate 4

# create new (empty) log files after rotating old ones
create

# use date as a suffix of the rotated file
dateext

# uncomment this if you want your log files compressed
compress

# rotate when the log reaches a set size or the appropriate time has passed
maxsize 500M

# RPM packages drop log rotation information into this directory
include /etc/logrotate.d

# no packages own wtmp and btmp -- we'll rotate them here
/var/log/wtmp {
    monthly
    create 0664 root utmp
        minsize 1M
    rotate 1
}

/var/log/btmp {
    missingok
    monthly
    create 0600 root utmp
    rotate 1
}


[root@Server logrotate.d]# pwd
/etc/logrotate.d
[root@Server logrotate.d]# cat syslog
/var/log/cron
/var/log/maillog
/var/log/messages
/var/log/secure
/var/log/spooler
{
    missingok
    sharedscripts
    postrotate
       /bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true
    touch  /var/log/cron
    touch  /var/log/maillog
    touch  /var/log/secure
    touch  /var/log/spooler
    /usr/bin/setfacl -m g:splunk:r /var/log/cron
    /usr/bin/setfacl -m g:splunk:r /var/log/maillog
    /usr/bin/setfacl -m g:splunk:r /var/log/messages
    /usr/bin/setfacl -m g:splunk:r /var/log/secure
    /usr/bin/setfacl -m g:splunk:r /var/log/spooler
    endscript
}
[root@Server logrotate.d]#

Scanning New LUNs and assigning PVID on ASM disks in AIX

Scanning LUNs:


bash-4.4# cfgmgr

bash-4.4#lspv
hdisk8          none                                None
hdisk9          none                                None
hdisk10         none                                None
hdisk11         none                                None
hdisk12         none                                None
hdisk13         none                                None
hdisk14         none                                None
hdisk15         none                                None
hdisk16         none                                None
hdisk17         none                                None
hdisk18         none                                None

Verify the LUN #


bash-4.4# lscfg -vl hdisk8
  hdisk8           U9009.22A.783BF50-V3-C10-T1-W514F0C500D974E01-L3A000000000000  EMC XtremIO FCP MPIO Disk

        Manufacturer................XtremIO
        Machine Type and Model......XtremApp
        ROS Level and ID............6200
        Device Specific.(Z0)........CKM00191000434
        Device Specific.(Z1)........514F0C50B140017E

Changing the PVID:


bash-4.4# chdev -l hdisk8 -a pv=yes
hdisk8 changed

bash-4.4# lspv | grep -i hdisk8
hdisk8          00c3bf50ca685b15                    None

Updating permissions:

bash-4.4# cd /dev

bash-4.4# chown oracle.asmadmin hdisk8

bash-4.4# chmod 660 hdisk8


bash-4.4# ls -l hdisk8 

brw-rw----    1 oracle   asmadmin     18, 63 Oct 14 13:05 hdisk8

Installation of Jenkins on Linux and Deployment NGINX through Jenkins

Installation of Jenkins: [root@worker1 ~]# useradd -c "jenkins user" jenkins [root@worker1 ~]# passwd jenkins Changing passw...