How to get cost information by VM and used hardware? - google-cloud-platform

I'm new to using GCP, however, I was scared because of the charge, as our GCP environment is still in approval before going into production.
On Compute Engine I saw high values ​​on E2 Instance Core running in Sao Paulo,
SSD backed PD Capacity in Sao Paulo and E2 Instance Ram running in Sao Paulo.
But I can't know exactly which of my VMS in Sao Paulo is generating this cost.
How can I check the monthly amount per VM?
Edit:
I noticed that there are over 100 images in the Machine Images menu within Compute Engine. How can I get the cost of these images?

To check the monthly cost per virtual machine (VM) on Google Cloud Platform (GCP), you can go to the GCP Console and navigate to the "Cost Management" section. From there, you can use the "Costs by Service" report to see the cost breakdown for each of your VMs. You can also filter the report by region, such as Sao Paulo, to see the costs specifically for that region. Additionally, you can use the "Costs by Label" report to categorize your costs by custom labels that you can apply to your VMs, making it easier to understand which VMs are generating the most costs.

Related

How to setup Commitment use discounts on google?

I create a blog on GCP using ghost cms with a bitnami server. I recently found commitment discounts.
I know bitanmi provides a commitment discount on that. But my website is 15 months old maybe for that reason a commitment discount is not added to my bills and my bill amount is very high forme. So that's the reason I try to set up my own commitment discount for my blog.
I config my blog comes to the default configuration. My machine type is g1-small and uses 10 GB storage.
Fill in the information on the commitment page. Them click to purchase button, I face an error.
Creating commitment "commitment-1" failed. Error: invalid value for type Long
Guide me on how to solve it.
Unfortunately you won't be able to use Committed Discounts.
You've mention that you are using g1-small
My machine type is g1-small and uses 10 GB storage
In the Restrictions part you will find:
Committed use discounts do not apply to preemptible VM instances, N1 shared-core machine types, or extended memory.
g1-small is a shared-core machine type. You can confirm it in this docs or in the GCP UI like below (view from Compute Engine)
In Commitment types you can find information on what resources can be committed. On the bottom of this part you also can find information that g1-small cannot be committed.
You can't purchase commitments for f1-micro, or g1-small machine types or for the sole-tenant premium charge.
Regarding storage, only Local SSD disk can be committed and those are 375 GB as per About local SSDs documentation.
Each local SSD is 375 GB in size, but you can attach a maximum of 24 local SSD partitions for 9 TB per instance.
To sum up
With your current setup you are not able to use Committed Discounts. You would need to use different machine type.

Google Committed Use Discount and Zone details

I currently have a Google Compute Engine VM located in Zone us-central1-a. I want to purchase a Committed Use Discount for this VM, but when I visit the signup page, there is no option for us-central1-a, the closest being us-central1.
Will it be necessary for me to move the instance to us-central1 using the information here, or will the purchase of a commitment in us-central1 automatically apply to a VM located in us-central1-a?
Since I plan to make a 3-year commitment, I don't want to make a mistake because I have heard stories about the lack of support from GCP.
us-central1 is the region. us-central1-a is a zone within that region. Committed use discounts are per region.
Committed use discounts work on most Compute Engine machine types,
including predefined and custom machine types. Committed use discounts
are simple and flexible, and require no upfront costs. Discounts apply
to the aggregate number of vCPUs, memory, GPUs, and local SSDs within
a region, so they are not affected by changes to your instance's
machine setup.
Committed use discounts
Google Cloud Video: Committed Use Discounts

Google cloud platform free tier limits from compute engine

In GCP, it is not notified when a virtual machine of with resources higher than the free tier limit is created. An error message of following pattern arises in the notification. So, what is the maximum allowed resourced for Google cloud platform virtual machine?
Create VM instance "instance-2" and its boot disk "instance-2"
Quota 'C2_CPUS' exceeded. Limit: 0.0 in region asia-south1.
As written in the documentation:
Compute Engine
1 non-preemptible e2-micro VM instance per month in one of the following US regions:.
Oregon: us-west1
Iowa: us-central1
South Carolina: us-east1
30 GB-months HDD.
5 GB-month snapshot storage in the following regions:.
Oregon: us-west1
Iowa: us-central1
South Carolina: us-east1
Taiwan: asia-east1
Belgium: europe-west1
1 GB network egress from North America to all region destinations (excluding China and Australia) per month
Your Free Tier e2-micro instance limit is by time, not by instance. Each month, eligible use of all of your e2-micro instances is free until you have used a number of hours equal to the total hours in the current month. Usage calculations are combined across the supported regions.
Google Cloud Free Tier does not include external IP addresses.
Compute Engine offers discounts for sustained use of virtual machines. Your Free Tier use doesn't factor into sustained use.
GPUs and TPUs are not included in the Free Tier offer. You are always charged for GPUs and TPUs that you add to VM instances.
NB: This is subject to changes, check the link for up-to-date information.
Step-by-Step guide to create a free instance:
Create instance
Now go create the instance at https://console.cloud.google.com/compute/instancesAdd
region: us-east1 or one of the region indicated in the documentation.
Select General Purpose -> N2 -> e2-micro. You will see "Your first 744 hours of e2-micro instance usage are free this month"
Select Boot disk -> public image -> ubuntu -> 20.04LS -> boot disk type: Standard persistent disk (HDD) -> size 30gb (or as per documentation)
Allow http and https traffic (or don't check the boxes, if you don't intend to use port 80 and 443)
Click on Create
You can check "view billing report" to make sure you did it right.
You can found more information at the documentation Google Cloud Free Tier:
The Google Cloud Free Tier has two parts:
A 3-month(previously 12) free trial with $300 credit to use with any Google Cloud services.
Always Free, which provides limited access to many common Google Cloud resources, free of charge.
At the section 12-month, $300 free trial you can find Program coverage details:
Your free trial credit applies to all Google Cloud resources, with the
following exceptions:
You can't have more than 8 cores (or virtual CPUs) running at the same time.
You can't add GPUs to your VM instances.
You can't request a quota increase. For an overview of Compute Engine quotas, see Resource quotas.
You can't create VM instances that are based on Windows Server images.
You must upgrade your account to perform any of the actions in the preceding list.
In addition, have a look at the End of the free trial:
The free trial ends when you use all of your credit, or after 12
months, whichever happens first. At that time, the following
conditions apply:
You must upgrade to a paid account to continue using Google Cloud.
All resources you created during the trial are stopped.
Any data you stored in Compute Engine is lost.
Your account enters a 30-day grace period, during which you can recover resources and data you stored in any Google Cloud services
during the trial period.
You might receive a message stating that your account has been canceled, which only indicates that your account has been suspended to
prevent charges.
and at the Recovering data:
Caution: There is no automated way to recover data that you used on VM instances you created with Compute Engine. You must manually
export any data that you want to keep from your Compute Engine VM
instances before the trial period ends.
I do recommend you to upgrade your account before free trial ends.
After the free trial period ends you just have to register a credit card to continue to use their services if/when you accrue charges from them. If you set it up right it might charge you .02 cents every now and then. I just set up my first one with wordpress and at first I would get charged .02cents/month but once I updated the software and the config it rarely charges me. p.s. I started getting hack attempts pretty quickly.

Committed use discounts: How to apply to a VM

I purchased a VM with a committed use discount from GCP and it's active but now I would think that this VM would be added to my VM instances list but it's not.
My two old VM's are still running but I don't see my VM that should be connected to my committed use discount purchase.
Does anybody know how to proceed to setup a VM with my purchase?
Thanks,
Claudio
Committed use discounts are automatically applied to the project they were purchased under, and are only applied to the number of cores that were specified when the commitment was purchased.
So for example, if the commitment was made for 4 cores for 24 hours and 8 were used, the discount will be applied to the 4 cores.
It is also specific to a region. If you purchase a committed usage discount for us-east1 it won't apply to a VM in us-central1 for instance.
You can find more detailed information and some examples on this article here .

How does Google bill for compute engine?

I am currently running the free trial with 300$ credit.
There's one instance present in the console. Does Google bill for 'running' the instance or 'connecting' it to SSH?
Google charges compute instances by the time they're running (started) according to CPU and RAM, there are additional charges for disks and network. There are discounts for long running instances and for commitments. pricing information is available at https://cloud.google.com/compute/pricing
You can start and stop instances any time and it depends on your workload... for your use-case of compiling things you may use preemptible instances which are much cheaper - https://cloud.google.com/preemptible-vms/