I faced with a problem on grafana dashboard accordance to metric request to graphite.
I have the similar request:
summarize(awsMetricName.Sum, '1h', avg, true)
I set from-to range in 3 hours and try to send request, I got the result with timestamp point, but values were null in them.
But having made some same requests the data could be returned
Also when I decrease from-to range to 30inutes, this request worked properly.
May be someone faced with the same problem?
I wanna determine the reason, why graphite sometimes returns data normally and sometimes null.
Related
I am receiving a handful of errors regarding the event timestamp. I have confirmed that I am sending a UNIX timestamp in seconds. This is what I have implemented in the front-end of our code to get the UNIX timestamp in seconds: Math.round(Date.now() / 1000)
Also, it looks like less then 1% of the events are affected for each event created, so that's why I'm a bit confused and not sure how to resolve these errors.
Error message:
The timestamp for the InitiateCheckout events sent from your server is in the future. Timestamps are metadata sent alongside each event you send from your server and they represent the time of day when an event actually occurred. For example: the time that a customer made a purchase on your website. All timestamps should represent a point in time that occurred within the last 7 days"
Click here to see a screenshot of the errors
Has anyone encountered these type of errors? If so, any advice on how to resolve them?
I am not sure how to go about this
I have the following logic for my ad insights request:
If Facebook asks me to reduce the amount of data I'm requesting, I half the date range. If the date range is the same, I half the limit.
It gets to the point I send this request:
https://graph.facebook.com/v3.2/{account}/insights?level=ad&time_increment=1&limit=1&time_range={"since":"2019-03-29","until":"2019-03-29"}&breakdowns=country&after=MjMwNwZDZD
But I still get that error:
Please reduce the amount of data you're asking for, then retry your request
There is no more reducing I can do.
Note, that this only happens sometimes.
One way to avoid the error is when you only request 1 item (limit=1) to start splitting the fields and request half the fields in each request.
Another way is to run an async report, which should not have such a low time limit.
Official Facebook API team response:
It looks like you are requesting a lot of fields, this is likely the
cause of this error. This will cause the request to time-out.
Could you try using asynchronous requests as described here:
https://developers.facebook.com/docs/marketing-api/insights/best-practices/#asynchronous?
Async requests have a much longer time limit, this will likely resolve
your issue.
We are trying to see if graphite will fit our use case. So we have a number of public parameters. Like key value pairs.
Say:
Data:
Caller:abc
Site:xyz
Http status: 400
6-7 more similar fields (key values pairs) .
Etc.
This data is continuously posted to use in a data report. What we want is to draw visualisations over this data.
We want graphs that will say things like how many 400s by sites etc. Which are the top sites or callers for whom there is 400.
Now we are wondering if this can be done with graphite.
But we have questions. Graphite store numerical values. So how will we represent this in graphite.
Something like this ?
Clicks.metric.status.400 1 currTime
Clicks.metric.site.xyz 1 currTime
Clicks.metric.caller.abc 1 currTime
Adding 1 as the numerical value to record the event.
Also how will we group the set of values together.
For eg this http status is for this site as it is one record.
In that case we need something like
Clicks.metric.status.{uuid1}.400 1 currTime
Clicks.metric.site.{uuid1}.xyz 1 currTime
Our aim is to then use grafana to have graphs on this data as in what are the top site which have are showing 400 status?
will this is ok ?
regards
Graphite accepts three types of data: plaintext, pickled, and AMQP.
The plaintext protocol is the most straightforward protocol supported
by Carbon.
The data sent must be in the following format: <metric path> <metric
value> <metric timestamp>. Carbon will then help translate this line
of text into a metric that the web interface and Whisper understand.
If you're new to graphite (which sounds like you are) plaintext is definitely the easiest to get going with.
As to how you'll be able to group metrics and perform operations on them, you have to remember that graphite doesn't natively store any of this for you. It stores timeseries metrics, and provides functions that manipulate that data for visual / reporting purposes. So when you send a metric, prod.host-abc.application-xyz.grpc.GetStatus.return-codes.400 1 1522353885, all you're doing is storing the value 1 for that specific metric at timestamp 1522353885. You can then use graphite functions to display that data, e.g.,: sumSeries(prod.*.application-xyz.grpc.GetStatus.return-codes.400) will produce a sum of all 400 error codes from all hosts.
I'm trying to retrieve 3 months history of 30-minute candles from Kraken using the REST API:
https://www.kraken.com/help/api
Following the documentation, I made this POST request to URL:
https://api.kraken.com/0/public/OHLC
passing the following parameters in JSON format:
{
"pair":"EOSETH",
"interval":30,
"since":1514404800
}
where 1514404800 corresponds to the timestamp (in seconds) to the date:
27/10/2017 20H00m UTC
This is not clear from the API documentation, they call it an 'ID', but I came to this conclusion by looking to the returned values.
So I was expecting returned response with entries starting on this date. Then I would fetch subsequent entries using the last id returned.
However the first entry I get corresponds exactly to 15 days ago. Actually, if I don't pass the parameter 'since' at all, I get exactly the same result, so it seems the parameter is being ignored completely.
Maybe Kraken changed the API and this parameter 'since' was replaced by some other?
Or I missunderstood the syntax of this parameter and I'm doing something wrong?
They call it an 'ID' but you are right this is the UNIX TimeStamp.
I agree that it is not clear from the API documentation.
There is a limit in the number of results returned, see https://support.kraken.com/hc/en-us/articles/218198197-How-to-pull-all-trade-data-using-the-Kraken-REST-API
With an interval of 30 minutes you get all data from 15 days ago : https://api.kraken.com/0/public/OHLC?pair=EOSETH&since=0&interval=30
If you change the interval to 60 minutes you get data from 1 month ago : https://api.kraken.com/0/public/OHLC?pair=EOSETH&since=0&interval=60
With an interval of 1 minute you got data from less than 1 day (as stated in the article above) : https://api.kraken.com/0/public/OHLC?pair=EOSETH&since=0&interval=30
I tried and indeed you cannot get all 30 min data from 27/10/2017.
It seems the since parameter is useless once you reach the limit.
It works great if not (i.e. data from yesterday https://api.kraken.com/0/public/OHLC?pair=EOSETH&since=1517774700&interval=30).
As soon as you reach the limit the count starts from today to the past and you get only last 15 days data...
Maybe a solution is, as stated in the article, to build your own OHLC from trades data...
Try to contact the support to clarify this point (I already contacted them for another problem and they reply pretty fast).
(I'm writing this as an answer because too much text the for a comment, sorry if it does not answer your question)
This bypasses the API part of the question, but you can download historical data from their website:
https://support.kraken.com/hc/en-us/articles/360047124832-Downloadable-historical-OHLCVT-Open-High-Low-Close-Volume-Trades-data
Explanation:
I am able to query the Google Core reporting APIv3 using the client library to get data on pageviews for specific URLs of a website I am working on. I want to get data(pageviews) for each day within a specified range. So far I am simply looping through the range, sending individual request to the API. in each request I am setting the same value for the start date and the end date.
Problem:
Obviously this gets the job done, BUT it is certainly not the best way to go about it. Because, assumming I want to get data for the past 3 months for each of about 2000 URIs. Then I will need 360000 number of requests and that value is well over the limit quota defined by Google.
Potential solution: So one way I thought of solving this issue is probably to send a request setting start-date and end-date to be a week apart but the API will return a sum of the values rather than the individual values.
main question: So is there a way to insist that these values should not be added up and returned as a sum but rather returned (as associative array or something like that) separately for each.
I hope the question is clear and that there is a solution! Thank you!
Very straightforward:
Metric: ga:pageview, Dimension: ga:date, Set a filter for your pagepath, and set a start-date and end-date.
Example:
https://www.googleapis.com/analytics/v3/data/ga?ids=ga%3Axxyyzz&dimensions=ga%3Adate&metrics=ga%3Apageviews&filters=ga%3Apagepath%3D%3D%2Ffaq.html&start-date=2013-06-27&end-date=2013-07-11&max-results=50
This will return the pageviews for that the faq.html& page for each day in the time-frame.
You should check out the QueryExplorer. Great tool to find out how to structure queries.