You would like to tail the Vault auth log files, but if you use the vault tag for auditing and your server is also named vault, you cannot filter out the vault auth logs only.
Use the client_login as the filter in grep:
ubuntu @ vault1 : ~ $ sudo tail - f / var / log / auth . log | grep 'client_token'
You are trying to build a QEMU image with Packer, but you are getting the error suggesting to use the PACKER_LOG=1 option. But there is no indication where to place it in the command line.
Put it at the begging of the command line as folows:
kosmas : terraform ( add_vault * % ) $ PACKER_LOG = 1 packer build vault_orchestration / template . json
You would like to test worldPing (https://worldping.raintank.io/worldping/) in your local environment for evaluation purposes.
Install Grafana with docker as described here (https://grafana.com/docs/grafana/latest/installation/docker/) and give it a name (ie grafana) Login to the grafana container and install the worldPing plugin:
$ docker exec - it grafana / bin / bash bash - 5.0 $ grafana - cli plugins install raintank - worldping - app
Exit from the container and stop and start it
bash - 5.0 $ exit $ docker stop grafana $ docker start grafana
Login to your grafana installation on the browser (localhost:3000) and go to the section for the plugins to find worldPing To be able to enable it you will need an API key from Grafana Cloud, so create a free account (https://grafana.com/signup/starter/connect-account) Create an API key (Security – API Keys – Add API Key) Go back to Grafana web UI and add the API key so you can enable the worldPing. Add an endpoint to check and select the services to check (DNS, Ping, HTTP, HTTPS) Leave it running for a few minutes and check the dashboards afterwards. Remember to Disable if you want to go back to it again in the near future, or Destroy the endpoint if you do not need it anymore.
You would like to start using Terraform Cloud and when trying to initialize it with the new remote backend (app.terraform.io), you get the following error:
Error: Required token could not be found
Make sure you configured a credentials block for app.terraform.io in your CLI
Follow the instructions here
https://www.terraform.io/docs/cloud/free/index.html and create a file ~/.terraformrc (in linux) with an API token.
You would like to get a list of the available images in Digital Ocean, in order to be able to use them in creating your Terraform IAC script.
By installing the command line tool doctl, (instructions
here), according to the documentation (after authenticating) you can run:
But the available images are not listed. In order to be list all the images you have to add the –public option (as described
doctl compute image list -- public
When trying to configure nullmailer you may end up with many test emails that end up in the queue, that you don’t want to keep trying to send, but to delete them.
Clear the nullmailer queue by running:
rm / var / spool / nullmailer / queue / *
You would like to know the IP for a running Docker container.
Run the following two commands (taken from
docker inspect container_name | grep IPAddress
You run a query in PostgreSQL that takes a lot of time to finish (maybe because of an error) and you want to stop/kill it as it is blocking other queries in db.
You will need to find the pid for the query, either by using a GUI program like Pgadmin or by issuing the following to an SQL prompt:
select * from pg_stat_activity
make a note of the pid of the query that you want to stop/kill and issue the following:
select pg_cancel_backend ( pid )
You have a Xen virtual machine and the system clock regularly drifts off daily (not synchronised).
Use the instructions from
here to synchronise the VM clock with the host.
Having started to use docker recently, some of the commands that are needed are a bit difficult to remember. I’m sure that this will change the more that I use it, but as a quick reminder/look up for this initial phase, I’m just going to list some of them here.
List current images:
List currrent running containers:
Saving the state of a container by using the id from above command:
sudo docker commit - m "latest state comment" - a "John Somebody" 7ed30_id_no new_name_of_container : v2
Starting a container with port forwarding:
sudo docker run - p 8000 - t - i new_name_of_container : v2 / bin / bash
Sharing a directory from the host system (/home/user/Prog) inside the container (Prog):
sudo docker run - p 8000 - v / home / user / Prog : / Prog - t - i new_name_of_container : v2 / bin / bash