railsware / newrelic_platform_plugins

MIT License
42 stars 66 forks source link

mpstat newrelic plugin #17

Open pjbloem opened 10 years ago

pjbloem commented 10 years ago

In attempting to run the plugin from a command line I get the following error:

[ /usr/local/newrelic_mpstat_agent]# ruby newrelic_mpstat_agent.rb Agent Mpstat is at version 0.0.2 Error occurred in poll cycle: Couldn't parse output. Make sure you have mpstat installed. undefined method `split' for nil:NilClass Gathered 0 statistics

I have verified that /bin/mpstat is working and updated the yml file as follows:

Agent Configuration:

agents: mpstat:

The command used to display MP statistics

command: /bin/mpstat
# Report current usage as the average over this many seconds.
interval:
xensho commented 10 years ago

/usr/local/rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/psych.rb:203:in `parse': (config/newrelic_plugin.yml): did not find expected key while parsing a block mapping at line 15 column 1 (Psych::SyntaxError) 1 # 2 # 3 # This is a sample newrelic_plugin.yml file. Please move this file 4 # to the following location if it is not already there: 5 # 6 # ./config/newrelic_plugin.yml 7 # 8 # Where the current directory is the directory where your main program resides and is your current 9 # directory when you run the main program. 10 # 11 # Please make sure to update the license_key information with the license key for your New Relic 12 # account. 13 # 14 # 15 newrelic: 16 # 17 # Update with your New Relic account license key: 18 # 19 license_key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 20 # 21 # Set to '1' for verbose output, remove for normal output. 22 # All output goes to stdout/stderr. 23 # 24 verbose: 1 25 # 26 # Agent Configuration: 27 # 28 agents: 29 mpstat:/usr/bin/mpstat 30 # The command used to display MP statistics 31 command: mpstat 32 # Report current usage as the average over this many seconds. 33 interval:60

mpstat is installed and it's location is confirmed. Anyone has idea what's going on?