Posts

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 2B - Influx CLI, Influx DB and measurements

The next logical step is to get ourselves familiar with the influx CLI, create a brand new DB and a separate user with all privileges on that database. First, login to influx CLI and create an admin user. If you don't, Influx DB won't allow you to perform any query before doing so. NOTE: You may also substitute the actual hostname in place of localhost . $ influx -host localhost -port 8086 Connected to http://localhost:8086 version 1.5.5 InfluxDB shell version: 1.5.5   > show databases ERR: error authorizing query: create admin user first or disable authentication Warning: It is possible this error is due to not setting a database. Please set a database with the command "use <database>".   > use _internal ERR: error authorizing query: create admin user first or disable authentication DB does not exist!   > create user admin with password 'Welcome4321' with all privileges;   > auth username: admin password:   > show databases; name: databas...

Grafana and Oracle database - Part 2A - Installation of Influx DB

I am currently on InfluxDB v1.5, which you can download from here here . Of course, I do understand that it isn't the latest version (current version, as on date, is 2.4). However, there are significant changes in InfluxDB v2.0 and above, which I haven't yet gotten around to implementing. I prefer to download the tar.gz file and use the compiled executable as Oracle software owner (oracle) user - for obvious reasons, I don't want to perform yum/apt-get install (I don't want to do anything with root user 😊). You may use wget to download the binaries to the desired location. Refer the documentation for installation details. NOTE: If possible, get a OS user - influxdb (or similar user) created. Else, use the Oracle software owner OS user (in my case - oracle). $ whoami oracle $ mkdir -p /oracle/influxdb $ cd /oracle/influxdb $ wget https://dl.influxdata.com/influxdb/releases/influxdb-1.5.5_linux_amd64.tar.gz --2022-09-19 05:17:29--  https://dl.influxdata.com/influxdb/re...

Popular posts from this blog

EXCEPTION_ACCESS_VIOLATION in Jinitiator and IE crashes

Version of mod_security with EBS 11.5.10.2

Read a file and extract specific lines using Native Ansible Modules