Rundeck is an awesome tools which we simply impressed recently. It has an inbuilt to run commands, creating jobs, scheduling jobs, etc., Refer our previous posts to know more about rundeck. In this post, we will try to give some example how can we restrict user access to project level.… Continue Reading Rundeck ACL Policy Creation

Consider a scenario, where a jumpbox has port access to a server and your local machine doesn’t have access. Here is a solution that you can apply that will redirect your request to jumpbox and you can access the server using loop back IP address from your local machine.  … Continue Reading Port forwarding using proxypass in local machine

In this post, we will explain how to setup failover on rundeck. Rundeck officially doesn’t supports failover. This approach we tested on Centos 6 and its working fine. Moreover, use this approach on your own risk 😛 Assumption: This post assumes that rundeck is running on host1 listens on port… Continue Reading Rundeck Failover Setup

The following script will help you to create a temporary user on the host and delete all the content associated with the user after 3 hours. These scenario will be working incase if a user wants to access the hosts for sometime, troubleshoot issues, verify logs, etc., Replace variable with… Continue Reading Create temporary User on Linux Host

The following script will help you to upload a file to s3 Bucket. The script initially copy the file Prerequisites: Webserver which support to run php application Composer installed on the hosts AWS access & secret key to upload file File Size should not be more than 1MB Script Setup:… Continue Reading PHP script/WebURL to upload file to s3

As you might know, it stands for Dell Remote Access Card. Working on Dell servers, this tool could be very handy if you are working with hundreds to thousands of server in a day. Here I will share few important and commonly use DRAC CLI commands: racadm get BIOS.BiosBootSettings.bootseq  ⇒ Gets you… Continue Reading Working on Dell DRAC CLI

Log rotation is a way of managing old log files to reduce disk space usage on the server. By default logrotate is invoked once a day using a cron scheduler from location /etc/cron.daily/ grep logrotate.conf /etc/cron.daily/logrotate /usr/sbin/logrotate /etc/logrotate.conf >/dev/null 2>&1 Logrotation is manged by two different configuration files /etc/logrotate.conf [generic… Continue Reading Enabling log rotation on Linux Hosts

Consider scenario on large production system, when a new table is created or an alter table is triggered then we may need to notify few users. We came across a same scenario when the table schema or new table created, we need to notify few users. Assumption: Mysql general query… Continue Reading Send notification when alter, create table event occurs on mysql

Assumption: We have access key and secret key which has a privilege to create snapshot, delete snapshot, list volumes,etc., The script will keep 4 days retention and delete the old backups.   #!/usr/bin/python #Author:Dhanasekaran N #Email:dhanasekaran.n16@gmail.com,support@pheonixsolutions.com #Usage:python create_aws_snapshot.py AWS_TAG_NAME #Version:1.0 #Here come I……. from datetime import datetime, timedelta import datetime… Continue Reading Python Script to take backup of Ec2 Volume with days retention

This post may be useful if we want to keep track what your users are executing on the server. You can write some custom scripts incase of any abnormal activity being done by the user. Add the following line in /etc/bashrc export PROMPT_COMMAND=’RETRN_VAL=$?;logger -p local6.debug “$(whoami) [$$]: $(history 1 | sed… Continue Reading Enable command logging on Linux hosts