This might be a stupid question, but I couldn't find any way to find all HTTP requests to my nginx proxy for last 1 day.
I tried sum_over_time(nginx_request_status_count{status_code='200'}[1d]) but where will I feed the time range? In this case, yesterday to today
But, as you can see above, I get only 200's summation. Even if I use =~ "2.." I'll get error as the output have multiple status codes.
Help appreciated.
You probably want sum(increase(nginx_request_status_count[1d])) which is roughly the total number of requests in the past day,
Related
i have a project on Google Cloud Platform, using the Youtube Data V3 API. Everything was going well, earlier this month after receiving several emails alerting that I had to do an Audit, the queries for the day stopped completely. they were completely zeroed.
I followed the link to perform the Audit, and i successfully completed all the changes that were told to me in my application, strictly following the regulations. The audit went well. No further changes were required from me.
But the issue is that the queries per day remain at zero. I can't edit. It occurred to me that maybe using the Google Cloud Trial there could be some change. Negative. I'm still unable to increase the limits, not even using the balance they give you as a gift.
The project used approximately a margin of about 25,000 to 300,000 queries / day. I have requested 500.000 queries / day filling in the quota expansion form to have a little more margin.
Meanwhile the project has been stopped for almost a month. If anyone knows something or how I should proceed about it,
Thank you very much.
Have a nice day,
We have a multitenant application, that pulls top 100 messages from users inboxes and sent items, once every minute. The code has been working fine, and hasn't been changed the last week, but for the last 24 hours or so, we are getting intermittent gateway timeouts after 30 seconds, across different users and tenants, when pulling the messages from Graph.
Is there anyway to reach out to support, to fix this?
If you reduce the size of the messages you ask in one request and also batch requests to graph you will find that you will not see the 504 gateway time outs. More on batching here https://learn.microsoft.com/en-us/graph/json-batching
Also with your query, what select parameters are you using? Are you using expands or any open extensions as this can put additional load on too.
I'm new to heroku and realized that, with a free dyno, your app idles after 30 minutes of inactivity. I also know that you only get 550 hours of dyno awake-time a month, so I don't want to ping it continuously.
What I'm looking for is a way to keep my application awake for 18 hours a day. As far as I know, the only way to achieve that is by pinging my site, but I cant find a way to ping it only from 8am to 2am. I'm looking for a free option, but I will definitely upgrade my dyno to hobby status once the final app is pushed out.
Any advice on this subject would be greatly appreciated!
ps I looked around, and couldn't find anything about pinging during a specific time period.
Edit: I've seen that New Relic and other sources are able to ping my website, but it seems to me like they ping continuously. While I do want it to be consistent, so that the dyno doesn't fall asleep, I was looking for something that would let me be able to have it ping the site every day in a specified time period! Oh, and I know the easy answer, I don't see what's wrong with taking advantage of the free hours heroku provides me with! I already said that I'm definitely going to upgrade later on.
I am having problems with some oauth_token's returning as invalid from Twitter. After doing some research I think this is due to a difference in system times between my server and Twitter's servers. I was able to get Twitter's system time by curl'ing 'https://api.twitter.com/1/help/test.json' and checking the 'filetime'. The result: My server is 8 seconds ahead of Twitter's server.
Could this 8 seconds cause Twitter to return empty oauth_token's and if this is the problem, how do I synchronize by server's time (centos server) with Twitter's time.
Any and all help is much appreciated. Thanks.
The Twitter API allows a time difference of 5 minutes, so 8 seconds off really shouldn't be the problem. Of course it is important the time is correct and it is therefore recommended that you run something like ntpd. I'm however pretty much sure the issue you're having isn't related to the time. And to be honest I don't even have a clue on what you mean with empty oauth_token's. Note that once you have working oauth access keys they'll remain valid forever unless you revoke them manually.
Synchronize your server with an official time server with ntpdate. Do not try to modify your time to meet another random server. Instead if the problem exist after your server has the correct time contact the people at twitter about this problem.
We have a customer complaining about a long running request. I found the request in the production.log but am not sure how to dig deeper into figuring out why it took so long. Is there any artifacts in the log that I should look for?
Also the DB and View times don't add up to the total request time.
Try newrelic rpm. It can parse your logs and show you the slowest requests and a lot of other information. It shows live statistics about the app too. The trial should be enough for you to fix your application.