nickfloyd / newrelic-perfmon-plugin

The Perfmon Plugin for the New Relic Plugins - https://newrelic.com/plugins
MIT License
11 stars 22 forks source link

multiple hostnames #6

Closed mordamus closed 11 years ago

mordamus commented 11 years ago

I want to monitor multiple servers. How can i enter these in the config?

    local: 
    hostname: server1
    # Set "debug: true" to see metrics in stdout instead of sent to New Relic"
    debug: false
    # Set "testrun: true" to use input from local text/html files. Only parses input once, then quits.
    testrun: false
sschwartzman commented 11 years ago

You do so like this:

agents:
  perfmon:
      -
        local: no
        hostname: remote_server1
        debug: false
        testrun: false
      -
        local: no
        hostname: remote_server1
        debug: false
        testrun: false
      -
        local: yes
        hostname: local_server
        debug: false
        testrun: false

So, for every server you want to monitor, add a stanza. Make sure to use the same spacing - YML can be finicky. Also, yes, you can combine local and remote servers in the same agent - as you see above, this example would create 2 instances for remote servers and 1 instance for localhost.

Let us know if that works for you.