Does RPM have an API?
Does RPM have an API?
1
person has this question
I have this question, too!
Tell me when someone answers.
The more people who ask this question, the more it gets noticed.
The more people who ask this question, the more it gets noticed.
The best answer from the company
-
We do currently have an API for background processes. Here's an excerpt from our documentation on Google Docs that I think will provide a solution for you:
How do I monitor background processes and other jobs running outside the web application?
We are still working on the API to allow you to monitor Rails components that aren't running in the web application. Currently there are two ways to do this but these APIs are still evolving so they may not work in future versions of the agent.
The first way to do this is to set the 'monitor_daemons' flag to 'true' in newrelic.yml:
monitor_daemons: true
The drawback is that this will start the agent for all of your processes, including rake tasks, scripts, etc.
The alternative is to manually fire up the agent at the start of a script. This is what we do when we want to monitor our own background jobs.
NewRelic::Agent.manual_start('ruby','process_orders_overnight')
The parameters identify the environment and job name; you can use whatever you want.
I’m confident this will help
The company says
this answers the question
Create a customer community for your own organization
Plans starting at $19/month
-
Inappropriate?RPM does support some customization of metric collection via API calls on the agent from your application. We don't have any support yet for server APIs.
We are still trying to formulate the requirements for this kind of access. Can you describe a little bit what you have in mind?
I’m very interested
-
Inappropriate?An API would be nice because at http://xlsuite.com/ we have have a variety of background processes that I would like to be able to track. They run outside the regular Rails processing cycle, but use the same DB server. Knowing if a scheduled task is causing the application to sag would help.
I’m hopeful this will be implemented
-
Inappropriate?We do currently have an API for background processes. Here's an excerpt from our documentation on Google Docs that I think will provide a solution for you:
How do I monitor background processes and other jobs running outside the web application?
We are still working on the API to allow you to monitor Rails components that aren't running in the web application. Currently there are two ways to do this but these APIs are still evolving so they may not work in future versions of the agent.
The first way to do this is to set the 'monitor_daemons' flag to 'true' in newrelic.yml:
monitor_daemons: true
The drawback is that this will start the agent for all of your processes, including rake tasks, scripts, etc.
The alternative is to manually fire up the agent at the start of a script. This is what we do when we want to monitor our own background jobs.
NewRelic::Agent.manual_start('ruby','process_orders_overnight')
The parameters identify the environment and job name; you can use whatever you want.
I’m confident this will help
The company says
this answers the question
-
My background processes are long-lived and run many tasks. If you remember RailsCron, it is very similar.
When should I start the agent? Should I start/stop it for each task or just start it when the background process starts up? Thanks! -
Inappropriate?Start it as soon as you can in the background process. Only start it once.
-
Inappropriate?One thing I forgot to ask is if the background processes are counted as mongrels or not? This will greatly impact my subscription level...
-
Inappropriate?Hi François. Yes a background process will take a spot in the mongrel allocation. If you have all your mongrel allocations taken, it probably will not be able to connect.
I’m sorry I don't have a better answer.
Loading Profile...



EMPLOYEE
