Prometheus Push Gateway - push

I'm trying to set up a push gateway to connect to my Prometheus instance and I receive the following error...
No connection could be made because the target machine actively refused it.
Any ideas?
PS - I'm trying to connect using an AWS instance as I'm using an RDP (Windows)

Too fewer pieces of information
If you have an application that needed to send data to Prometheus, you can use a pushgateway.
Usually is Prometheus reading metrics from your application, but, if you need to send the metrics you set up the pushgateway: the information will be sent on port 9091
Try to better describe your problem to get a more detailed help.

Related

Connecting grafana (outside service mesh) to datasource inside the service mesh

When trying to add a Postgresql data source (running inside the service mesh/ with sidecar) to Grafana (running outside service mesh/ without sidecar), a connection cannot be established, however it is able to translate the fully qualified domain name ({app}.{namespace}.svc.cluster.local) into the correct IP address for the service.
I have attempted pinging the grafana pod from the Postgres pod by exec-ing in, which times out but correctly translates the FQDN to the IP address.
Postgres logs do not show any errors or connection attempts, grafana logs show a 500 error when trying to "Save & Test" the datasource in the grafana dashboard.
Expected behaviour is a successful connection to the datasource, would I have to configure a certain istio object to enable the out-of-service-mesh dashboard/pod to access the in-service-mesh datasource/pod.
You can use PERMISSIVE mTLS mode - see https://istio.io/docs/tasks/security/mtls-migration/.

Failed to connect with mysql using google data fusion

I failed to connect to MySQL from google data fusion
the step:
First, I add the connector
https://dev.mysql.com/downloads/file/?id=462850
Second, I try to add a connection (failed)
screenshot of the MySQL:
Communications link failure The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
**** Edit **** I think this is associated with allowing data fusion to access to our production data
my second question is:
How can I know what is the Google Data Fusion IP address?
if someone can help me that will be wonderful
thank you
This error indicates that Cloud Data Fusion is unable to connect to mysql via JDBC with the given credentials (Host/port/User). You will need to ensure that the user provided can connect from any host. To trouble shoot this further, please do the following:
SSH to the mysql box and run netstat -tln and confirm if the port where mysql is running on is 3306
Login to mysql using Mysql CLI or a workbench tool and run the following
SHOW DATABASES to list all the Databases in mysql and see if the one you are accessing is present
Ensure that the user that is accessing mysql from Data Fusion can access from any hosts by running SHOW GRANTS FOR 'username'#'%'
Here are some additional articles that might help with troubleshooting. https://serverfault.com/questions/89955/unable-to-connect-to-mysql-through-jdbc-connector-through-tomcat-or-externally
Even if you try to access via public IP it'll not work. I had the same issue. Because you have to enable VPC peering between the Datafusion tenant project id with your VPC.
Detailed steps are here: https://cloud.google.com/data-fusion/docs/how-to/create-private-ip

Connection to Google Cloud SQL via proxy works in all scenarios except via socket in Docker container

Hopefully I'm doing something wrong, I've read all documentation and scoured forums but can't seem to get to the bottom of an issue I'm experiencing. I'm using OSX btw.
Things that are working:
Connect to cloud SQL from local OS using proxy via either TCP or Socket
Connect to cloud SQL from local OS using proxy in container via TCP
Connect to cloud SQL from GKE using proxy in the same pod via TCP
Things that are not working:
Connect to cloud SQL from local OS using proxy in contain via sockets
Connect to cloud SQL from GKE using proxy in the same pod via socket
I suspect both of these problems are actually the same problem. I'm using this command to run the proxy inside of the container:
docker run -v [PATH]:/cloudsql \
gcr.io/cloudsql-docker/gce-proxy /cloud_sql_proxy -dir=/cloudsql \
-instances=[INSTANCE_CONNECTION_NAME] -credential_file=/cloudsql/[FILE].json
And the associated socket is being generated with the directory. However when I attempt to connect I get the following error:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/cloudsql/node-sql:us-central1:nodedb' (61)
The proxy doesn't generate a new line when I try to connect which makes me think that it's not receiving the request, it simply says Ready for new connections and waits.
Any idea what's going wrong, or how I could troubleshoot this further?
For "Connect to cloud SQL from GKE using proxy in the same pod via socket" can you please follow the tutorial at https://cloud.google.com/sql/docs/mysql/connect-kubernetes-engine? We have a working WordPress example there that has the cloudsql-proxy as a sidecar container (i.e. in the same Pod, but over TCP).
I don't think you can do "in the same pod via socket" unless you’re running multiple processes in a single container (which you shouldn’t as a best practice). If you do a sidecar container, you can use TCP, so you don’t need a unix socket (moreover, I'm not sure how you’d share files between containers of a Pod).
Also, the docker run -v /local.sock:/remote.sock (I think) will be creating a file/directory locally as /local.sock and making that available inside the container as /remote.sock. This might not work because the docker-engine doesn't know that /local.sock is meant to be a Unix socket and it creates a regular file.

How to connect acheive TCP Socket Connection to Amazon EC2 Cloud Instance

We are using TCP socket connection to send messages from one PC to another PC. Now, we have migrated our project to a cloud environment. It is possible to send messages from our own PC to the Amazon Cloud Instance. I have already tried this but I am unable to get the response in EC2 instance and also checked it by disabling firewall but no use. Please help me. Does anyone know how to achieve TCP Socket connection using Amazon EC2?
What are the settings of the security group of your aws instance?
Verify that you have allowed inbound traffic.
Check the below link on AWS security groups to know how to configure:
Amazon EC2 Security Groups .

Google Cloud SQL VM refusing connection

I have been stuck trying to figure out why my Cloud SQL VM is refusing my connection from my machine (whom ip address I have added as a subnet). I cann SSH into the VM but i cannot access the VM from a browser to make SQLs. I have scoured the internet for days trying to find a fix but i cannot seem to get pass this point. My apache listens to port 80. Also Id like to add that I have been connecting to my Mysql db for months through php and making sqls so I do not believe the problem is with apache. However if it is please point me to where i should be looking.
It sounds like you have MySQL running on a GCE VM, not an actual CloudSQL instance (that is a different service from GCE). Is that right?
If so, then if you are trying to connect from your local machine directly to the mysql instance, you are probably getting blocked by the firewall. Go to the networks tab (under Compute Engine) on the cloud console and see what firewall rules you have enabled. You might need to add one for 3306 or whatever port you are using.