How to exclude NewRelic RPM pinger from creating useless sessions in database - ruby-on-rails

I'm using Newrelic for monitoring my rails app status. They ping (GET request I think) our app every 5 minutes. Do you know how to prevent rails from spawning new user session for every request they are making?

Have it ping something that exists in the public directory.
This won't check to make sure that your app is running, but just that the server is up. Assuming the server is up, then your app should be able to create exceptions and New Relic will catch those.
On a new Rails app, for instance, you could have it ping http://rooturl/images/rails.png as that png is in public/images/ by default.

I seem to recall some recent work for specifically this use case -- you might contact New Relic support and see if this has been addressed recently.

Other good answers are already here, but the pinger is documented in full here: https://newrelic.com/docs/alerts/availability-monitoring

Related

Rails EC2 testp2.czar.bielawa.pl

i deployed a rails app on a EC2 instance and on this morning when i clicked on a section of the app redirected to this http://testp2.czar.bielawa.pl/.
i would like to know if this is a malware or what?
because this link is not part of the app.
thanks
Yes its type malware, you might not be the actual target is rather that your server might be used for source of spam, port scanning and DDoS attacks.
There is pretty extensive abuse list for
http://testp2.czar.bielawa.pl/
See here.http://www.abuseipdb.com/report-history/185.25.151.159
For getting rid of this follow the great instructions from serverfault below.
https://serverfault.com/questions/218005/how-do-i-deal-with-a-compromised-server
Alternatively if there is nothing important there just delete the EC2 and start again

Are any HTTP log files saved on my system by default?

I have an application hosted on Amazon EC2 on a Ubuntu machine, written in Ruby (on Rails), deployed with Capistrano and running on Nginx.
Last friday one module of my application has crashed and nobody in the company noticed until this morning. We spent some money with Facebook and Google ads and received a few hundreds of visits, but nobody created an account due to this bug.
I wonder if this configuration is saving the HTTP requests and its bodies somewhere in a log file. But we didnt explicitly set it, so it would only happen if any of these technologies do it by default.
Do you know whether there is such log or not?
Nope, that wouldn't be anywhere in a usable form (I'm inferring you want to try to create the accounts from request bodies in log files). You'll have the requests themselves in your nginx logs, and the rails logs will contain more info about the request, but as a matter of security, by default, any sensitive information (e.g. passwords) would be scrubbed from them. You may still be able to get some info from them.
To answer your question a little more specifically, the usual place for these logs on your system would be:
/var/log/nginx/
/path/to/your/rails/app/log/production.log
On a separate note, I would recommend looking into an error reporting service like Honeybadger, Airbrake, Raygun, Appsignal, or others so that you don't have silent failures like this moving forward.

OpsWorks Instances Shutting Down

I have three stacks on Amazon Web Services OpsWorks. As an instance, there is a "Rails App Server". When I try to stop it, it just says "stopping" for hours. Does someone know this bug or problem ?
Thank you.
This is a common issue in Opsworks - when instances cannot be stopped or removed due to permission changes, volume removals, etc. You can request them to be removed in AWS forum. Post the problem, instance id and stack id: https://forums.aws.amazon.com/forum.jspa?forumID=153&start=0 and AWS admins monitoring the forum should pick it up.
You'll need to be logged in with your AWS account in order to access the forums.
Seems like something looping.
Try check your shutdown run list recipes.

Heroku app does not respond at all anymore

Eventually a request to access the app will timeout within the browser.
Nothing was changed to the app. Yet suddenly it went down several hours ago.
The heroku logs show no attempt being made to request it.
I can restart it, and deploy to it, yet nothing changes.
I assumed maybe a service is causing this, but I stripped it of any 3rd party vendor calls and it still doesn't respond to me trying to access the site.
Does anyone have any insightful ideas on where to go from here? I'm sorry for how vague this question is..
is your DNS down? use host command to check it or visit the app using *.herokuapp.com

Heroku advertisement banner?

This morning when I opened my heroku app in the browser, I noticed a banner advertisement was placed on the bottom. I added an instance (as to not be a free plan) and restarted my server, and it was still there.
I dug through their knowledgebase and stackoverflow, can't figure out how to remove these. Right now I am removing them with JS, but the goal is to not receive the extra load / advertisements.
Heroku will not inject adds into your site whether it's free or not. As mentioned in comments to your question, you should check whether it's something that's done by the network you're on. Maybe try accessing your site using https (i.e. https://paddlar.herokuapp.com/rivers) - with that, the network should not be able to modify responses.

Resources