Struggling to find the counters to get the status of a service using perfmon. Is it even possible? We need to monitor the status of a service in Nagios but the only remote access avaliable is through Perfmon.
There are no performance counters for services. For a kind of one-shot you could monitor the counters of the process your service is invoking - for example the process' private bytes or the number of threads.
As the process id is going to change on every restart, you would need to adjust your monitoring accordingly. But it will work as a quick & dirty solution unless you have something more robust in place.
The Performance Monitor is used to measure metrics of your machines performance, and not the status of a service.
While I know you're looking to monitor this status in Perfmon, I don't think it's the right tool for you. If you can get into services.msc you can navigate to the "Recovery" tab of that service. From here you can choose how your server reacts to different states that the service may be in. For instance you could choose to restart the service on the first failure, and run a script that e-mails you on the second and third failure of the service, etc.
You can fairly easily write powershell scripts (or small C# codelets even) which create custom Windows performance counters. Into these you can input whatever data you choose (like a numeric service status indicator?), at whatever intervall seems adequate, which is handy when perfmon is the only easy way to export data (I had the same bizarre problem once but it was a different monitoring application than Nagios).
Regrettably I am on holiday and only have this measly iphone, so I guess I'll have to return and paste in an example script when I can.
You can quickly and easily google a ton of powershell/C# solutions though, that's how I figured it out when I more or less had to. Still, I guess you'd have to find a way to do it which can slip past that 6 month qa cycle.