Tuesday, August 24, 2021

Removing horizontal lines from LibreOffice Writer

1) Either select complete document text (Ctrl + a) or specific paragraph.

2) Select Format -> Paragraph

3) Select "Border" tab and choose 

a) Under Line Arrangement - Select no border preset.

b) Under Properties - Check box "Merge with next paragraph"



4) Then click "Ok"

***

Sunday, August 22, 2021

Datastax Opscenter alert

OpsCenter Alert:

Message: Based on current repair throughput, it appears that the Repair Service will not complete within the specified repair window. Tasks remaining to repair: 3.48 GB. Repair must complete by Sun Aug 29 23:40:27 EDT 2021, which requires throughput of: 5 KB/s; however, the actual throughput is: 3.4 KB/s. Estimated completion is Thu Sep 02 20:35:53 EDT 2021. For more information on tuning the repair service, see http://www.datastax.com/documentation/opscenter/help/repair_services_advanced.html


**Suggested changes:

Below parameter changes are to be done for each cluster_name.conf, max_parallel_repairs is set to the  max replication factor (add all dc factors) for repaired keyspaces, and max_pending_repairs is set to 10x that number.

So, for example, if you had a two DC cluster and each DC used a replication factor of 3 for most keyspaces, what you'd set is:


[repair_service] 

ignore_keyspaces = dse_insights,dse_perf,system_traces,OpsCenter

ignore_tables = keyspace.tablename

incremental_repair_tables = ""

max_parallel_repairs = 6

max_pending_repairs = 60

min_repair_time = 0 

single_repair_timeout = 36000

tokenranges_http_timeout = 300 

time_to_completion_target_percentage = 0


*** 

Sunday, August 15, 2021

tcpdump command for Cassandra

 tcpdump -A -c 2 -n -tttt -i eth0 port 9042 greater 1024

 

-A : ASCI

-c : capture 2

-n : shows ip address instead of domain

-i : interface

-tttt : proper time

port : specify which port

greater : specify byte size


*** 

Wednesday, August 11, 2021

Security concepts

Basic concepts of Security in IT industry.

  • Plain text (No security)
  • CIPHER Text
  • Encryption (Implies Plain text to Cipher text) Usually from sender side
  • Decryption (Implies Cipher text to Plain text) Usually at receiver end
  • Cryptograph is the study of Encryption
  • Cryptanalysis is the study of Decryption
  • Cryptology is study of Encryption and Decryption
  • Keys
Stream Cipher implies Bit by Bit
Block Cipher implies Block by Block and size depends on algorithm

***

Sunday, August 1, 2021

Shell script to monitor Cassandra Database via 'nodetool status' command

Below is the script to monitor the Cassandra Database nodes with nodetool status command.

Schedule to run the script at certain frequency with crontab, possible every 5 Minutes.

#!/bin/bash

#######
# Author : Pramod P
# Purpose: Monitor Cassandra instance
# Date : Created Date
#######


PRIMARY_DBA="primary@primary.com"
ON_CALL_DBA="oncall@oncall.com"
#Create a temporary file with under maintenance with empty content. And uncomment below line when doing some maintenance.
#$MAINT_LOC=/path/to/tmpfile

#Monitor if the node is under maintenance.
if [ -f $MAINT_LOC/under_maintenance ]
then
        echo "==========================="
        echo "$MAINT_LOC/under_maintenance file exists."
        echo "Monitoring script detected so Cassandra instance is in maintenance mode.  Cassandra will not be monitored."
        exit 1
fi

# Monitor Cassandra nodes by nodetool.
DOWN_NO=`/usr/bin/nodetool status | grep UD | wc -l`
echo $DOWN_NO
if [ $DOWN_NO -gt 0 ]
then
        DOWN_HOST=`/usr/bin/nodetool status | grep UD | awk '{print $2}'`
        printf "\n\nCassandra Instance is not running on $DOWN_HOST" | mail -s "Attention >> Cassandra Instance is down on Production" $PRIMARY_DBA $ON_CALL_DBA
        exit 1
fi

***