Randomly Expressed

About

Welcome to my blog “randomly expressed”. I created this website to publish helpful tips. It’s mainly technology driven, but I will blog about other topics. I am a Unix sysadmin that is always looking to learn new things. My goal is to be able to share knowledge that others may find useful. xkcd.com

Continue Reading »

Contact

Connect With US

Connect with us on the following social networking sites.

Most Popular Posts.

Add Some Content to This Area

You should either deactivate this panel on the Theme Settings page, or add some content via the Widgets page in your WordPress dashboard.

Deleting AWS Storage Gateway Snapshots

By on July 1, 2017 in Technology with No Comments

If you have a nightly snapshot schedule for your volumes that are attached on an AWS storage gateway or ec2 instances you will start to incur higher charges as the number of snapshots increase over time. Instead of deleting them manually you can use the following bash script to automatically delete snapshots when they reach […]

Continue Reading »

Curator on AWS ES

By on May 12, 2017 in Storage, Technology with 1 Comment

Curator does not work on AWS Elastic Search service for version 5.x. Curator 4 & 5 require access to the /_cluster/state/metadata endpoint in order to pull metadata at IndexList initialization time for all indices. This metadata is used to determine index routing information, index sizing, index state (either open or close), aliases, and more. Curator […]

Continue Reading »

Variable via shell command in Ansible

By on March 19, 2017 in Technology with 1 Comment

The ability to run shell commands and pass the output to a variable will enable you to add more logic to your playbooks. How to set a variable from the output of a shell command in your Ansible playbook? You will need to use the shell module to run your command and then use the […]

Continue Reading »

Data Dog JMX monitoring

By on February 20, 2017 in Technology with 2 Comments

Enabling Data Dog JMX monitoring will allow you to graph several metrics from your JVM applications. In this example I am going to enable JMX monitoring for Atlassian’s confluence server. There are two requirements to get the JMX plugin from data dog to work correctly. Enable JMX on your JVM application. Enable the JMX plugin […]

Continue Reading »

MAC switch port script

By on February 16, 2017 in Technology with No Comments

The following is a bash script to find out what Cisco switch and port your MAC OSX is connected to. It will check if your connected to a Cisco IP phone or a Cisco switch. For those of you that use Cisco IP phones you can daisy chain your internet connection through your phone since […]

Continue Reading »

Nagios Slack messages

By on February 10, 2017 in Technology with No Comments

Configure your Nagios server to post alerts in your Slack channel. Having Nagios alerts come in via Slack is faster than getting Nagios alerts via email. If you want your Slack messages formatted so they look better in your channel replace the SLACK_MESSAGE variable in the script with the line below. SLACK_MESSAGE=”\\\$1\\\” Place the following […]

Continue Reading »

Ansible CentrifyDC Express playbook

By on February 10, 2017 in Technology with No Comments

The following Ansible playbook will install CentrifyDC express via yum or rpm depending on the OS. The CentrifyDC express package allows you bind Linux servers to your Active Directory server. This will allow you to ssh to your Linux servers using your AD credentials and use AD groups for sudoers access. It comes in pretty […]

Continue Reading »

Ansible Slack playbook

By on February 4, 2017 in Technology with No Comments

Creating an Ansible Slack playbook is a great way of posting messages in your slack channel from your various playbook runs. This keeps everyone else in the loop of the changes that are happening. The following is an Ansible playbook that uses the Slack module. The token is derived from your web hook URL that […]

Continue Reading »

AD query for accounts with no logons

By on February 4, 2017 in Technology with No Comments

Auditing your AD accounts regularly is important in order to address security issues. Also it will save you money on licenses for accounts that are not needed. Querying for the last login time is a good start, since it will show accounts that have not been used in a long time. However it will not […]

Continue Reading »

Bulk changes to AD accounts

By on February 2, 2017 in Technology with No Comments

A Window’s batch script for making changes to AD user account attributes in bulk. # Import AD Module Import-Module ActiveDirectory write-Host ‘Starting to update AD Attributes…….’ -NoNewline -ForegroundColor Yellow # Import CSV into variable $users $users = Import-Csv -Path C:\Users\admin\Documents\users.csv # Loop through CSV and update users if the exist in CVS file foreach ($user […]

Continue Reading »

Top