Archive for the ‘Linux’ Category

Copy date stamped backups with a regex & scp

Lets assume you have a directory of date stamped backups you want to scp to another location… backup_20141003.tar.gz backup_20141004.tar.gz backup_20141005.tar.gz backup_20141006.tar.gz backup_20141007.tar.gz backup_20141008.tar.gz backup_20141009.tar.gz scp can accept a regex like below to do this as a one-liner. Note the quotes are required for the expression to work. ?View Code BASHscp "user@hostname:/data/backup/backup_2014100[3-9].tar.gz" /path/to/location/ You should see […]

Modifying elasticsearch index settings

To view the settings of an index run the following at the command-line… ?View Code BASHcurl -XGET http://hostname:9200/indexname/_settings From here you can indeify the setting you need and modify it as you wish. This example sets the number of replicas to zero. ?View Code BASHcurl -XPUT http://hostname:9200/indexname/_settings -d ‘{ "index": {"number_of_replicas":"0"}}’ For further details see […]

EFK: Free Alternative to Splunk Using Fluentd

Here is an updated version of the instructions given atĀ Free Alternative to Splunk Using Fluentd. The installation was performed in CentOS 6.5. 1. Install ElasticSearch mkdir /opt/src cd /opt/src wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.2.1.noarch.rpm rpm -ivh elasticsearch-1.2.1.noarch.rpm /sbin/chkconfig –add elasticsearch service elasticsearch start # Move default file locations if required mkdir /data/elasticsearch mkdir /data/elasticsearch/data mkdir /data/elasticsearch/tmp mkdir /data/elasticsearch/logs […]

Installing Fluentd Using Ruby Gem

Here’s just a little update of the process found here, Installing Fluentd using Ruby Gem on OpenSuSE 12.1 ?View Code BASHzypper install ruby zypper install ruby-devel gem install fluentd –no-ri –no-rdoc cd /etc fluentd1.9 –setup ./fluent vi /etc/fluent/fluent.conf # config file, there’s some forwarding server configured here that you may want to alter or remove […]

CentOS: clvmd startup timed out

I received the following error, on CentOS 6.5, when configuring a High Availability cluster. This also cause the computer to freeze on the os boot. clvmd startup timed out The fix was found here and involved an edit of /etc/lvm/lvm.conf. This required a minor change to the library_dir line as the location of these libraries […]