alibaba cloud, how to get usage details including price through api - alibaba-cloud

alibaba cloud, how to get usage details including price through api.
Through console, under billing Management > spending summary > instance spending details, able to see the all details.

Try using BSS OpenAPI
cli:
aliyun bssopenapi QueryInstanceBill --BillingCycle 2020-09
python:
from aliyunsdkcore.client import AcsClient
from aliyunsdkbssopenapi.request.v20171214.QueryInstanceBillRequest import QueryInstanceBillRequest
client = AcsClient("accesskey", "secretkey", "eu-central-1")
request = QueryInstanceBillRequest()
request.add_query_param('BillingCycle','2020-09')
request.set_accept_format('json')
response = client.do_action_with_exception(request)
Here is the doc for this API:
https://www.alibabacloud.com/help/doc-detail/100400.html?spm=a2c5t.11065259.1996646101.searchclickresult.6e427e0cOsJjA0

In your console ,you could via billing management-spending summary---details to check.
but I also recommend you to use the cost management function. you would analysis your current usage and get some report suggestions, even you would send the expense budget and alarm alert. it is very useful.

Related

Youtube Analytics API - Get Thumbnail-Impression Click-Through-Rate

One of the most important KPIs doesn't seem to be available via Youtube-Analytics-API. I can't get the total of thumbnail-impressions that have been shown to users. With that I could aggregate the impression-CTR using the views from certain traffic-sources (YT_SEARCH etc.). The docs don't seem to offer anything that would help me though.
Youtube-Reporting-API seems to have the same metrics as Youtube-Analytics-API. So I guess trying to use the Reporting-API would not help me either.
Is there any way to retrieve the number of thumbnail-impressions or the Impression-CTR programmatically? Any workaround? Am I missing something obvious? Or is there any intention of making that metric available via Analytics-API soon?
There is some very old, unanswered posts that may relate to my problem:
How to access new YouTube Analytics Metrics (Impressions, Impressions CTR) from API
Are Thumbnail Impressions/Views available through YouTube Analytics API?
There is a thread in google's issue-tracker that clearly states that (for now) it is NOT possible and in fact it is intended behavior (won't fix)!
I'll keep checking the API's Revision-History and try to keep this answer up to date.

Why is there no access to all document resources?

I would like to understand why I can not continue my work with Carrot2. A message appears saying "Our apologies, the following processing error has occurred:
org.carrot2.source.etools.IpBannedException: org.apache.http.client.HttpResponseException: Forbidden"
There is a problem with eTools, Wiki, PUT document sources (31/07/19) into Online version. I try to work with the downloaded version of the programme, but no document source does not work. Could you solve this problem and how long it will take?
Thank you!
Please see here:
http://project.carrot2.org/faq.html#ipbanned
We provide the search interface as a demo of the technology and we use a partnership with a company called Comcepta (eTools) for providing a limited number of free search requests. Unfortunately, some people have been abusing this free service and we had to introduce per-IP limitations.
If you wish to extend your query limits please install Carrot2 locally and contact Comcepta for custom query limit arrangements.
Apologies for the inconvenience.

how piwik extension for magento 2 takes data to its database?

the tracker collects data on the web page it's included in and sends it to Piwik by calling the HTTP tracking API. I got this information,but i am unable to find the piece of code for this. can anybody please help me with this?
If you have integrated the Henhed-Piwik extension to magento 2 and configured your piwik credentials in the following section Stores > Configuration > Sales > Piwik API with piwik-host URL, user id tracking, etc.
Since you have integrated the Henhed-Piwik to your magento 2 (Hope you have compiled your magento 2 and upgraded). This extension automatically places the java script tracking code to your magento site. Whenever you visit the site it automatically tracks your actions, clicks, impressions, referrals etc., asynchronously.
The role of piwik.js and piwik.php are as follows:
Your tracking site consists of a global variable var _paq = _paq || []; and _paq.push(['trackPageView']); this actually mentions the what are all the features in piwik you would like to track.
This code defines the script execution mode, i.e asynchronous and you are sending all the data to piwik.js file. g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js';.
The same piwik.js file also calls the API methods in the piwik.php file of Piwik Analytics Tool and tracks all your web site data and stores into the MySQL database, where you have configured while installing and setting up of your piwik.
Hope, I have answered your question.

Google Analytics Reporting API filters/segements

I'm trying to use the Google Analytics Core Reporting API and have the following troubles. I know how to fetch that I want the problem I have is:
I want to use a filter only for specific metrics and not for all of them.
Is this even possible?
Here is an example how my Reporting "Code" looks like:
Metrics "ga:sessions
ga:goal6Completions
ga:goal7Completions
ga:goal10Completions
ga:totalEvents
ga:uniqueEvents"
Dimensions "ga:date"
Filters "ga:eventCategory==customerType"
I have the same problems with segments as with the filters that all metrics all segmented/filtered and only specific metrics should.
There really isn't another way other to get the data you want without creating a new request where the filter isn't applied unfortunately.
Just remember that you are only allowed five requests total. To give context, this may only apply to how I use the Reporting API, but I use Google App Script to push data to Google Sheets.
This may or may not be helpful to you, but the reporting code I use I have made available in a repo on GitHub: https://github.com/jessfeliciano/aggregateGoogleAnalyticsReporting/blob/master/objectQueryWithFilter.js
I've included a guide that gives additional information regarding creating requests in general, so it may spark other ways to go about creating your data trees. I hope this helps.

Can't see metrics on Azure sent by AppInsights-Ruby gem

I have a Rails application and I want to start tracking some metrics and events.
I must track this information using Microsoft Azure, so I found a the gem AppInsights-Ruby developed by Microsoft itself.
I got my instrumentation_key and did what the README says but I can't see any information on the Azure portal.
I thought it could be a problem with the queues so I filled up the queue with
2000.times {|x| tc.track_metric 'My metric', x }
6000.times {|x| tc.track_event 'My event' }
But again, there is no metrics or events on the Azure portal.
Does anybody used this gem?
Am I missing something?
There is potentially a JSON issue in v0.3.0 of this gem. After investigating we saw that the return information from the API said our JSON was invalid (but the JSON was created by the gem.)
v0.5.0 changes how it uses JSON and that seemed to have resolved the issue.
The v0.5.0 changes are here
where are you looking for them?
when you use track_metric, the metrics by themselves don't show up as "events", you have to use track_event (or others) to send events.
metrics like this should, though, show up in metrics explorer. (open your overview page, find the "metrics explorer" part, click it, and then in the edit blade scroll to the bottom, there should be a "Custom Metrics" section, and your metrics should show up there.
If you attach the metrics in a track_[event|pageview|request|exception|trace], then you'll see those events in the diagnostic search list and the metrics will appear as event properties, in the properties blade.
If you don't see them at all on the portal, try using something like fiddler to watch the outbound requests, and see if you see data going to dc.services.visualstudio.com, where the data is collected. Those requests/responses should indicate if data is successfully being transmitted.

Resources