Your data. Anywhere you go.

New Relic for iOS or Android

Download on the App Store    Android App on Google play

New Relic Insights App for iOS

Download on the App Store

Learn more

Close icon

Process count across hosts rather than single host


I want to be able to alert if more than X total matching processes are running across Y hosts. For example:

Alert if more than 1 process matching crond is running across all hostnames containing foo.

But as far as I can see I can only alert on number of matching processes per host. Any ideas on how to achieve this?


Have you tried using NRQL alerts …? That would achieve what you are after.

Here is an example of an NRQL alert I have set up to monitor for the MQ listener process across two hosts, and then to alert if the threshold is < 1

SELECT count(*) FROM ProcessSample WHERE (fullHostname = ‘server1’ OR fullHostname = ‘server2’) AND commandLine = ‘/opt/mqm/bin/runmqlsr’

Using your details, if might look something like this,

SELECT count(*) FROM ProcessSample WHERE commandLine = ‘crond’ and fullHostname like ‘%foo%’


@antonio.berrios Did you get a chance to try @LAMBERT’s advice? NRQL alerts is the recommended way to achieve your goals - so hopefully the queries LAMBERT shared are helpful for you.


Thanks, I’ll give this a go.


Awesome! Let us know how it goes :smiley: