Integrating Google Cloud Monitoring with Heroku PostgreSQL - postgresql

I host a PostgreSQL database on Heroku but most of our operations is focused in Google Cloud, for instance Logging and Monitoring.
Heroku exposes some useful information in their dashboard as well via the addons, but I would love to get the statistics into Google Cloud Monitoring, which is not supported.
I know there's a way to install Ops Agent and configure it to collect PostgreSQL logs, but it's aimed for Google Cloud VMs.
Is there a way to connect it to a PostgreSQL instance on Heroku? Can I install it in Heroku dyno? Maybe there's some other way to pipe Heroku's PostgreSQL diagnostics to Google Cloud?

Related

How to connect to Google cloud VPC from on-premise machine

I have a VPC called 'subnet-1' where I have 3 VM Instances and 1 SQL Instance (Postgresql to be precise). All of them with no Public IP, just Private IP. They are in a kubernetes cluster.
The requirement I have is to be able to connect to the VPC from my on-premise PC in order to use some SQLClient to connect to the PG and see the data, I have read about CloudVPN but don't know how to configure it to have what I want... does anyone of you ever done some configuration like that?
You can use Cloud VPN but that is a site-to-site VPN that requires supported routers and solid knowledge of routing, networking and VPNs.
Using third-party VPNs with Cloud VPN
For small businesses or home based developers that only need to connect a few users to a VPC, use an open source product like OpenVPN. Google Marketplace offers a deployable configuration for your project with a click configuration. Simple and easy to deploy.
Google Cloud Marketplace OpenVPN
In order to connect to Kubernetes Cluster from your on-premises networks you can use Cloud VPN. The configuration of Cloud VPN with the Cluster and On-Premise network is documented here.

Service broker for kubernetes catalog, simple implementation for google cloud shell

I am trying to implement Azure osba service broker on google cloud shell to interact with google cloud kubernetes and Azure services, but i am not able to run it and always commands are ending in some error.
I have installed helm and service catalog also. Please suggest me any simple service broker for google cloud shell which i can implement easily for demo purpose. Can i use Google shell cloud MySQL ( GCP)? Please provide any information in form of website link or github.
You can use config connector to manage your Google Cloud Platform (GCP) resources through Kubernetes configuration as Google cloud platform service broker is deprecated.
This documentation will help you to get started with config connector by managing a cloud spanner instance. You can also refer to this repository that contains sample applications and resources like PubSub for use with Config Connector

Configure Postgres container logs to be sent to GCP Stackdriver

I'm using GKE (Google Kubernetes Engine) on Google Cloud, and I have a Postgres container.
I want to configure Postgres to send its logs to Stackdriver in JSON format.
I did not find documentation for this, and I'm a newbie in Postgres. How can I do this?

Connect Google Cloud Run to MongoDB Atlas

I'm evaluating a move from Google Kubernetes Engine to Google Cloud Run, to improve cost and resource efficiency within our company. I'm also in the process of transitioning our workflows from monolithic PHP and Ruby apps to a more nimble Node.js setup, using MongoDB.
For a small organization like ours, I like the idea of managed services such as Google Cloud Run and MongoDB Atlas, however, I'm concerned about the security. In MongoDB Atlas, it seems the only real security measure is to whitelist IP, which I obviously don't have access to through Google Cloud Run.
I'm definitely not a network expert, so I'm wondering if anyone has any ideas for securely connecting Cloud Run to MongoDB Atlas, while still maintaining scalability. If I have to remain on GKE, so be it, I just want to know all of my options before I move forward.
IP whitelist - by its very nature, Google Cloud Run would seem to be anti-static-IP, so this seems to be a non-starter.
I evaluated items such as Cloud NAT and Cloud VPC Peering, but from what I can tell Cloud Run does not have access to the VPC, so it seems like this wouldn't help either.
Cloud Run and Cloud Function have the same underlying infrastructure. Cloud Function have the capability to be connected to a VPC. Thereby, Cloud Run will support a day this capability, I hope by the end of 2019.
If you can, I just recommend you to wait!
Update (October 2020): Cloud Run has now launched VPC egress feature that lets you configure a static IP for outbound requests through Cloud NAT. You can follow this step by step guide in the documentation to configure a static IP to connect to MongoDB Atlas.

Google Cloud SQL - Service Account

I am following the link below to create a Cloud SQL Proxy.
https://cloud.google.com/sql/docs/mysql/connect-container-engine
When I get to the step to create the service account, I am unable to see any Cloud SQL roles, even though I have a MySQL instance associated with the project and I have enabled Cloud SQL administration API as described in the previous step.
Also, the whole process seems to be quite long-winded. Is there a way to connect directly from the container cluster to Cloud SQL without using the proxy? If yes, how do I find the IP address of the Cloud SQL instance? Also, how do I get the container cluster IP to white-list?
Many thanks