0

I'm having difficulties having monit to start newrelic-sysmond

This is the current config

check process newrelic with pidfile /var/run/nrsysmond.pid
    start program = "/etc/init.d/newrelic-sysmond start"
    stop program = "/etc/init.d/newrelic-sysmond stop"

But I always get 'newrelic-sysmond' failed to start. Other daemons are running normally.

Any idea?

Martin
  • 11,216
  • 23
  • 83
  • 140

2 Answers2

2

When using

/etc/init.d/newrelic-sysmond start

to launch the New Relic Server Monitor you must execute the command as root.

By default the program is executed as the user under which Monit is running. You should run Monit as root to obtain the results you want. Running as another user with sudo will not behave in the same way as running Monit as root.

Walden
  • 292
  • 1
  • 2
  • http://stackoverflow.com/questions/6542830/running-monit-as-a-restricted-user-and-making-it-watch-a-process-that-needs-root – Walden Oct 07 '14 at 00:42
1

Try manually starting the daemon and checking whether or not the pid file is actually created at that location.

For me it's creating the pid at /var/run/newrelic/nrsysmond.pid instead of /var/run/nrsysmond.pid

Kyle
  • 4,205
  • 1
  • 21
  • 22