Posts

Showing posts from September, 2022

Redis user permissions (ACL) and python connection

 Recently, I was working on setting up a redis cluster along with separate users for readwrite and readonly. I setup the readonly user using the below privileges (ACLs):   user redisreadonly on >mySuperSecretPassword ~* resetchannels -@all +@read +ping +asking   Once this is setup, I wrote a simple program in python to connect to the redis cluster using the readonly credentials and print the number of keys.   #!/usr/bin/env python3 """ pip3 install redis """ from redis.cluster import RedisCluster, ClusterNode # ─────── Cluster connection ─────── startup_nodes = [ ClusterNode("redis_host_1", 6379), ClusterNode("redis_host_2", 6379), ClusterNode("redis_host_3", 6379) ] rc = RedisCluster(startup_nodes=startup_nodes,decode_responses=True,username='redisreadonly',password='mySuperSecretPassw...

Grafana and Oracle database - Part 3 - Installation of Telegraf Agent

Download the telegraf agent here (current version: 1.24.1): I prefer to directly download and use the executable rather than installing it (using rpm) because to install the rpm version, one would, of course, need root privileges (I don't want to go through that pain, if you know what I mean).   Download the executable (tar.gz) and unzip it. $ pwd <TELEGRAF_GUNZIP_UNTAR_PATH>/telegraf-1.15.3/usr/bin $ ls -lrt total 68112 -rwxr-xr-x 1 <user> <group> 69743232 Sep 11 12:48 telegraf Ensure that the Telegraf executable is in the PATH variable: $ pwd <TELEGRAF_GUNZIP_UNTAR_PATH>/telegraf-1.15.3/usr/bin $ export PATH=`pwd`:$PATH $ whereis telegraf telegraf: <TELEGRAF_GUNZIP_UNTAR_PATH>/telegraf-1.15.3/usr/bin/telegraf $ telegraf --version Telegraf 1.15.3 (git: HEAD fac81815)   Configure telegraf to monitor CPU, Memory, Network, Swap and Disk and write the output to influxdb. $ <TELEGRAF_GUNZIP_UNTAR_PATH>/telegraf-1.15.3/usr/bin/ telegraf --input...

Popular posts from this blog

Interesting Oracle Applications (EBS) Interview Questions

Modify retention period of workflow queues

Check if UTL_FILE and FND_FILE are working fine