nickfloyd / newrelic-perfmon-plugin

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

Custom Dashboards #10

Open thedoc31 opened 11 years ago

thedoc31 commented 11 years ago

I'm trying to modify the default dashboards and tabs for the perfmon plugin, but I can't seem to find a way to add or modify the metrics that are shown. All I see is what's there by default.

The README txt file mentions the below articles, but I don't have an "edit" button on the summary page to create my own dashboard, likely because I'm not the publisher of the plugin.

https://newrelic.com/docs/plugin-dev/working-with-plugin-dashboards https://newrelic.com/docs/plugin-dev/creating-summary-metrics-for-plugins

I've submitted case #60293 about this to New Relic but I thought I'd post about it here too just in case. I really want to see the .NET Data Provider for SqlServer* metrics for my app servers but they're hidden from view.

Thanks!

coopr commented 11 years ago

Sorry @thedoc31 - New Relic plugin dashboards can be modified only by the plugin author.

thedoc31 commented 11 years ago

@sschwartzman @nickfloyd Would it be possible to create additional tabs then that will at least give me a chance to see all the data being captured by the default install? I can't seem to find the .NET Data Provider for SqlServer objects anywhere in the existing dashboards. You may also want to modify your release notes since it sounds like custom dashboards for plugins are not currently possible.

pdxnam commented 11 years ago

I'm trying to do the exact same thing and don't see all the perfmon metrics available....I too read the readme and thought I'd have access to the data via a Custom Dashboard. Also specifically interested in .NET Data Provider for SqlServer objects.

thedoc31 commented 11 years ago

New Relic confirmed that in order to see perfmon stats that are not in the default plugin dashboards that I need to edit the newrelic_plugin.yml file and create my own GUID so I can create my own "unpublished" plugin dashboard. By doing this, however, I will lose the ability to see the predefined dashboards you've already created. :/

It also seems that the GUID is fairly sensitive within the perfmon plugin. It crashes if I make changes to anything other than the "myown" element in the example guid: com.not52projects.myown.plugin.perfmon. Is this by design? Event log error is pasted below for your reference.

Theoretically if I could change the final element in the GUID to something like "PerfmonCustom" or "Perfcounters" I'd be able to add whatever I wanted to on my dashboard.

https://docs.newrelic.com/docs/plugin-dev/the-parts-of-a-plugin#guid

Log Name: Application Source: Windows Error Reporting Date: 10/9/2013 12:43:19 PM Event ID: 1001 Task Category: None Level: Information Keywords: Classic User: N/A Computer: Description: Fault bucket , type 0 Event Name: CLR20r3 Response: Not available Cab Id: 0

Problem signature: P1: perfmon_plugin_service.exe P2: 1.1.0.0 P3: 51734088 P4: mscorlib P5: 2.0.0.0 P6: 5174de33 P7: 34a9 P8: 1c5 P9: System.IO.IOException P10:

Attached files:

These files may be available here: C:\ProgramData\Microsoft\Windows\WER\ReportQueue\AppCrash_perfmon_plugin_s_c78abcf967c1da6992f9b8507bc437eebd4239f_05f7fffc

Analysis symbol: Rechecking for solution: 0 Report Id: 4889bd8c-310a-11e3-af86-005056842c00 Report Status: 4 Event Xml:

1001 4 0 0x80000000000000 1041308 Application redacted 0 CLR20r3 Not available 0 perfmon_plugin_service.exe 1.1.0.0 51734088 mscorlib 2.0.0.0 5174de33 34a9 1c5 System.IO.IOException C:\ProgramData\Microsoft\Windows\WER\ReportQueue\AppCrash_perfmon_plugin_s_c78abcf967c1da6992f9b8507bc437eebd4239f_05f7fffc 0 4889bd8c-310a-11e3-af86-005056842c00 4
sschwartzman commented 11 years ago

You are right in how to create you own dashboards for a plugin, the GUID is changeable in the config file for this purpose, so you don't have to rebuild the app to use it customized.

Thanks for the event log, I'm looking into the cause.

sschwartzman commented 11 years ago

I'm having trouble re-creating the error. I tried "guid: com.52projects.doodle" and the plugin appeared as "doodle" in my account, like seen here:

image

Can you attach your newrelic_plugin.yml file with license_key redacted?

thedoc31 commented 11 years ago

I just noticed that somehow about 15 of the new_relic_standalone.exe were running on this particular host even after I stopped the service. I have no idea how it even could have spawned that many processes. Regardless, I used process explorer to kill each one's process tree so it would take all the child processes along with it. This time I was able to change the config file as below and restart the service without it crashing. However, even after 20 minutes I'm still not seeing the new "perfcounters" plugin.

capture

Please make sure to update the license_key information with the license key for your New Relic

account.

# newrelic: #

Update with your New Relic account license key:

# license_key: '[redacted]' #

Set to '1' for verbose output, remove for normal output.

All output goes to stdout/stderr.

#

verbose: 1

#

Proxy configuration

Uncomment and set if using a proxy:

proxy:

address: yourproxyhost

port: 8080

user: youruser

password: yourpass

#

To collect a customized set of Perfmon counters (BOTH steps are REQUIRED):

(1) Uncomment "guid" and set to your own GUID

(2) Uncomment "countersfile" and set to the list of perfmon counters you wish to collect

# guid: com.allegiance.plugin.perfcounters countersfile: perfmon_totals_counters.txt

#

Agent Configuration:

# agents: perfmon:

    local: yes
    hostname: [redacted]
    # 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

I'm looking into making sure the ruby processes shut down with the service. Stay tuned.

Can you give me your account #, so I can see what agents/metrics you have reporting in? (I'm a NR Admin)

Thanks, Seth

thedoc31 commented 11 years ago

Thanks Seth. Our account number is 224984.

sschwartzman commented 11 years ago

Just committed a version that should fix the lingering ruby & exe processes at service stop. Please try that out when you have the opportunity. Be sure to run "uninstall_perfmon_plugin_service.bat" and "install_perfrmon_plugin_service.bat" when you install the new version. I'm not positive this is required but better to be safe.

Thanks, Seth

thedoc31 commented 11 years ago

I've updated the version on the server whose config I pasted above. It seems to work fine, but I don't see the version number incrementing on the NR portal and it's still not showing up in the expected "Perfcounters" dashboard even after an uninstall/reinstall.

thedoc31 commented 11 years ago

Seth - any updates? I could really use this data as we're troubleshooting leaked SQL connections in our application.

sschwartzman commented 11 years ago

The version number didn't change, so you won't see a change there. As for not showing up as "Perfcounters", I'm not really sure why that's not working. I tried it a couple of times with different combinations and had luck each time.

What exact process did you follow in an attempt to rename the plugin? Did you rename the plugin (in the config file) after reinstall?

Also, after doing that rename, did those instances report, just not under "Perfcounters" but rather under "Perfmon"?

thedoc31 commented 11 years ago

@sschwartzman I removed the notation and renamed the GUID in the newrelic_plugin.yml in the config folder as illustrated above in the config file I pasted. When I updated, I just ran the uninstall_perfmon_plugin_service.bat, copied over the updated binaries, and then ran the install_perfmon_plugin_service.bat file. It looked like all it did was remove and readd the service in Windows Services. The config file remained unchanged.

The instance is reporting, but under "Perfmon" instead of "Perfcounters". I'm guessing it's something to do with the fact that we have multiple servers still using the default "Perfmon" name and NR doesn't want to show us two instances of the same plugin. I didn't want to go through all 30 servers running Perfmon and update their GUID if I wasn't sure it was going to let me create a custom dashboard.

thedoc31 commented 11 years ago

Any thoughts on the Perfmon plugin and custom dashboards? I'd really like to get this resolved.