Connection refused when using http monitoring with blackbox_exporter and prometheus


You are trying to set up http endpoint monitoring with prometheus and blackbox_exporter by specifying something like the following:

but you are getting the error (in prometheus targets) that connection was refused.


First specify the ip protocol as ip4 if you are not using ip6 like:

And then make sure that you use the container IP address in the replacement field if you have started blackbox_exporter as a docker container (tip taken from here), which you can find by looking for the container IP address (docker inspect blackbox_exporter | grep IPAddress).

So your prometheus configuration should look like the following (different replacement IP):

Using a primary key not named id with Ecto and Mysql


You would like to use a legacy or a database you don’t have control over, with Phoenix, but the primary key of the table it is not named ‘id’.


You can define the primary key using the @primary_key as in:

Taken from here

Grafana with github authentication problem


You are trying to use the github OAuth authentication for having users login to your Grafana but there is an error that redirect_uri must match that is coming from Github.


Make sure that you add a line with the root_url in your /etc/grafana/grafana.ini file that has the same IP/domain name as your server, and restart the service.

ERROR 1290 (HY000): The MySQL server is running with the –secure-file-priv option so it cannot execute this statement


You want to export a MySQL database table as a csv with something like:

but you get the error that MySQL cannot execute this command.


Find out the location that MySQL can use to export files by running the following:

and then use the path to change the outfile path (ie /var/lib/mysql-files/table_name.csv).

Taken from the answer here

To enable extensions, verify that they are enabled in those .ini files:


You are trying to install the dependencies in a PHP Symfony project, but you get an error about enable extensions in ini files.


Make sure that you install the correct packages for the PHP version you are using. So installing php-curl while using PHP 7.1 results in the error.
When installing php7.1-curl the installation completes successfuly.

Docker Cloud moving one node from one account to another


You have used ‘Bring your own node’ to use a server with one account, but you want to change the account and move the node to the new one.


Use your old account to terminate the node or login to the server and use the following to stop the running dockercloud-agent:

Go to the Docker Cloud web ui interface, and use the 'Bring your own node'. Copy the token that appears after the sudo -H sh -s on the popup window.

On the server update the token with the one from the new account that you just copied, by running the following:

And now restart the dockercloud-agent on the server:

You should now be able to see 'Node xxxx detected' on the Docker Cloud web ui after a couple of minutes.