Find the total instance hours in my Google Apps Engine - google-app-engine

Where can I find the total front-end instance hours that I have used in my previous days? It seems I can only see today's total.

AFAIK the actual instance-hours numbers are not directly available, at least not in the developer console.
What you might find helpful would be the historical graph of the instance usage, for the last (up to) 30 days, which you'll find in the Dashboard after selecting the Instances display mode, the desired timescale and the billed instance estimate graph:
Hover the mouse cursor over the graph and the actual billed instance estimate value will be displayed below the graph and the corresponding date and time is displayed in the top right corner. Note that there is some noticeable delay in updating the values, tho.
The graph detail level depends on the selected timescale, the coarsest being ~2h (on the 30 days timescale), so if you need more than just a general idea about usage trending you'd need to take care of:
averaging and/or integrating on a daily basis
accounting for the free daily quotas
accounting for instance class (I'm unsure if that's already taken into account or not)
You could also try the billing date export feature. From
Export billing data to a file:
You can export your daily usage and cost estimates automatically to a
CSV or JSON file stored in a Google Cloud Storage bucket you
specify. You can then access the data via the Cloud Storage API, CLI
tool, or Google Cloud Platform console
...
Alternatively, you can export detailed data to a Google BigQuery
dataset. For more information, see Export billing data to
BigQuery.
Note: I haven't actually tried this export feature. so I can't tell if the instance hours values are in there. There's also the still open GAE issue 10716 which suggests GAE stats might not be included.

Related

export a large SQL file by mistake

I made a mistake by accidentially exported a large database (cloudSQL) of 20TB into SQL to a google bucket, it is currently running, I am afraid this bulky file will cost me a huge amount of money on google cloud and wish to stop this export, but there is no way I can stop this current export. Please help.
With the current error message,
Exporting data to gs://.../bak/Cloud_SQL_Export_2023-02-17
(15:55:15).sql. This may take a few minutes. While this operation is
running, you may continue to view information about the instance.
I searched all the online tutorials, and try to contact google cloud, but found that I didn't purchase the support.

How can I see the daily instace usage on App Engine?

The app engine dashboard has an Instances view, but it shows the instances in hourly interval. Is there a way to set this interval to day, so I can see the daily sum of instance usage for the last week, for example?
I tried clicking the gray pills, but nothing happens. The arrow on the right reveals the 3 metrics shown, but they cannot be clicked either.
To monitor the instance count of my app engine services up to 30 days, I go to [1].
There you can filter by service name and time.
[1] https://console.cloud.google.com/appengine/instances
Here you may find an overview of all the Monitoring tools GCP offers for your Application Performance Management.
Additionally, you can use the Metrics Explorer to display App Engine Metrics, while all versions of your GAE will be concurrently displayed in one chart.
There you may select the metric you would like to display, as for example: "Memory Usage". Furthermore, you can reduce the amount of data returned for a metric by combining data from similar time series, using the "Group By" and "Aggregator" filtering methods.
I hope this information helps.

Host An application in google app engine to work on particular time

I want to host an application in the google engine, the purpose of my application is to get data from a different server once in a day. So I don't want my application to work full time in day(As it is costlier). I just want to run the application for an hour in a day and pay only on that basis. Is it possible to do it in that way?
All depend of your needs. App Engine standard has 28H free per day of F1 instance type, and 9H of B1 instance type (depend of your scaling type).
App Engine flexible doesn't have free quota -> This is expensive for some hours per days.
If App Engine standard matches your need, take care of the timeout. Each request can last more than 60 secondes. You can use Cloud Task to defer background task. By the way, a task can last up to 24h.
If App Engine standard doesn't match, because of language limitation, third party library/binary limitation and you need to have a container and that's why you need to run on App Engine Flexible, you can consider Cloud Run. However, the request are limited to 15 minutes and you have a generous free tier.
So, provide more inputs if you want more advice.

google appstore, how to split fees per datastore namespace

I'd like to make a GAE app multi-tenant to cater to different clients (companies), database namespaces seems like a GAE endorsed solution. Is there a meaningful way to split GAE fees among client/namespaces? GAE costs for app are mainly depends on user activities - backend instances up time, because new instances are created or (after 15 min delay) terminated proportionally to the server load, not total volume of data user has or created. Ideally the way the fees are split should be meaningful and could be explained to the clients.
I guess the most fair fee splitting solution is just create a new app for a new client, so all costs reported separately, yet total cost will grow up, I expect few apps running on same instances will use server resources more economically.
Every app engine request is logged with a rough estimated cost measurement. It is possible to log the namespace/client associated with every request and query the logs to add up the estimated instance costs for that namespace. Note that the estimated cost field is deprecated and may be inaccurate. It is mostly useful as a rough guide to the proportion of instance cost associated with each client.
As far as datastore pricing goes, the cloud console will tell you how much data has been stored in each namespace, and you can calculate costs from that. For reads/writes, we have set up a logging system to help us track reads and writes per namespace (i.e. every request tracks the number of datastore reads and writes it does in each namespace and logs these numbers at the end of the request).
The bottom line is that with some investments into infrastructure and logging, it is possible to roughly track costs per namespace. But no, App Engine does not make this easy, and it may be impossible to calculate very accurate cost estimates.

Google App Engine Billing inconsistent with Usage History

I am sorry if this is not the right place to ask this question, but Google has moved customer support for Bronze Tier to Community Forum aka Stackoverflow... So here I am, stuck with a bill that I can't figure out. Just to give you the context, I am running an Android app sending videos averaging 2 megabytes per video to users. There are around 70 daily users downloading 2 videos a day.
Image here: http://postimg.org/image/cytlw3rzx/ (Sorry I don't have 10 reputation yet)
As you can see, there are supposedly 516 Gibibyte of Cloud Storage Download APAC. However, I only have around 150 megabytes of data stored on the cloud. So it is mathematically impossible to have such traffic over this period of time. On top of this, here is the Usage History which suggests totally different usage.
Image here: http://postimg.org/image/5h1tzl49f/
Please help if you have any idea what is going on as I am stuck with no customer support and no helpful information on the internet...
The usage history you posted (your second picture) is only for the App Engine application, but does not include Cloud Storage usage. It also does not include any usage you may make of Compute Engine, Big Query etc.
That is why the usage history shows less than 1$ per day whereas your final bill shows additional charges for Cloud Storage.
You can ask billing-related questions to the Cloud Platform billing team here : https://support.google.com/code/contact/cloud_platform_billing
You can also find more info on your current usage here :
https://console.developers.google.com/project/YOUR_PROJECT_ID/billing/unbilledinvoice
If you have doubted about how your cloud storage buckets are used, set up access logging as explained here.

Resources