opserver / Opserver

Stack Exchange's Monitoring System
https://opserver.github.io/Opserver/
MIT License
4.5k stars 827 forks source link

Add support for monitoring Win32_Services via the WMI provider. #293

Closed KennethScott closed 6 years ago

KennethScott commented 6 years ago

Submitting this pull request regarding issue #292 I opened looking for feedback on adding inquiry support for windows services via the WMI provider.

In a nutshell, I added a new Windows Services partial view underneath the Interfaces on the node details page. You control which services are monitored via a new DashboardSettings property that can be specified at the global, category, or perNodeSettings levels. The property itself is literally the WQL WHERE clause you want to use to select the services (i.e. 'Name = 'W3SVC') so you have full control over which ones you're monitoring on which servers.

I'm hoping this is something you'll consider merging in as I really do think it adds value to see the status of various services. My next goal is to add a couple of buttons to start and stop the services similar (cosmetically) to how you did the sql agent jobs.

Screenshot: image

Thanks-

NickCraver commented 6 years ago

I'm not against adding the feature for certain, but do have issues with the current form. Keep in mind that Opserver monitors many node types: Windows, Linux, Network gear, VM clusters, etc. If you look at the properties of a service here, they're just a service. How they're implemented and queried would be per-provider but they are still just services and general purpose at that. The same services exist on systemd in *nix for example.

Some initial thoughts:

I think this would be a good addition with the changes above, and we could enhance this with button controls like SQL Server jobs already have. I'd have mutability per-provider and per-node, as it'd set whether or not it can manage services on the node (e.g. do we have permissions on the server?). This would allow:

Thanks for the work here, I'm excited about this - let me know what you think about the brain dump above!

KennethScott commented 6 years ago

@NickCraver, I agree with you on all counts. I honestly think I had tunnel vision with it being windows specific. Please take a look at the latest commit and see if it's more like what you had in mind.
I think I hit everything you mentioned. Let me know what you think.

Thanks!

KennethScott commented 6 years ago

Done and done. Let me know if you see anything else.

Thanks!

NickCraver commented 6 years ago

Was just waiting to finish up my exceptions work locally, pulling in now - thank you!