Ad Widget

Collapse

Performance monitoring of Windows services

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Neodemon
    Junior Member
    • May 2026
    • 4

    #1

    Performance monitoring of Windows services

    Hi, we have a virtual machines running a few windows services, some of them might be running using the same executable like:
    Service1 using "c:\services\service.exe P1"
    Service2 using "c:\services\service.exe P2"
    where P1 and P2 are command line parameters.
    • I tweaked Windows Registry to have access to include PIDs in the performance counters (HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Servi ces\PerfProc\Performance, ProcessNameFormat DWORD 2),
    • set up a discovery rule (see LLD_js.txt) that identifies specific service and saves some info including running PID and then
    • created an item prototype with a key like perf_counter_en["\Process({#SERVICE.INSTANCE})\Private Bytes"].
    Total schema works successfully until servcie restart, as after restart it gets another PID, means another item gets created for the host and started collecting metrics into new item
    Just wondering if someone faced the same issue and resolved it to have statisitics continue gathering for the same service after service restart

    Regards, Dmytro
    Attached Files
  • Manuel Deschambault
    Junior Member
    • Jan 2026
    • 22

    #2
    Just brainstorming here, would it be possible for you to write a automation script that goes and renames the PID in the Zabbix historical data to the new one, hence tying the old performance data to the new PID?

    Comment

    • troffasky
      Senior Member
      • Jul 2008
      • 619

      #3
      Why are you pulling the PID in here? Is that what #SERVICE.INSTANCE is? P1 and P2 are not PIDs, right?

      Comment

      • Neodemon
        Junior Member
        • May 2026
        • 4

        #4
        Originally posted by Manuel Deschambault
        Just brainstorming here, would it be possible for you to write a automation script that goes and renames the PID in the Zabbix historical data to the new one, hence tying the old performance data to the new PID?
        well, this might be a workaround if I won't find better solution..

        Comment

        • Neodemon
          Junior Member
          • May 2026
          • 4

          #5
          Originally posted by troffasky
          Why are you pulling the PID in here? Is that what #SERVICE.INSTANCE is? P1 and P2 are not PIDs, right?
          #SERVICE.INSTANCE for "service.exe" would be SERVICE_PID.
          P1 and P2 are just parameter values, I was using them to give an example, but they're useless to get any counter info
          The approach windows is using (without PID tweak) for multiple services having the same executable name will be
          service
          service_1
          service_2
          which turns not reliable and can mix up counters between instances as well..

          Comment

          Working...